[ECOS] how breakpoint instruction execute
Robert Cragie
rcc@jennic.com
Thu Jul 11 02:38:00 GMT 2002
Assuming you are running a debugger like GDB with some sort of monitor:
* Via the monitor, the debugger saves the opcode at the breakpoint and
replaces it with a trap, or software interrupt.
* When execution reaches the trap, an exception handler is called which
communicates with the debugger to indicate that the breakpoint has been
reached. The debugger may resume execution if the breakpoint is conditional.
* When the breakpoint is removed, the debugger will restore the opcode at
the breakpoint via the monitor.
This explains why code which needs breakpoints typically needs to run in
RAM, and why execution with conditional breakpoints doesn't run in real
time.
Things may be different if you are using JTAG-based debuggers or an ICE
(In-Circuit-Emulator) based debugger.
Robert Cragie, Design Engineer
________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
www.jennic.com Tel: +44 (0) 114 281 2655
> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of zhlg_shuhan
> Sent: 11 July 2002 07:51
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS] how breakpoint instruction execute
>
>
> How breakpoint instruction executes on run-time debug?
>
> 3x!
> ______________________________________
>
> ===================================================================
> ÃÃÃÃÃâ·ÃµçÃÃÃÃÃä (http://mail.sina.com.cn)
> ÃÃÃ÷ÃÃà ÃÃ
⣺¶þÃÃÃó¡ÃÃûÃ㬸óöÃÃñ¾Ã³öÃã¡
> (http://classad.sina.com.cn/2shou/)
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>
>
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list