[PATCH 0/7] Aarch64 linux GDB remote multi-arch debugging

Yao Qi qiyaoltc@gmail.com
Fri Jul 31 15:17:00 GMT 2015


This patch series is to enable Aarch64 GDBserver debug arm program.

Patch 1 is to make variable have_ptrace_getregset shared for all linux
targets, so that patch 2 can use it.  Patch 2 adds a new regs_info
specific to aarch32, which will be used by patch 3.  This new regs_info
can also be used by some arm-linux targets if kernel support
ptrace_getregset.

Patch 3 is the major part of this series, which teach GDBserver uses
arm target description and regs_info if the target program is 32-bit.
Patch 4 is to handle the different size of PC value in multi-arch, which
is the same as what we are doing on x86 multi-arch.

Patch 5 disables Z0 packets on aarch64 for multi-arch debugging,
otherwise GDBserver has to know how to choose the right breakpoint
instructions for aarch64, arm, and arm thumb mode (thumb and thumb2).
See more details from the patch.

Nowadays, tracepoint is not supported for arm, so we need to disable
tracepoint support in aarch64 GDBserver if the target thread is 32-bit.
This is what patch 6 does.

Note that multi-thread debugging and HW watchpoint are still not
supported, because of some kernel issues.  My description in this
patch https://sourceware.org/ml/gdb-patches/2015-07/msg00029.html
is still valid.

After some kernel patches for multi-arch are committed, I'll enable
multi-thread debugging and HW watchpoint support in both GDB and
GDBserver.  That is my plan next step.

*** BLURB HERE ***

Yao Qi (7):
  Move have_ptrace_getregset to linux-low.c
  New regs_info for aarch32
  Use arm target description and regs_info for 32-bit file on aarch64
    GDBserver
  Get and set PC correctly on aarch64 in multi-arch
  Disable Z0 packet on aarch64 on multi-arch debugging
  Disable tracepoint support for aarch32
  Mention multi-arch debugging support in NEWS

 gdb/NEWS                          |   4 +
 gdb/gdbserver/configure.srv       |   5 ++
 gdb/gdbserver/linux-aarch32-low.c | 152 ++++++++++++++++++++++++++++++++++++++
 gdb/gdbserver/linux-aarch32-low.h |  36 +++++++++
 gdb/gdbserver/linux-aarch64-low.c | 100 ++++++++++++++++++++++---
 gdb/gdbserver/linux-arm-low.c     | 108 +++++++--------------------
 gdb/gdbserver/linux-low.c         |   3 +
 gdb/gdbserver/linux-low.h         |   2 +
 gdb/gdbserver/linux-x86-low.c     |   3 -
 gdb/gdbserver/server.c            |   2 +-
 gdb/gdbserver/server.h            |   1 +
 11 files changed, 318 insertions(+), 98 deletions(-)
 create mode 100644 gdb/gdbserver/linux-aarch32-low.c
 create mode 100644 gdb/gdbserver/linux-aarch32-low.h

-- 
1.9.1



More information about the Gdb-patches mailing list