Re: debugging a program that uses SIGTRAP

Daniel Jacobowitz
2007-03-21T11:14:26Z

On Tue, Mar 20, 2007 at 08:34:31PM -0600, Michael FIG wrote:
> > 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.

You've asked it to pass all SIGTRAPs and it's doing what you said -
I think you're stuck. However, it might be possible to make it do
this. The logic is in infrun.c. Be careful; that's one of the
touchiest pieces of GDB.

--
Daniel Jacobowitz
CodeSourcery