This is the mail archive of the gdb-patches@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: [PATCH, v3] Expect SI_KERNEL or TRAP_BRKPT si_code values for MIPS breakpoint traps


On Tue, 23 Feb 2016, Luis Machado wrote:

> > If we get this for both software breakpoints and hardware watchpoints,
> > then it seems to me that this change still leaves watchpoints broken,
> > as I can't see how check_stopped_by_watchpoint is reached, in either
> > gdb/linux-nat.c or gdbserver/linux-low.c.
> 
> With or without this specific breakpoint fix, hardware watchpoints are already
> broken for MIPS AFAICS.
> 
> MIPS' kernel has never set si_code to anything other than SI_KERNEL. When the
> change to expect TRAP_HWBKPT was committed, then hardware watchpoints stopped
> working properly for MIPS.
> 
> Now all hardware watchpoints produce are breakpoint-like traps that get
> silently ignored by GDB as "delayed software breakpoint trap". Neither GDB nor
> GDBserver can tell when a hardware watchpoint really happened by using si_code
> information.

 Thanks for checking, I wasn't aware there could be something wrong here.

> But this seems to be a different issue and i think it should be handle
> separately.

 Agreed.  I'll see if I can get a kernel patch cooked up in the next few 
days, however this still leaves a question open as to what to do about 
legacy systems which don't have these signal codes implemented.  Plain 
leaving them broken forever does not sound like a good plan to me.

> > Also, "and SIGTRAP's in general." seems wrong.  I hope that that's
> > not the case for user-sent SIGTRAPs?
> > 
> 
> I'll get this updated in the next version.

 FWIW it LGTM, but I'll leave it up to Pedro to approve this change as it 
was him who requested a comment update.

  Maciej


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