From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: fix simulator's handling of exceptions Date: Mon, 07 May 2001 12:30:00 -0000 Message-id: <3AF6F7A6.9000704@cygnus.com> References: <20010505210130.9FD755E9D5@zwingli.cygnus.com> X-SW-Source: 2001-05/msg00097.html 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 * 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