RFA: fix simulator's handling of exceptions
Andrew Cagney
ac131313@cygnus.com
Mon May 7 12:30:00 GMT 2001
This patch could be totally inept, but with luck, you can see what I
have in mind. Please clue me in.
2001-05-05 Jim Blandy <jimb@redhat.com>
* interp.c (program_interrupt): Don't try to emulate the
processor's behavior when it hits a breakpoint, unless we're
in the OPERATING_ENVIRONMENT.
I'm not sure this is correct. The mn10300 doesn't have an operating
environment (user/supervisor modes). Have a look at either the d10v or
the tx39.
In general what happens is:
o simulator encounters a breakpoint
o simulator saves all state relevant
to the breakpoint in case it has
to be delivered
o breakpoint encountered (SIGBREAK)
returned to GDB
o GDB checks to see if it is a
breakpoint on its breakpoint list.
o if it is.
Process the breakpoint and then,
later when the target is resumed,
pass in 0 as the signal.
o if it isn't
Depending on the current state of
SIGBREAK (according to (gdb) handle?)
possibly resume the target with
SIGBREAK as the signal. The target
simulator should then use that saved
breakpoint state to deliver a breakpoint
interrupt to the target.
Andrew
More information about the Gdb-patches
mailing list