parent
8605d56e7a
commit
a4b6fc86fa
|
@ -1,7 +1,9 @@
|
||||||
2002-02-24 Andrew Cagney <ac131313@redhat.com>
|
2002-02-24 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
* lin-lwp.c, thread-db.c, defs.h, cris-tdep.c: Replace ``Linux''
|
* lin-lwp.c, thread-db.c, defs.h, cris-tdep.c: Replace ``Linux''
|
||||||
with either ``GNU/Linux'' or ``Linux kernel''.
|
with either ``GNU/Linux'' or ``Linux kernel''. Update copyright.
|
||||||
|
* m68klinux-nat.c, sparc-linux-nat.c, x86-64-linux-nat.c: Ditto.
|
||||||
|
* x86-64-linux-tdep.c, gregset.h, gdb_wait.h: Ditto.
|
||||||
Fix PR gdb/378.
|
Fix PR gdb/378.
|
||||||
|
|
||||||
2002-02-23 Andrew Cagney <ac131313@redhat.com>
|
2002-02-23 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
/* The following macros are defined equivalently to their definitions
|
/* The following macros are defined equivalently to their definitions
|
||||||
in POSIX.1. We fail to define WNOHANG and WUNTRACED, which POSIX.1
|
in POSIX.1. We fail to define WNOHANG and WUNTRACED, which POSIX.1
|
||||||
<sys/wait.h> defines, since our code does not use waitpid() (but
|
<sys/wait.h> defines, since our code does not use waitpid() (but
|
||||||
NOTE exception for Linux below).
|
NOTE exception for GNU/Linux below). We also fail to declare
|
||||||
We also fail to declare wait() and waitpid(). */
|
wait() and waitpid(). */
|
||||||
|
|
||||||
#ifndef WIFEXITED
|
#ifndef WIFEXITED
|
||||||
#define WIFEXITED(w) (((w)&0377) == 0)
|
#define WIFEXITED(w) (((w)&0377) == 0)
|
||||||
|
@ -101,11 +101,9 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/* For native GNU/Linux we may use waitpid and the __WCLONE option.
|
||||||
* For native Linux we may use waitpid and the __WCLONE option.
|
<GRIPE> It is of course dangerous not to use the REAL header file...
|
||||||
* <GRIPE> It is of course dangerous not to use the REAL header file...
|
</GRIPE>. */
|
||||||
* </GRIPE>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Bits in the third argument to `waitpid'. */
|
/* Bits in the third argument to `waitpid'. */
|
||||||
#ifndef WNOHANG
|
#ifndef WNOHANG
|
||||||
|
|
|
@ -37,7 +37,7 @@ typedef GDB_FPREGSET_T gdb_fpregset_t;
|
||||||
includes integer registers and control registers. An fpregset is a
|
includes integer registers and control registers. An fpregset is a
|
||||||
data structure containing the floating point registers. These data
|
data structure containing the floating point registers. These data
|
||||||
structures were originally a part of the /proc interface, but have
|
structures were originally a part of the /proc interface, but have
|
||||||
been borrowed or copied by other GDB targets, eg. Linux. */
|
been borrowed or copied by other GDB targets, eg. GNU/Linux. */
|
||||||
|
|
||||||
/* Copy register values from the native target gregset/fpregset
|
/* Copy register values from the native target gregset/fpregset
|
||||||
into GDB's internal register cache. */
|
into GDB's internal register cache. */
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* Native-dependent code for Linux/x86.
|
/* Native-dependent code for GNU/Linux x86.
|
||||||
|
|
||||||
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -66,10 +67,10 @@ static void dummy_sse_values (void);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* The register sets used in Linux ELF core-dumps are identical to the
|
/* The register sets used in GNU/Linux ELF core-dumps are identical to
|
||||||
register sets in `struct user' that is used for a.out core-dumps,
|
the register sets in `struct user' that is used for a.out
|
||||||
and is also used by `ptrace'. The corresponding types are
|
core-dumps, and is also used by `ptrace'. The corresponding types
|
||||||
`elf_gregset_t' for the general-purpose registers (with
|
are `elf_gregset_t' for the general-purpose registers (with
|
||||||
`elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
|
`elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
|
||||||
for the floating-point registers.
|
for the floating-point registers.
|
||||||
|
|
||||||
|
@ -593,7 +594,7 @@ fetch_inferior_registers (int regno)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linux LWP ID's are process ID's. */
|
/* GNU/Linux LWP ID's are process ID's. */
|
||||||
if ((tid = TIDGET (inferior_ptid)) == 0)
|
if ((tid = TIDGET (inferior_ptid)) == 0)
|
||||||
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
||||||
|
|
||||||
|
@ -659,7 +660,7 @@ store_inferior_registers (int regno)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linux LWP ID's are process ID's. */
|
/* GNU/Linux LWP ID's are process ID's. */
|
||||||
if ((tid = TIDGET (inferior_ptid)) == 0)
|
if ((tid = TIDGET (inferior_ptid)) == 0)
|
||||||
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
||||||
|
|
||||||
|
@ -778,7 +779,7 @@ i386_linux_dr_get_status (void)
|
||||||
/* Provide registers to GDB from a core file.
|
/* Provide registers to GDB from a core file.
|
||||||
|
|
||||||
(We can't use the generic version of this function in
|
(We can't use the generic version of this function in
|
||||||
core-regset.c, because Linux has *three* different kinds of
|
core-regset.c, because GNU/Linux has *three* different kinds of
|
||||||
register set notes. core-regset.c would have to call
|
register set notes. core-regset.c would have to call
|
||||||
supply_fpxregset, which most platforms don't have.)
|
supply_fpxregset, which most platforms don't have.)
|
||||||
|
|
||||||
|
@ -791,7 +792,7 @@ i386_linux_dr_get_status (void)
|
||||||
2 --- the floating-point register set, in elf_fpregset_t format
|
2 --- the floating-point register set, in elf_fpregset_t format
|
||||||
3 --- the extended floating-point register set, in elf_fpxregset_t format
|
3 --- the extended floating-point register set, in elf_fpxregset_t format
|
||||||
|
|
||||||
REG_ADDR isn't used on Linux. */
|
REG_ADDR isn't used on GNU/Linux. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
||||||
|
@ -847,7 +848,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The instruction for a Linux system call is:
|
/* The instruction for a GNU/Linux system call is:
|
||||||
int $0x80
|
int $0x80
|
||||||
or 0xcd 0x80. */
|
or 0xcd 0x80. */
|
||||||
|
|
||||||
|
@ -935,7 +936,8 @@ child_resume (ptid_t ptid, int step, enum target_signal signal)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Register that we are able to handle Linux ELF core file formats. */
|
/* Register that we are able to handle GNU/Linux ELF core file
|
||||||
|
formats. */
|
||||||
|
|
||||||
static struct core_fns linux_elf_core_fns =
|
static struct core_fns linux_elf_core_fns =
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* Motorola m68k native support for Linux
|
/* Motorola m68k native support for GNU/Linux.
|
||||||
Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
|
|
||||||
|
Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation,
|
||||||
|
Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -445,7 +447,7 @@ fetch_inferior_registers (int regno)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linux LWP ID's are process ID's. */
|
/* GNU/Linux LWP ID's are process ID's. */
|
||||||
if ((tid = TIDGET (inferior_ptid)) == 0)
|
if ((tid = TIDGET (inferior_ptid)) == 0)
|
||||||
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
||||||
|
|
||||||
|
@ -500,7 +502,7 @@ store_inferior_registers (int regno)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Linux LWP ID's are process ID's. */
|
/* GNU/Linux LWP ID's are process ID's. */
|
||||||
if ((tid = TIDGET (inferior_ptid)) == 0)
|
if ((tid = TIDGET (inferior_ptid)) == 0)
|
||||||
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
||||||
|
|
||||||
|
@ -546,7 +548,7 @@ store_inferior_registers (int regno)
|
||||||
0 --- the general-purpose register set, in elf_gregset_t format
|
0 --- the general-purpose register set, in elf_gregset_t format
|
||||||
2 --- the floating-point register set, in elf_fpregset_t format
|
2 --- the floating-point register set, in elf_fpregset_t format
|
||||||
|
|
||||||
REG_ADDR isn't used on Linux. */
|
REG_ADDR isn't used on GNU/Linux. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
||||||
|
@ -627,7 +629,8 @@ in_sigtramp (CORE_ADDR pc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Register that we are able to handle Linux ELF core file formats. */
|
/* Register that we are able to handle GNU/Linux ELF core file
|
||||||
|
formats. */
|
||||||
|
|
||||||
static struct core_fns linux_elf_core_fns =
|
static struct core_fns linux_elf_core_fns =
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* Native-dependent code for Linux/SPARC.
|
/* Native-dependent code for GNU/Linux SPARC.
|
||||||
Copyright 2001 Free Software Foundation, Inc.
|
|
||||||
|
Copyright 2001, 2002 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Native-dependent code for Linux/x86-64.
|
/* Native-dependent code for GNU/Linux x86-64.
|
||||||
|
|
||||||
Copyright 2001, 2002 Free Software Foundation, Inc.
|
Copyright 2001, 2002 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
@ -109,8 +109,8 @@ x86_64_linux_dr_get_status (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* The register sets used in Linux ELF core-dumps are identical to the
|
/* The register sets used in GNU/Linux ELF core-dumps are identical to
|
||||||
register sets used by `ptrace'. */
|
the register sets used by `ptrace'. */
|
||||||
|
|
||||||
#define GETREGS_SUPPLIES(regno) \
|
#define GETREGS_SUPPLIES(regno) \
|
||||||
(0 <= (regno) && (regno) <= 17)
|
(0 <= (regno) && (regno) <= 17)
|
||||||
|
@ -247,7 +247,7 @@ fetch_inferior_registers (int regno)
|
||||||
{
|
{
|
||||||
int tid;
|
int tid;
|
||||||
|
|
||||||
/* Linux LWP ID's are process ID's. */
|
/* GNU/Linux LWP ID's are process ID's. */
|
||||||
if ((tid = TIDGET (inferior_ptid)) == 0)
|
if ((tid = TIDGET (inferior_ptid)) == 0)
|
||||||
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ store_inferior_registers (int regno)
|
||||||
{
|
{
|
||||||
int tid;
|
int tid;
|
||||||
|
|
||||||
/* Linux LWP ID's are process ID's. */
|
/* GNU/Linux LWP ID's are process ID's. */
|
||||||
if ((tid = TIDGET (inferior_ptid)) == 0)
|
if ((tid = TIDGET (inferior_ptid)) == 0)
|
||||||
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
|
||||||
0 --- the general-purpose register set, in elf_gregset_t format
|
0 --- the general-purpose register set, in elf_gregset_t format
|
||||||
2 --- the floating-point register set, in elf_fpregset_t format
|
2 --- the floating-point register set, in elf_fpregset_t format
|
||||||
|
|
||||||
REG_ADDR isn't used on Linux. */
|
REG_ADDR isn't used on GNU/Linux. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
||||||
|
@ -537,7 +537,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register that we are able to handle Linux ELF core file formats. */
|
/* Register that we are able to handle GNU/Linux ELF core file formats. */
|
||||||
|
|
||||||
static struct core_fns linux_elf_core_fns = {
|
static struct core_fns linux_elf_core_fns = {
|
||||||
bfd_target_elf_flavour, /* core_flavour */
|
bfd_target_elf_flavour, /* core_flavour */
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* Target-dependent code for Linux running on x86-64, for GDB.
|
/* Target-dependent code for GNU/Linux running on x86-64, for GDB.
|
||||||
Copyright 2001
|
|
||||||
Free Software Foundation, Inc.
|
Copyright 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Jiri Smid, SuSE Labs.
|
Contributed by Jiri Smid, SuSE Labs.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -71,8 +72,8 @@ x86_64_linux_sigtramp_start (CORE_ADDR pc)
|
||||||
/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
|
/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
|
||||||
#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
|
#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
|
||||||
|
|
||||||
/* Assuming FRAME is for a Linux sigtramp routine, return the address
|
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
|
||||||
of the associated sigcontext structure. */
|
address of the associated sigcontext structure. */
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
x86_64_linux_sigcontext_addr (struct frame_info *frame)
|
x86_64_linux_sigcontext_addr (struct frame_info *frame)
|
||||||
{
|
{
|
||||||
|
@ -102,8 +103,8 @@ x86_64_linux_sigcontext_addr (struct frame_info *frame)
|
||||||
/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
|
/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
|
||||||
#define LINUX_SIGCONTEXT_PC_OFFSET (136)
|
#define LINUX_SIGCONTEXT_PC_OFFSET (136)
|
||||||
|
|
||||||
/* Assuming FRAME is for a Linux sigtramp routine, return the saved
|
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
|
||||||
program counter. */
|
saved program counter. */
|
||||||
|
|
||||||
CORE_ADDR
|
CORE_ADDR
|
||||||
x86_64_linux_sigtramp_saved_pc (struct frame_info *frame)
|
x86_64_linux_sigtramp_saved_pc (struct frame_info *frame)
|
||||||
|
|
Loading…
Reference in New Issue