[Pdbg] [PATCH v2 00/16] Basic gdbserver for POWER8

Rashmica Gupta rashmica.g at gmail.com
Fri Sep 7 16:39:59 AEST 2018


I have rebased Alistair's gdbserver on master and done a few cleanups.
I have been using Amitay's patch "main: Add P8 kernel devicetree" when
running on a BMC.

This should let you do basic things through gdb like examine the
registers, read and write to kernel memory, and step through the
kernel. There is obviously a lot more to be done, but it would be nice
to get some of this upstream so I don't have to keep rebasing as often :)

Currently this is only designed to work on kernel addresses (as the
translation to real addresses is trivial). Any thoughts on how we
could/should go about dealing with address translations are welcome.
It would be nice if we could attempt to deal with kernel virtual
addresses and skiboot addresses.

------
v1->v2: A few changes as suggested by Nick (get gprs in one batch,
a few #defines). And a couple of other tidyups like use the exisitng
logging functions, don't segfault when given an invalid target etc,
and an additional state in the state machine to make sure we wait for
the thread to start before checking if we've been quiesced.


Alistair Popple (2):
  pdbg/gdbserver: Add in basic skeleton for a gdbserver on p8
  pdbg/gdbserver: Make ragel optional

Rashmica Gupta (14):
  libpdbg: Release adu lock when erroring out
  pdbg: Fix function call for putnia command
  libpdbg: Print the name of the instruction when erroring
  libpdbg: Remove unused error code
  libpdbg: Check if scom controllers are exposed
  libpdbg: Add in getxer and putxer functions
  pdbg: Add getxer & putxer commands
  libpdbg: Make getcr actually get all of the Condition Register
  libpdbg: Add in mtocrf and putcr function
  pdbg: Add getcr and putcr options
  pdbg: Add in parser for uint16_t
  libpdbg: Add in enable_attn function for p8
  pdbg/gdbserver: Make gdbserver optional
  README: Add some gdbserver info

 .gitignore                  |   1 +
 Makefile.am                 |  34 ++-
 README.md                   |  26 +++
 configure.ac                |  10 +
 libpdbg/adu.c               |   1 +
 libpdbg/chip.c              | 109 ++++++---
 libpdbg/chip.h              |  24 ++
 libpdbg/host.c              |  10 +-
 libpdbg/libpdbg.h           |   7 +-
 libpdbg/operations.h        |  10 +-
 libpdbg/p8chip.c            | 127 +++++++++++
 libpdbg/p9chip.c            |  31 ++-
 libpdbg/target.h            |   4 +
 src/gdb_parser.rl           | 146 ++++++++++++
 src/gdb_parser_precompile.c | 410 +++++++++++++++++++++++++++++++++
 src/main.c                  |  12 +-
 src/parsers.c               |  18 ++
 src/parsers.h               |   2 +
 src/pdbgproxy.c             | 541 ++++++++++++++++++++++++++++++++++++++++++++
 src/pdbgproxy.h             |  13 ++
 src/reg.c                   |  46 +++-
 21 files changed, 1532 insertions(+), 50 deletions(-)
 create mode 100644 libpdbg/chip.h
 create mode 100644 src/gdb_parser.rl
 create mode 100644 src/gdb_parser_precompile.c
 create mode 100644 src/pdbgproxy.c
 create mode 100644 src/pdbgproxy.h

-- 
2.14.4



More information about the Pdbg mailing list