[PATCH] AArch64 Port of GDB and GDBSERVER.

Joseph S. Myers joseph@codesourcery.com
Wed Sep 26 14:37:00 GMT 2012


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



More information about the Gdb-patches mailing list