Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] CDT debugging with 16-bit addressable memories

Oh, and as for DSF...sort of the same thing. The DSF gdb/mi reference backend probably doesn't yet support targets with >1-byte access size, but given a fix for the CDI backend, we'll be able to apply the same improvement to the DSF one.

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

Back to the top