* amd64-linux-tdep.c (amd64_linux_sigtramp_start): Change argument
from CORE_ADDR to struct frame_info *. Use safe_frame_unwind_memory instead of deprecated_read_memory_nobpt. (amd64_linux_sigtramp_p): Adjust for changed signature of and64_linux_sigtramp_start
This commit is contained in:
parent
277215a6d4
commit
387c058c87
|
@ -1,5 +1,11 @@
|
||||||
2004-08-22 Mark Kettenis <kettenis@gnu.org>
|
2004-08-22 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* amd64-linux-tdep.c (amd64_linux_sigtramp_start): Change argument
|
||||||
|
from CORE_ADDR to struct frame_info *. Use
|
||||||
|
safe_frame_unwind_memory instead of deprecated_read_memory_nobpt.
|
||||||
|
(amd64_linux_sigtramp_p): Adjust for changed signature of
|
||||||
|
and64_linux_sigtramp_start
|
||||||
|
|
||||||
* gdb_ptrace.h: GNU/Linux.
|
* gdb_ptrace.h: GNU/Linux.
|
||||||
|
|
||||||
* config/alpha/nm-linux.h (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE):
|
* config/alpha/nm-linux.h (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE):
|
||||||
|
|
|
@ -86,8 +86,9 @@ static const unsigned char linux_sigtramp_code[] =
|
||||||
the routine. Otherwise, return 0. */
|
the routine. Otherwise, return 0. */
|
||||||
|
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
amd64_linux_sigtramp_start (CORE_ADDR pc)
|
amd64_linux_sigtramp_start (struct frame_info *next_frame)
|
||||||
{
|
{
|
||||||
|
CORE_ADDR pc = frame_pc_unwind (next_frame);
|
||||||
unsigned char buf[LINUX_SIGTRAMP_LEN];
|
unsigned char buf[LINUX_SIGTRAMP_LEN];
|
||||||
|
|
||||||
/* We only recognize a signal trampoline if PC is at the start of
|
/* We only recognize a signal trampoline if PC is at the start of
|
||||||
|
@ -97,7 +98,7 @@ amd64_linux_sigtramp_start (CORE_ADDR pc)
|
||||||
PC is not at the start of the instruction sequence, there will be
|
PC is not at the start of the instruction sequence, there will be
|
||||||
a few trailing readable bytes on the stack. */
|
a few trailing readable bytes on the stack. */
|
||||||
|
|
||||||
if (deprecated_read_memory_nobpt (pc, (char *) buf, LINUX_SIGTRAMP_LEN) != 0)
|
if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (buf[0] != LINUX_SIGTRAMP_INSN0)
|
if (buf[0] != LINUX_SIGTRAMP_INSN0)
|
||||||
|
@ -107,7 +108,7 @@ amd64_linux_sigtramp_start (CORE_ADDR pc)
|
||||||
|
|
||||||
pc -= LINUX_SIGTRAMP_OFFSET1;
|
pc -= LINUX_SIGTRAMP_OFFSET1;
|
||||||
|
|
||||||
if (deprecated_read_memory_nobpt (pc, (char *) buf, LINUX_SIGTRAMP_LEN) != 0)
|
if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +136,7 @@ amd64_linux_sigtramp_p (struct frame_info *next_frame)
|
||||||
__sigaction, or __libc_sigaction (all aliases to the same
|
__sigaction, or __libc_sigaction (all aliases to the same
|
||||||
function). */
|
function). */
|
||||||
if (name == NULL || strstr (name, "sigaction") != NULL)
|
if (name == NULL || strstr (name, "sigaction") != NULL)
|
||||||
return (amd64_linux_sigtramp_start (pc) != 0);
|
return (amd64_linux_sigtramp_start (next_frame) != 0);
|
||||||
|
|
||||||
return (strcmp ("__restore_rt", name) == 0);
|
return (strcmp ("__restore_rt", name) == 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue