This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: conditional traps on powerpc
- To: Eric Marsden <emarsden at mail dot dotcom dot fr>
- Subject: Re: conditional traps on powerpc
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Mon, 19 Feb 2001 17:30:16 -0500
- CC: gdb at sources dot redhat dot com
- Organization: Red Hat Canada
- References: <wziy9v2z65l.fsf@mail.dotcom.fr>
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
breakpoint.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9