aboutsummaryrefslogtreecommitdiff
path: root/gdbserver
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@loongson.cn>2022-07-10 10:57:33 +0800
committerTiezhu Yang <yangtiezhu@loongson.cn>2022-07-10 17:27:55 +0800
commit74baa6cd1c8168705a39d45f317cc9f79e31ac3a (patch)
tree5cb976edd9cdccb6a253d7075da737299332e0a5 /gdbserver
parent3eba483364436567fd1b6ac4b5d82e23bb223a54 (diff)
downloadgdb-74baa6cd1c8168705a39d45f317cc9f79e31ac3a.zip
gdb-74baa6cd1c8168705a39d45f317cc9f79e31ac3a.tar.gz
gdb-74baa6cd1c8168705a39d45f317cc9f79e31ac3a.tar.bz2
gdbserver: LoongArch: Add orig_a0 processing
Commit 736918239b16 ("gdb: LoongArch: add orig_a0 into register set") introduced orig_a0, similar processing needs to be done in gdbserver. At the same time, add orig_a0 related comments. Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Diffstat (limited to 'gdbserver')
-rw-r--r--gdbserver/linux-loongarch-low.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdbserver/linux-loongarch-low.cc b/gdbserver/linux-loongarch-low.cc
index 7b81e4b..91826b4 100644
--- a/gdbserver/linux-loongarch-low.cc
+++ b/gdbserver/linux-loongarch-low.cc
@@ -99,6 +99,7 @@ loongarch_fill_gregset (struct regcache *regcache, void *buf)
for (i = 1; i < 32; i++)
collect_register (regcache, i, *regset + i);
+ collect_register (regcache, LOONGARCH_ORIG_A0_REGNUM, *regset + LOONGARCH_ORIG_A0_REGNUM);
collect_register (regcache, LOONGARCH_PC_REGNUM, *regset + LOONGARCH_PC_REGNUM);
collect_register (regcache, LOONGARCH_BADV_REGNUM, *regset + LOONGARCH_BADV_REGNUM);
}
@@ -114,6 +115,7 @@ loongarch_store_gregset (struct regcache *regcache, const void *buf)
supply_register_zeroed (regcache, 0);
for (i = 1; i < 32; i++)
supply_register (regcache, i, *regset + i);
+ supply_register (regcache, LOONGARCH_ORIG_A0_REGNUM, *regset + LOONGARCH_ORIG_A0_REGNUM);
supply_register (regcache, LOONGARCH_PC_REGNUM, *regset + LOONGARCH_PC_REGNUM);
supply_register (regcache, LOONGARCH_BADV_REGNUM, *regset + LOONGARCH_BADV_REGNUM);
}