This is the mail archive of the 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]

Re: conditional traps on powerpc

Eric Marsden wrote:
> I have a problem debugging a program which uses conditional traps on
> powerpc (TWxxx instructions). Upon encountering these the linuxppc
> kernel raises a SIGTRAP, which is grabbed by gdb. When running such a
> program under gdb I can't distinguish between normal breakpoints and
> these conditional trap instructions; debugging becomes impossible.
> Is there some way to handle this situation, or is it necessary to
> modify gdb so that it looks at the faulting instruction to determine
> whether it was a conditional trap?

Gdb considers that the SIGTRAP is a breakpoint if it has inserted a
breakpoint at that address; otherwise it is a signal like any other. So,
your breakpoints should work.

W.r.t the signal processing, gdb has commands that let you decide what
to do with signals received by the program being debugged.  You may
choose to "pass" them.  If I am not mistaken, this would only apply to
the SIGTRAPs that have been already determined not to be caused by a

Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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