Write to extra (FP, etc) registers from GDB
authorMichael Pratt <michael@pratt.im>
Mon, 9 Jul 2012 05:00:53 +0000 (01:00 -0400)
committerMichael Pratt <michael@pratt.im>
Mon, 9 Jul 2012 05:00:53 +0000 (01:00 -0400)
commitc6274f026b7848cf45029eccc327f8215738a743
tree05c3bd6a17f45712132b7b35e7e82a9c7438ef58
parentb1e65ea367a450e8a37584cdee334562149b2a7c
Write to extra (FP, etc) registers from GDB

The extra registers added in my previous commit can now be modified from
within GDB.  Since the ST-LINK does not support accessing these
registers, a workaround was used from reading an writing to them.

That is, the Debug Core Register Selector Register (DCRSR) can be written
with the register requested, and it will be read/written to/from the
Debug Core Register Data Register (DCRDR).  The standard ST-LINK memory
access functions are used to make these accesses.

A target descriptor XML file is sent to GDB from the server, which tells
GDB which registers exist on the target.

This is only supported for the STM32F4, and has only been tested on the
STM32F4DISCOVERY.  I tested st-util on an STM32L-DISCOVERY and my
changes did not seem to interfere with its operation.
AUTHORS
gdbserver/gdb-server.c
src/stlink-common.c
src/stlink-common.h
src/stlink-usb.c