mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
gdb/linux-nat: use l linux_nat_get_siginfo in linux_xfer_siginfo
I noticed we could reduce duplication a bit here. Change-Id: If24e54d1dac71b46f7c1f68a18a073d4c084b644
This commit is contained in:
committed by
Simon Marchi
parent
7cc662bcb7
commit
d29ea32868
@@ -3620,10 +3620,7 @@ linux_xfer_siginfo (enum target_object object,
|
||||
if (offset > sizeof (siginfo))
|
||||
return TARGET_XFER_E_IO;
|
||||
|
||||
int pid = get_ptrace_pid (inferior_ptid);
|
||||
errno = 0;
|
||||
ptrace (PTRACE_GETSIGINFO, pid, (PTRACE_TYPE_ARG3) 0, &siginfo);
|
||||
if (errno != 0)
|
||||
if (!linux_nat_get_siginfo (inferior_ptid, &siginfo))
|
||||
return TARGET_XFER_E_IO;
|
||||
|
||||
/* When GDB is built as a 64-bit application, ptrace writes into
|
||||
@@ -3646,6 +3643,7 @@ linux_xfer_siginfo (enum target_object object,
|
||||
/* Convert back to ptrace layout before flushing it out. */
|
||||
siginfo_fixup (&siginfo, inf_siginfo, 1);
|
||||
|
||||
int pid = get_ptrace_pid (inferior_ptid);
|
||||
errno = 0;
|
||||
ptrace (PTRACE_SETSIGINFO, pid, (PTRACE_TYPE_ARG3) 0, &siginfo);
|
||||
if (errno != 0)
|
||||
|
||||
Reference in New Issue
Block a user