gdbserver: Add LoongArch/Linux support
authorYouling Tang <tangyouling@loongson.cn>
Mon, 30 May 2022 12:08:30 +0000 (20:08 +0800)
committerTiezhu Yang <yangtiezhu@loongson.cn>
Tue, 14 Jun 2022 14:21:43 +0000 (22:21 +0800)
commite5ab6af52d38ee068c1860ef113b7db4cc985cfb
tree8bad8cacb35f0635adbe82e3ed6837c0f5b9e3ef
parent476288fa2bddecf0f0e13dee826a076309bf01fe
gdbserver: Add LoongArch/Linux support

Implement LoongArch/Linux support, including XML target description
handling based on features determined, GPR regset support, and software
breakpoint handling.

In the Linux kernel code of LoongArch, ptrace implements PTRACE_POKEUSR
and PTRACE_PEEKUSR in the arch_ptrace function, so srv_linux_usrregs is
set to yes.

With this patch on LoongArch:

  $ make check-gdb TESTS="gdb.server/server-connect.exp"
  [...]
  # of expected passes 18
  [...]

Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
gdb/NEWS
gdb/arch/loongarch.c
gdb/arch/loongarch.h
gdbserver/Makefile.in
gdbserver/configure.srv
gdbserver/linux-loongarch-low.cc [new file with mode: 0644]