This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Setting breakpoints
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 4 Jun 2003 16:56:04 +0200
- Subject: [ECOS] Setting breakpoints
I'm developing an app that will run from flash,
so setting breakpoints isn't straightforward,
since it would require hardware breakpoints.
As an alternative approach, I was considering
changing the section of the function I needed
to debug to a section that runs from RAM.
I can't fit my entire app and eCos into RAM,
but it shouldn't be a problem to fit enough of my
app into RAM that setting breakpoints shouldn't
be a problem.
Q: Is this the right approach?
Q: What section do I place the functions in question into?
E.g.
int __attribute__ ((section (".fini"))) main(int argc, char **argv)
Q: I tried recompiling and running my app with the modification
above, but when I set a breakpoint in main, main was still in
the flash address space. Hmmm?
A bit about my setup:
- EB40a Atmel AT91R40008
- 2MB flash, 256Kb RAM
- JTAG Wiggler debugger + LibRemote app from GDB
"target remote" to JTAG speak translation.
- When I try "hbreak main", I get an error message that hardware
breakpoints aren't supported. Similarly with "monitor set hbreak".
I don't know if the CPU supports hardware breakpoints, or whether
this is a limitation in my tools.
Øyvind
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss