This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
remote protocol extension for memory region attributes
- To: gdb at sourceware dot cygnus dot com
- Subject: remote protocol extension for memory region attributes
- From: jtc at redback dot com (J.T. Conklin)
- Date: 14 Aug 2000 15:36:02 -0700
- Reply-To: jtc at redback dot com
The remote protocol's memory read and write commands need to be
extended to handle target-side memory region attributes.
All but one of the attributes I've implemented so far are handled
entirely within GDB. At this time, only access-width needs to be
passed to the target. However, any protocol change made now shouldn't
preclude future target-side attributes, as the facility is intended to
be extensible.
My current thought is to add attributes to the 'm' and 'M' commands.
The memory read command would become:
mAA..AA,LLLL[,attribute=<value>[,...]]
The memory write command would become:
MAA..AA,LLLL[,attribute=<value>[,...]]:XX...XX
The problems with this approach are:
* In general, the sample stubs aren't very strict about validating
commands. In this case, the memory read command does not report an
error if any characters follow the length. This makes it difficult
if not impossible to detect whether a target supports attributes, as
they will be silently ignored.
* The payload length is decreased.
These problems could be solved by having a separate command that would
set the attributes to be used for future reads and writes, like is
done for threads, but this adds state to the stub (IMO not a problem,
considering the state required for target managed breakpoints); and
more importantly it adds latency since two commands would have to be
sent instead of one.
I'm inclined to live with the defects and go with extending the
existing commands.
Thoughts?
--jtc
--
J.T. Conklin
RedBack Networks