Process record: Log %rax after syscall under amd64-linux
Commit Message
Log the return value after executing a system call instruction, as
we do for other archs (i386-linux, arm-linux, etc.)
gdb/ChangeLog:
2018-05-10 Andrew D'Addesio <modchipv12@gmail.com>
* amd64-linux-tdep.c (amd64_linux_syscall_record_common): Record
%rax.
---
gdb/amd64-linux-tdep.c | 3 +++
1 file changed, 3 insertions(+)
Comments
Ah, I should have searched the bugzilla, as there's already a bug
report for this problem from 2016-06-25 by dev.burbrink:
<https://sourceware.org/bugzilla/show_bug.cgi?id=20300>
So maybe it would be a good idea to add PR20300 to the commit message
and ChangeLog.
Andrew
@@ -1510,6 +1510,9 @@ amd64_linux_syscall_record_common (struct regcache *regcache,
record_regs:
/* Record the return value of the system call. */
+ if (record_full_arch_list_add_reg (regcache, AMD64_RAX_REGNUM))
+ return -1;
+ /* Record registers clobbered by the 'syscall' instruction. */
if (record_full_arch_list_add_reg (regcache, AMD64_RCX_REGNUM))
return -1;
if (record_full_arch_list_add_reg (regcache, AMD64_R11_REGNUM))