This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 7.3 is broken on FreeBSD


> 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.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]