binutils-gdb/gdb/nat
Uros Bizjak 8a60efe714 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.
2018-05-31 11:18:35 -04:00
..
aarch64-linux-hw-point.c aarch64: PR 19806: watchpoints: false negatives + PR 20207 contiguous ones 2018-05-04 22:26:46 +02:00
aarch64-linux-hw-point.h aarch64: PR 19806: watchpoints: false negatives + PR 20207 contiguous ones 2018-05-04 22:26:46 +02:00
aarch64-linux.c
aarch64-linux.h
aarch64-sve-linux-ptrace.c Function for reading the Aarch64 SVE vector length 2018-05-31 14:36:48 +01:00
aarch64-sve-linux-ptrace.h Function for reading the Aarch64 SVE vector length 2018-05-31 14:36:48 +01:00
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 btrace: check perf_event_paranoid 2018-02-09 14:03:21 +01:00
linux-btrace.h btrace, gdbserver: remove the to_supports_btrace target method 2018-02-09 14:03:20 +01:00
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 Fix Alpha native GDB build 2018-05-31 11:18:35 -04:00
linux-waitpid.c
linux-waitpid.h
mips-linux-watch.c
mips-linux-watch.h
ppc-linux.c [PowerPC] Consolidate wordsize getter between native and gdbserver 2018-05-22 11:52:02 -03:00
ppc-linux.h [PowerPC] Consolidate wordsize getter between native and gdbserver 2018-05-22 11:52:02 -03:00
x86-cpuid.h
x86-dregs.c Fix "fall through" comments 2018-05-04 22:04:46 -06:00
x86-dregs.h Implement "to_stopped_by_hw_breakpoint" for x86 debug registers. 2018-03-03 21:25:33 -08:00
x86-gcc-cpuid.h
x86-linux-dregs.c
x86-linux-dregs.h
x86-linux.c
x86-linux.h