Hello,
1)
>>
Is there a problem for GDB to read memory when the program
is running?
I
am copying a comment from file GDBMemory_7_0.java which
explains this properly when reading or writing from/to
memory.
// A memory
context is a container. We have two limitations with GDB
here:
// 1-
Before GDB 7.2, there is no way to specify a process for
an MI command, so to work around
// that, we
need to specify a thread for the process we want to point
to. This is important
// to
support multi-process for targets that have that kind of
support before GDB 7.2
// 2- GDB
cannot write memory when pointing to a thread that is
running. For non-stop mode
// we can
have some threads running with others stopped, so we need
to choose a thread that is
// actually
stopped.
2)
>>
getExtendedMemoryBlock() is
not being called.
This
goes with your implementation of IMemoryBlockRetrievalExtension, you can see the
GDB implementation as a reference
i.e. GdbMemoryBlockRetrieval,
With the latest code from
master, follow the constructor and see that this is created
by the block retrieval manager upon reception
of IStartedDMEvent with a context of IMemoryDMContext (for
GDB this is implemented by the class representing a process
i.e. GDBContainerDMC),
so for this case we have one memory context per process...
This also
means that for GDB the IMemoryBlockRetrievalExtension is
created each time a process gets created.
The above gives you an entry
to a reference implementation for GDB which you can exercise
with a simple test program,
I hope this
helps you continue
/Alvaro