/* Native-dependent code for GNU/Linux i386.
- Copyright (C) 1999-2020 Free Software Foundation, Inc.
+ Copyright (C) 1999-2023 Free Software Foundation, Inc.
This file is part of GDB.
if (errno == EIO)
{
/* The kernel we're running on doesn't support the GETREGS
- request. Reset `have_ptrace_getregs'. */
+ request. Reset `have_ptrace_getregs'. */
have_ptrace_getregs = 0;
return;
}
return;
}
- internal_error (__FILE__, __LINE__,
- _("Got request for bad register number %d."), regno);
+ internal_error (_("Got request for bad register number %d."), regno);
}
/* Store register REGNO back into the child process. If REGNO is -1,
return;
}
- internal_error (__FILE__, __LINE__,
- _("Got request to store bad register number %d."), regno);
+ internal_error (_("Got request to store bad register number %d."), regno);
}
\f
if (step)
{
- struct regcache *regcache = get_thread_regcache (ptid);
+ struct regcache *regcache = get_thread_regcache (this, ptid);
struct gdbarch *gdbarch = regcache->arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
ULONGEST pc;
gdbarch_pc_regnum (gdbarch), &pc);
/* Returning from a signal trampoline is done by calling a
- special system call (sigreturn or rt_sigreturn, see
- i386-linux-tdep.c for more information). This system call
- restores the registers that were saved when the signal was
- raised, including %eflags. That means that single-stepping
- won't work. Instead, we'll have to modify the signal context
- that's about to be restored, and set the trace flag there. */
+ special system call (sigreturn or rt_sigreturn, see
+ i386-linux-tdep.c for more information). This system call
+ restores the registers that were saved when the signal was
+ raised, including %eflags. That means that single-stepping
+ won't work. Instead, we'll have to modify the signal context
+ that's about to be restored, and set the trace flag there. */
/* First check if PC is at a system call. */
if (target_read_memory (pc, buf, LINUX_SYSCALL_LEN) == 0
addr = sp;
/* Set the trace flag in the context that's about to be
- restored. */
+ restored. */
addr += LINUX_SIGCONTEXT_EFLAGS_OFFSET;
read_memory (addr, (gdb_byte *) &eflags, 4);
eflags |= 0x0100;
perror_with_name (("ptrace"));
}
+void _initialize_i386_linux_nat ();
void
-_initialize_i386_linux_nat (void)
+_initialize_i386_linux_nat ()
{
linux_target = &the_i386_linux_nat_target;