debugging a program that uses SIGTRAP

Michael FIG michael-dated-1177036471.79d946@fig.org
Wed Mar 21 02:34:00 GMT 2007


Thanks for the swift reply!

Daniel Jacobowitz <drow@false.org> writes:

> I don't see any good way to solve this.  You've got two sets of
> breakpoints and they're both going to stop GDB - it doesn't know which
> ones you want and which you don't.

Okay.  I thought somehow GDB would pass SIGTRAP iff it knows it has
not set a breakpoint on the current instruction pointer by scanning
its list of breakpoints.

> Even if you get past that point, your handler will now get called
> every time GDB hits a breakpoint or single steps - single stepping
> will probably be broken.

Would the above suggestion be reasonable?  I think it would behave
nicer than what I have now, especially for my circumstance, since
there isn't any overlap between the code I'm trying to debug and the
code _it's_ trying to debug.

If it does seem reasonable, I can look into creating a patch.  I
haven't gotten my hands dirty in GDB before. :)

-- 
Michael FIG <michael@fig.org> /\//\
   http://fig.org/michael/    \//\/



More information about the Gdb mailing list