On 08/25/2011 02:17 PM, Øyvind Harboe wrote:
On Thu, Aug 25, 2011 at 2:16 PM, j. m. norris<u17...@att.net>  wrote:
Would it make sense for someone to collect a 'wish list' of
'architectures
and registers'
and then prioritize it?

Ultimately we need patches :-) It doesn't matter if we want something but
nobody
can work on it, but perhaps it could be good as a starting point for a
discussion?

I thought that with a list, it would hopefully avoid someone working on
something and then discovering
that no one wanted it. While this situation would generate much appreciated
patches, I was hoping to
allow for the identification of the most needed amongst the numerous ARM
processors / variants.

GDB actually has a protocol defined to handle all the variants, so once that
feature is implemented, we're done. As I understand it. W.r.t. the
gdb register packet that is.

I investigated a bit, and openocd needs to provide an XML target description (qXfer:features:read) to GDB that supports it (qSupported:xmlRegisters).

It's also possible to provide a target description XML file directly to GDB using the following GDB command:

        set tdesc filename <file name>

Here's an XML file that can be used to make GDB 7.3 able to talk to openocd and ARM targets (at least EABI ARM):

<?xml version="1.0"?>
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
  <feature name="org.gnu.gdb.arm.core">
    <reg name="r0" bitsize="32" type="uint32"/>
    <reg name="r1" bitsize="32" type="uint32"/>
    <reg name="r2" bitsize="32" type="uint32"/>
    <reg name="r3" bitsize="32" type="uint32"/>
    <reg name="r4" bitsize="32" type="uint32"/>
    <reg name="r5" bitsize="32" type="uint32"/>
    <reg name="r6" bitsize="32" type="uint32"/>
    <reg name="r7" bitsize="32" type="uint32"/>
    <reg name="r8" bitsize="32" type="uint32"/>
    <reg name="r9" bitsize="32" type="uint32"/>
    <reg name="r10" bitsize="32" type="uint32"/>
    <reg name="r11" bitsize="32" type="uint32"/>
    <reg name="r12" bitsize="32" type="uint32"/>
    <reg name="sp" bitsize="32" type="data_ptr"/>
    <reg name="lr" bitsize="32"/>
    <reg name="pc" bitsize="32" type="code_ptr"/>
    <reg name="cpsr" bitsize="32" regnum="25"/>
  </feature>
  <feature name="org.gnu.gdb.arm.fpa">
    <reg name="f0" bitsize="96" type="arm_fpa_ext" regnum="16"/>
    <reg name="f1" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f2" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f3" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f4" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f5" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f6" bitsize="96" type="arm_fpa_ext"/>
    <reg name="f7" bitsize="96" type="arm_fpa_ext"/>
    <reg name="fps" bitsize="32"/>
  </feature>
</target>

Just save it as target.xml, and add the following line to .gdbinit:

        set tdesc filename target.xml

/Tobias
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to