RDI patches for gdb 4.18
Grant Edwards
grante@visi.com
Tue Oct 26 09:58:00 GMT 1999
Attached is a patch file generated agains gdb-4.18. It implements the
changes listed below for rdi target support.
RDI Background (people who don't know what the rdi target is probably
don't care about the patches, but in case somebody is curious...)
The rdi target is used for remotely debugging ARM targets that
implement the Angel Debugging Protocol (ADP). ADP is generally
implemented in one of two ways:
1) By running the Angel Monitor (usually in ROM) on the target and
talking to it via serial port. AFAICT, this is quite similar to
putting GDB stubs on the target.
I don't have a target that runs the Angel monitor, so I haven't
tested with this type of target.
2) By buying an ARM processor with a JTAG debugging interface and
using a JTAG interface box that implements ADP. The processor
that is most commonly used this way is the ARM7TDMI.
The two JTAG interfaces with which I have tested are the ARM
Embedded-ICE and the EPI Jeeni.
Still on the todo list: incoporate changes received from Thomas Zenker
that
+ allow the user to get gdb's attention while it's waiting for an
ADP packet.
+ clean up some BSD 4.4 issues
+ clean up the code that opens serial ports (the existing code
tries to outsmart the user regarding serial port names).
The attached patch should work cleanly if applied in the gdb-4.18 main
directory with the command
$ patch -E -p4 <gdbrdi.patch
----------------------------------------------------------------------
Changes
----------------------------------------------------------------------
* Added the boolean set/show variable rdiheartbeat.
This enables or disables ADP link-check "heartbeat" packets sent by
the host to the target. Heartbeat packets can cause both the ARM
Embedded-ICE and the EPI Jeeni to malfunction: If a heartbeat
packet is received by the target while it is sending a packet, that
packet will be aborted, and the ADP protocol engine then gets very
confused.
Default state is off -- used to hardwired on.
* Added the boolean set/show variable rdiromatzero.
Should be set to true if the target has ROM at address 0. If true,
then gdb will not tell the target to trap fetches to interrupt
vectors (which are located at address 0). Using the Angel monitor,
attempting to set breakpoints in ROM is an error. Using JTAG
debugging of the ARM7TDMI, attempting to set more than two
breakpoints in ROM is an error.
Default state is false (vectors will be trapped) -- used to be
hardwired false.
* Added command rdilogenable
Allows the user to log ADP packets that are exchanged between
gdb and the target. Both the raw packets are shown and some
minimal decoding is attempted. [new feature]
Default state is disabled.
* Added command rdilogfile
Allows the user to specify the filename to which the ADP packet log
is to be written. [new feature]
Default state is "rdi.log".
* Changed default names for Linux serial ports from /dev/cuan to
/dev/ttySn.
* Added code to split the arguments to the 'target rdi' command at the
first space. The first word is passed to Adp_OpenDevice as the
device name, the tail is passed as the "arguments" parameter. This
allows user specified baud rates -- among other things that still
need to be documented [e.g. (gdb) target rdi /dev/ttyS1 19200].
NB: With very limited testing, the ARM Embedded-ICE seems to run at
19.2K (though it is reported to be unreliable above 9600), and the
EPI Jeeni seems to run at 38.4K.
* Renamed the file rdi-share/endian.h to rdi-share/anendian.h to prevent
shadowing of /usr/include/endian.h. This was causing the wrong
byte order to be used by htons() in the RDI Ethernet driver.
26 October 1999
Grant Edwards,
Comtrol Corporation
----------------------------------------------------------------------
More information about the Gdb-patches
mailing list