This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] AArch64 Port of GDB and GDBSERVER.
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 26 Sep 2012 14:37:20 +0000
- Subject: Re: [PATCH] AArch64 Port of GDB and GDBSERVER.
- References: <5062CCF0.5050203@arm.com>
On Wed, 26 Sep 2012, Marcus Shawcroft wrote:
> +#ifndef PTRACE_GETHBPREGS
> +#define PTRACE_GETHBPREGS 29
> +#endif
> +
> +#ifndef PTRACE_SETHBPREGS
> +#define PTRACE_SETHBPREGS 30
> +#endif
> +
> +#ifndef TRAP_HWBKPT
> +#define TRAP_HWBKPT 0x0004
> +#endif
This sort of conditional may make sense when using new definitions in an
existing port, where you don't want to rely on sufficiently new kernel or
glibc (as applicable) headers being used to build the native debugger.
But for native code in this new port, you can assume the very latest
AArch64 kernel headers (at least until the port is upstream, then you can
assume the first kernel.org release with AArch64 has the minimum kernel
header version you should support) and, likewise, glibc headers from the
first release after that port is submitted / reviewed / committed. So I
don't think such conditionals are appropriate (in the files that are only
built for AArch64 host); as long as the headers you include actually do
define these values, no local definitions should be needed at all.
--
Joseph S. Myers
joseph@codesourcery.com