This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PING][PATCH] Process record: Log %rax after syscall under amd64-linux


Previous thread:

https://sourceware.org/ml/gdb-patches/2018-05/msg00252.html

Steps to reproduce the bug (PR20300) are in this email:

https://sourceware.org/ml/gdb-patches/2018-05/msg00253.html

On Thu, May 10, 2018 at 2:28 PM, Andrew D'Addesio <modchipv12@gmail.com> wrote:
> 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(+)
>
> diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
> index 2bd3d31..917ecf5 100644
> --- a/gdb/amd64-linux-tdep.c
> +++ b/gdb/amd64-linux-tdep.c
> @@ -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))
> --
> 2.7.4
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]