This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: how breakpoint instruction execute


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]