On Wed, Sep 23, 2009 at 7:04 PM, Michael Schwingen
<rincew...@discworld.dascon.de> wrote:
> Øyvind Harboe wrote:
>> Patch attached.
>>
>> 1. The first "stepi/continue" after a connect will return immediately
>> without affecting the state of the target. This allows GDB to sync
>> up to the target state. Nice when wanting to attach GDB to
>> a running target and deciding using GDB monitor commands how
>> to start examining/halting the target.
>>
>> 2. You can explicitly use the "monitor gdb_sync" command to tell
>> OpenOCD to return immediately from the next stepi/continue to
>> sync up GDB to the target state.
>>
>> 3. As before GDB will return garbage register values to allow
>> GDB to be in the "halted" state even if the target is running,
>> powered down or unresponsive, etc.
>>
> I like the idea, but I can't decide if there might be downsides to the
> new behaviour. Can this easily be turned off in case it causes problems?

I loathe options.... perhaps we can add some if we have to.

The old behavior is kinda buggy.... What alternative behavior
do you have in mind?

E.g.:

1. the target is really running...

(gdb) monitor resume
(gdb) stepi
=> what do you expect to happen here??

2. the target register state is out of sync with GDB
(gdb) monitor halt
(gdb) monitor reg pc 0x200000
(gdb) print $pc
=> what do you expect here??

3. How do I attach to GDB the target without affecting
it's state?

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to