On Mon, May 2, 2011 at 3:52 PM, Michael Trensch <[email protected]> wrote: > I often use openOCD and GDB/Insight to attach to a running target that I > don't want to halt, or even cannot halt it during my debugging session. > I just want to take to see the call stack and program counter when it > crashes or when it reaches a special code line. > I think you can still connect to the target to look at the call stack and PC after it crashes.
When I want to look at the call stack and PC at a special code line, I usually set a breakpoint from GDB, that will requires to halt the target first. > It's not a good idea to force everyone to halt their target when > connecting, when there is the possibility to script this behavior. It > might be your case that you want to halt it, but some other may not want > that. > Yes, it won't be a good idea to force everyone to halt their target if they usually don't. But it will also not be a good idea if people manually halt their target in most cases. GDB expects the target to be stopped when it connects to the target. But OpenOCD has this feature for several years, I think there must be some reasons. I'm trying to understand them. > In your case I think it would be the best to write a "gdb-attach" event > in your script and you can do whatever you want, like resetting the CPU, > blink LED's in this script. > This is what I'm currently doing. But I'm not sure if it's the correct thing to do since most of the board config files have "reset init" for their gdb-attach event, not "halt", except u8500.cfg. Regards, Jie _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
