[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] CDT debugging with 16-bit addressable memories
|
Edwin,
It's possible that the gdb/mi reference backend simply wasn't
equipped to intelligently return the access size. If the access size
can be determined from gdb, then that's what the gdb/mi plugin should
be using when initializing the MemoryBlock. Please submit a bug
report and a patch with your approach and I'll look at incorporating
it into the code base.
John
At 05:52 AM 11/6/2009, Edwin Steiner wrote:
Hello CDT community!
First: Thank you for developing and supporting CDT!
It's great to have such software to build upon.
I have a question regarding memory access in the CDT debuggin framework(s):
We are connecting a debugger to the CDT for an architecture that has
addressable units of 16 bits in data memory. Due to this we ran into problems
with the memory view.
Looking into the CDT code I found that MemoryBlock tries to guess the
size of addressable units by looking at the data values returned by
the debugger, which, of course, cannot work reliably.
(org.eclipse.cdt.debug.mi.core.cdi.model.MemoryBlock.longToBytes(long))
We solved the problem temporarily by making our debugger report the
addressable size as an additional field in the -data-read-memory response
and patching MIDataReadMemoryInfo and MemoryBlock so that always
the correct addressable size is returned by getWordSize.
(This matches the behaviour described in the comment of the method
org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock.getWordSize() )
My Question: Is there any cleaner way of making CDT debugging work
with memories with addressable unit > 8-bit? We would much prefer to
use an unpatched upstream version of the CDT.
I also looked at the new DSF debugging framework. I found this code:
fWordSize = 1; // Get this from the launch configuration
in
org.eclipse.cdt.dsf.debug.model.DsfMemoryBlockRetrieval.DsfMemoryBlockRetrieval(String,
ILaunchConfiguration, DsfSession).
So it looks as if the DSF framework does not handle non-8bit memories,
yet. Am I missing something obvious here?
best regards
Edwin
Comment of org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock.getWordSize():
/**
* This method is a misnomer. It should be
getAddressableSize. This is how
* CDT finds out from the CDI client the addressable size of the
* memory--i.e., how many bytes per address. Some embedded
systems have
* memory with addressable sizes >1. Such backends should make sure to
* ignore the now deprecated wordSize parameter of
* ICDIMemoryBlockManagement.createMemory block() and not
regurgitate that
* value in the implementation of this method.
*
* @return The addressable size of the memory
*/
int getWordSize();
This e-mail is strictly confidential and intended only for use by
the addressee(s) unless otherwise indicated.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev