[Open SoC Debug] CDM: Next Steps

Stafford Horne shorne at gmail.com
Fri Jun 15 14:25:49 CEST 2018


On Fri, Jun 15, 2018 at 8:42 PM Philipp Wagner <philipp.wagner at tum.de> wrote:
>
...
> > The OSD-GDB server will be responsible for communication between GDB and
> > OSD-GDB
> > server via TCP port using RSP protocol.

...
> > 3. An interface to connect it to the host controller (as mentioned in
> > the image).
> > I think the general API for that part should be similar to osd_memaccess
> > class.
> > http://opensocdebug.readthedocs.io/projects/osd-sw/en/latest/02_developer/api/libosd/memaccess.html
>
> yes, the osd_memaccess (like the osd_syslogger) class could be a good
> starting point to take inspiration from.
>
> > The target description is mentioned as:
> >
> > http://repo.or.cz/openocd.git/blob/HEAD:/src/target/openrisc/or1k.c#l53
> >
> > Also, something about the target description in an XML file is specified
> > here:
> >
> > https://sourceware.org/gdb/onlinedocs/gdb/Standard-Target-Features.html#Standard-Target-Features
> >
> > I am looking more into this point. Please, if possible elaborate more
> > about this point and
> >
> > how it can be executed in the OSD-GDB server.
>
> I'll let Stafford answer that one, I don't know much about it.

The target descriptor is what GDB uses to understand how to interact
with the target,  this is part of GDB and you don't need to modify it.
The target features is an XML file used by gdb to map the target
registers and the register features.  By default the or1k-* gdb has a
minimal feature xml.

  https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/features/or1k-core.xml;h=6fe9765150575464bf11a9752e3c3276ff4ab8fa;hb=HEAD

It is not required for the gdbserver (OSD-GDB server) to provide a
feature set xml,  but it can provide one if the gdb-server knows more
details compared to the default feature xml provided by gdb.   For
example you can provide cache, mmu and spr's.

I don't think this is required right now.

> > Also, suggest if I should continue the discussion over this topic on the
> > mailing list or a PR with possible API would be better?
>
> Design decisions can be done well on the mailing list. Once you have
> first code that you need feedback on please open a PR.

Yes, I prefer keeping these discussions in mail until everything is clear.

-Stafford


More information about the OpenSoCDebug mailing list