]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: LoongArch: Add system call support for process record/replay
authorHui Li <lihui@loongson.cn>
Mon, 25 Nov 2024 07:46:00 +0000 (15:46 +0800)
committerTiezhu Yang <yangtiezhu@loongson.cn>
Mon, 25 Nov 2024 11:15:51 +0000 (19:15 +0800)
commit33afccfaa8b154433015fe52aa76e3d1d9e9e856
treeb531ea891bcddf0ed947704c611e12259f8ed47f
parent886ebc2b1f226d1ca06a3f0192cd1663c46428b0
gdb: LoongArch: Add system call support for process record/replay

The process record and replay function also need record Linux
system call instruction. This patch adds LoongArch system call
number definitions in gdb/arch/loongarch-syscall.h, and adds
loongarch_linux_syscall_record() in gdb/loongarch-linux-tdep.c
to record system call execute log. With this patch, the main
functions of process record/replay and reverse debugging are
implemented.

The LoongArch system call numbers definitions are obtained from Linux kernel.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/asm/unistd.h

Signed-off-by: Hui Li <lihui@loongson.cn>
Approved-By: Guinevere Larsen <guinevere@redhat.com> (record-full)
Approved-By: Tom Tromey <tom@tromey.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
gdb/arch/loongarch-syscall.h [new file with mode: 0644]
gdb/loongarch-linux-tdep.c
gdb/loongarch-tdep.c
gdb/loongarch-tdep.h