* conditional traps on powerpc
@ 2001-02-19 13:59 Eric Marsden
2001-02-19 14:33 ` Fernando Nasser
0 siblings, 1 reply; 3+ messages in thread
From: Eric Marsden @ 2001-02-19 13:59 UTC (permalink / raw)
To: gdb
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?
--
Eric Marsden <URL: http://www.laas.fr/~emarsden/ >
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: conditional traps on powerpc
2001-02-19 13:59 conditional traps on powerpc Eric Marsden
@ 2001-02-19 14:33 ` Fernando Nasser
2001-02-19 15:02 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Fernando Nasser @ 2001-02-19 14:33 UTC (permalink / raw)
To: Eric Marsden; +Cc: gdb
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: conditional traps on powerpc
2001-02-19 14:33 ` Fernando Nasser
@ 2001-02-19 15:02 ` Andrew Cagney
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2001-02-19 15:02 UTC (permalink / raw)
To: Fernando Nasser; +Cc: Eric Marsden, GDB Discussion
Fernando Nasser wrote:
> 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.
Yes, that is correct.
Mind you, I'm not sure what the kernel will do when it is told to
deliver a SIGTRAP to a program already being debugged.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-02-19 15:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-19 13:59 conditional traps on powerpc Eric Marsden
2001-02-19 14:33 ` Fernando Nasser
2001-02-19 15:02 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox