Re: [Patch Darwin] head build fixes for i686-darwin9/x86_64-darwin10.

Pedro Alves
2012-01-02T11:40:20Z

On 12/29/2011 08:30 PM, Iain Sandoe wrote:

> =======
>
> 2/ DR_FIRSTADDR and cousins are undefined.
> (the fragment below is copied verbatim from gdb-7.3.1 - is there some
> reason to expect that it should have been defined elsewhere?)

I've just recently removed these from this file, but I missed that the file
does not include i386-nat.h. Include i386-nat.h instead please.

Darwin has the i386 watchpoint hooks in place, but it doesn't install
them --- there's a i386_use_watchpoints call missing (at least).

http://sourceware.org/ml/gdb-patches/2011-12/msg00143.html

>
> diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c
> index 23f6a6d..2a346c4 100644
> --- a/gdb/i386-darwin-nat.c
> +++ b/gdb/i386-darwin-nat.c
> @@ -263,6 +263,22 @@ i386_darwin_store_inferior_registers (struct
> target_ops *ops,
>
> /* Support for debug registers, boosted mostly from
> i386-linux-nat.c. */
>
> +#ifndef DR_FIRSTADDR
> +#define DR_FIRSTADDR 0
> +#endif
> +
> +#ifndef DR_LASTADDR
> +#define DR_LASTADDR 3
> +#endif
> +
> +#ifndef DR_STATUS
> +#define DR_STATUS 6
> +#endif
> +
> +#ifndef DR_CONTROL
> +#define DR_CONTROL 7
> +#endif
> +