8a60efe714
[Commit log by Simon Marchi] I get this error: CXX linux-nat.o /home/simark/src/binutils-gdb/gdb/linux-nat.c: In function 'void save_stop_reason(lwp_info*)': /home/simark/src/binutils-gdb/gdb/linux-nat.c:2718:9: error: duplicated 'if' condition [-Werror=duplicated-cond] else if (GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code)) ^~ In file included from /home/simark/src/binutils-gdb/gdb/linux-nat.c:31:0: /home/simark/src/binutils-gdb/gdb/nat/linux-ptrace.h:173:41: note: previously used here # define GDB_ARCH_IS_TRAP_BRKPT(X) ((X) == TRAP_BRKPT) ~~~~~^~~~~~~~~~~~~~ /home/simark/src/binutils-gdb/gdb/linux-nat.c:2709:13: note: in expansion of macro 'GDB_ARCH_IS_TRAP_BRKPT' else if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code)) ^~~~~~~~~~~~~~~~~~~~~~ For Alpha, we currently define GDB_ARCH_IS_TRAP_BRKPT and GDB_ARCH_IS_TRAP_HWBKPT both to ((X) == TRAP_BRKPT), which causes the two if branches to be duplicated. Alpha doesn't have hardware breakpoints, so the Linux kernel for Alpha never sets si_code to TRAP_HWBKPT. We can just remove the special definitions of these macros for __alpha__ and rely on the default ones. Since the kernel will never report TRAP_HWBKPT, we will just never enter the "hardware breakpoint" branch on Alpha (which is fine since it doesn't have them). gdb/ChangeLog: * nat/linux-ptrace.h [__alpha__] (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove definitions. |
||
---|---|---|
.. | ||
aarch64-linux-hw-point.c | ||
aarch64-linux-hw-point.h | ||
aarch64-linux.c | ||
aarch64-linux.h | ||
aarch64-sve-linux-ptrace.c | ||
aarch64-sve-linux-ptrace.h | ||
amd64-linux-siginfo.c | ||
amd64-linux-siginfo.h | ||
fork-inferior.c | ||
fork-inferior.h | ||
gdb_ptrace.h | ||
gdb_thread_db.h | ||
glibc_thread_db.h | ||
linux-btrace.c | ||
linux-btrace.h | ||
linux-namespaces.c | ||
linux-namespaces.h | ||
linux-nat.h | ||
linux-osdata.c | ||
linux-osdata.h | ||
linux-personality.c | ||
linux-personality.h | ||
linux-procfs.c | ||
linux-procfs.h | ||
linux-ptrace.c | ||
linux-ptrace.h | ||
linux-waitpid.c | ||
linux-waitpid.h | ||
mips-linux-watch.c | ||
mips-linux-watch.h | ||
ppc-linux.c | ||
ppc-linux.h | ||
x86-cpuid.h | ||
x86-dregs.c | ||
x86-dregs.h | ||
x86-gcc-cpuid.h | ||
x86-linux-dregs.c | ||
x86-linux-dregs.h | ||
x86-linux.c | ||
x86-linux.h |