Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Question about change events on CMemoryBlockExtension


I am writing a plugin that displays some data out of a (debug target's)
memory. I have allocated a CMemoryBlockExtension and am able to get data
out correctly.

I have a DebugEventHandler which is monitoring for DebugEvent.CHANGE
events on the CMemoryBlockExtension, which I am seeing OK. So, while the
program is supended on a breakpoint, I can use the Memory monitor to
change the memory I am displaying. I see the change, and am able to
update my display.

When I step the program, I see the CHANGE event, so try to update my
display. However, if I try to getBytesFromAddress on seeing the CHANGE
event, I get an exception that 'The target is not suspended'.

So, I decided to monitor for DebugEvent.SUSPEND and DebugEvent.RESUME
messages. It seems that I am seeing the CHANGE event after the RESUME,
but before the SUSPEND...

What is the correct protocol for using the CHANGE event and to then read
the memory that has changed?

BTW: If it makes any difference, I am using GDB to a remote (embedded)
debug target.

Thanks in advance for any help you can provide.


Back to the top