7.3 is broken on FreeBSD

Yuri yuri@rawbw.com
Thu Jul 7 05:48:00 GMT 2011


On 07/06/2011 21:31, Joel Brobecker wrote:
>> gdb-7.3 crashes on this line:
>> 563       dr_status_mirror = i386_dr_low.get_status ();
>> (gdb) p i386_dr_low
>> $1 = {set_control = 0, set_addr = 0, reset_addr = 0, get_status = 0,
>> unset_status = 0, debug_register_length = 0}
> But i386_dr_low is supposed to be set at GDB startup by
> _initialize_i386fbsd_nat:
>
>      void
>      _initialize_i386fbsd_nat (void)
>      {
>        struct target_ops *t;
>
>        /* Add some extra features to the common *BSD/i386 target.  */
>        t = i386bsd_target ();
>
>      #ifdef HAVE_PT_GETDBREGS
>
>        i386_use_watchpoints (t);
>
>        i386_dr_low.set_control = i386bsd_dr_set_control;
>        i386_dr_low.set_addr = i386bsd_dr_set_addr;
>        i386_dr_low.reset_addr = i386bsd_dr_reset_addr;
>        i386_dr_low.get_status = i386bsd_dr_get_status;
>        i386_set_debug_register_length (4);
>
>      #endif /* HAVE_PT_GETDBREGS */
>
> Is this happening? And if yes, then who is overriding the value?
> If not, why is it not happening, since you confirmed that
> HAVE_PT_GETDBREGS is defined.
>

Instead _initialize_amd64fbsd_nat is called. I only see that i386_dr_low 
is being set in i386fbsd-nat.c.
Shouldn't there also be amd64_dr_low ?

Yuri



More information about the Gdb mailing list