diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2018-05-31 11:18:02 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-05-31 11:18:35 -0400 |
commit | 8a60efe714e636c9f958058a8dfb12de81bdcbfa (patch) | |
tree | cfdc8826d8339281eff3a05cc7c738e06dc89ea8 /gdb/auxv.c | |
parent | 4b2dfa9d877a919e05817e6bfa4eda3addaf1b34 (diff) | |
download | binutils-8a60efe714e636c9f958058a8dfb12de81bdcbfa.zip binutils-8a60efe714e636c9f958058a8dfb12de81bdcbfa.tar.gz binutils-8a60efe714e636c9f958058a8dfb12de81bdcbfa.tar.bz2 |
Fix Alpha native GDB build
[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.
Diffstat (limited to 'gdb/auxv.c')
0 files changed, 0 insertions, 0 deletions