From fdf39c9a14a48d065b90eddcb449b3970eba23d7 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Tue, 19 Feb 2002 14:29:00 +0000 Subject: [PATCH] * arm-linux-nat.c: Linux -> GNU/Linux when not talking about the kernel. * arm-linux-tdep.c: Likewise. * config/arm/tm-linux.h: Likewise. --- gdb/ChangeLog | 7 +++++++ gdb/arm-linux-nat.c | 12 ++++++------ gdb/arm-linux-tdep.c | 34 ++++++++++++++++++---------------- gdb/config/arm/tm-linux.h | 26 ++++++++++++++------------ 4 files changed, 45 insertions(+), 34 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e3c130f..8b8c761 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2002-02-19 Richard Earnshaw + * arm-linux-nat.c: Linux -> GNU/Linux when not talking about the + kernel. + * arm-linux-tdep.c: Likewise. + * config/arm/tm-linux.h: Likewise. + +2002-02-19 Richard Earnshaw + * configure.tgt (arm*-*-netbsd*): This variant is now fully multi-arch. * config/arm/nbsd.mt (TM_FILE): Delete. * config/arm/tm-nbsd.h: Delete. diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c index c8a1ddf..66b8890 100644 --- a/gdb/arm-linux-nat.c +++ b/gdb/arm-linux-nat.c @@ -63,9 +63,9 @@ typedef struct tagFPA11 FPA11; /* The following variables are used to determine the version of the - underlying Linux operating system. Examples: + underlying GNU/Linux operating system. Examples: - Linux 2.0.35 Linux 2.2.12 + GNU/Linux 2.0.35 GNU/Linux 2.2.12 os_version = 0x00020023 os_version = 0x0002020c os_major = 2 os_major = 2 os_minor = 0 os_minor = 2 @@ -78,11 +78,11 @@ FPA11; static unsigned int os_version, os_major, os_minor, os_release; -/* On Linux, threads are implemented as pseudo-processes, in which +/* On GNU/Linux, threads are implemented as pseudo-processes, in which case we may be tracing more than one process at a time. In that case, inferior_ptid will contain the main process ID and the - individual thread (process) ID. get_thread_id () is used to - get the thread id if it's available, and the process id otherwise. */ + individual thread (process) ID. get_thread_id () is used to get + the thread id if it's available, and the process id otherwise. */ int get_thread_id (ptid_t ptid) @@ -676,7 +676,7 @@ get_linux_version (unsigned int *vmajor, if (-1 == uname (&info)) { - warning ("Unable to determine Linux version."); + warning ("Unable to determine GNU/Linux version."); return -1; } diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 6faa4a2..145adbd 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -35,12 +35,13 @@ #include "symfile.h" #include "objfiles.h" -/* Under ARM Linux the traditional way of performing a breakpoint is to - execute a particular software interrupt, rather than use a particular - undefined instruction to provoke a trap. Upon exection of the software - interrupt the kernel stops the inferior with a SIGTRAP, and wakes the - debugger. Since ARM Linux is little endian, and doesn't support Thumb - at the moment we only override the ARM little-endian breakpoint. */ +/* Under ARM GNU/Linux the traditional way of performing a breakpoint + is to execute a particular software interrupt, rather than use a + particular undefined instruction to provoke a trap. Upon exection + of the software interrupt the kernel stops the inferior with a + SIGTRAP, and wakes the debugger. Since ARM GNU/Linux is little + endian, and doesn't support Thumb at the moment we only override + the ARM little-endian breakpoint. */ static const char arm_linux_arm_le_breakpoint[] = {0x01,0x00,0x9f,0xef}; @@ -72,7 +73,7 @@ arm_linux_extract_return_value (struct type *type, char *valbuf) { /* ScottB: This needs to be looked at to handle the different - floating point emulators on ARM Linux. Right now the code + floating point emulators on ARM GNU/Linux. Right now the code assumes that fetch inferior registers does the right thing for GDB. I suspect this won't handle NWFPE registers correctly, nor will the default ARM version (arm_extract_return_value()). */ @@ -223,8 +224,8 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp, } /* - Dynamic Linking on ARM Linux - ---------------------------- + Dynamic Linking on ARM GNU/Linux + -------------------------------- Note: PLT = procedure linkage table GOT = global offset table @@ -251,11 +252,11 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp, When the executable or library is first loaded, each GOT entry is initialized to point to the code which implements dynamic name resolution and code finding. This is normally a function in the - program interpreter (on ARM Linux this is usually ld-linux.so.2, - but it does not have to be). On the first invocation, the function - is located and the GOT entry is replaced with the real function - address. Subsequent calls go through steps 1, 2 and 3 and end up - calling the real code. + program interpreter (on ARM GNU/Linux this is usually + ld-linux.so.2, but it does not have to be). On the first + invocation, the function is located and the GOT entry is replaced + with the real function address. Subsequent calls go through steps + 1, 2 and 3 and end up calling the real code. 1) In the code: @@ -388,7 +389,7 @@ skip_hurd_resolver (CORE_ADDR pc) It's kind of gross to do all these checks every time we're called, since they don't change once the executable has gotten started. But this is only a temporary hack --- upcoming versions - of Linux will provide a portable, efficient interface for + of GNU/Linux will provide a portable, efficient interface for debugging programs that use shared libraries. */ struct objfile *objfile; @@ -469,7 +470,8 @@ arm_linux_sigcontext_register_address (CORE_ADDR sp, CORE_ADDR pc, int regno) inst = read_memory_integer (pc, 4); - if (inst == ARM_LINUX_SIGRETURN_INSTR || inst == ARM_LINUX_RT_SIGRETURN_INSTR) + if (inst == ARM_LINUX_SIGRETURN_INSTR + || inst == ARM_LINUX_RT_SIGRETURN_INSTR) { CORE_ADDR sigcontext_addr; diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h index 11de4fa..9b73816 100644 --- a/gdb/config/arm/tm-linux.h +++ b/gdb/config/arm/tm-linux.h @@ -63,29 +63,31 @@ extern void arm_linux_extract_return_value (struct type *, char[], char *); extern CORE_ADDR arm_linux_push_arguments (int, struct value **, CORE_ADDR, int, CORE_ADDR); -/* The first page is not writeable in ARM Linux. */ +/* The first page is not writeable in ARM GNU/Linux. */ #undef LOWEST_PC #define LOWEST_PC 0x8000 -/* Define NO_SINGLE_STEP if ptrace(PT_STEP,...) fails to function correctly - on ARM Linux. This is the case on 2.0.x kernels, 2.1.x kernels and some - 2.2.x kernels. This will include the implementation of single_step() - in armlinux-tdep.c. See armlinux-ss.c for more details. */ +/* Define NO_SINGLE_STEP if ptrace(PT_STEP,...) fails to function + correctly on ARM Linux kernel. This is the case on 2.0.x kernels, + 2.1.x kernels and some 2.2.x kernels. This will include the + implementation of single_step() in armlinux-tdep.c. See + armlinux-ss.c for more details. */ /* #define NO_SINGLE_STEP 1 */ /* Offset to saved PC in sigcontext structure, from */ #define SIGCONTEXT_PC_OFFSET (sizeof(unsigned long) * 18) -/* On ARM Linux, each call to a library routine goes through a small piece - of trampoline code in the ".plt" section. The wait_for_inferior() - routine uses this macro to detect when we have stepped into one of - these fragments. We do not use lookup_solib_trampoline_symbol_by_pc, - because we cannot always find the shared library trampoline symbols. */ +/* On ARM GNU/Linux, each call to a library routine goes through a + small piece of trampoline code in the ".plt" section. The + wait_for_inferior() routine uses this macro to detect when we have + stepped into one of these fragments. We do not use + lookup_solib_trampoline_symbol_by_pc, because we cannot always find + the shared library trampoline symbols. */ extern int in_plt_section (CORE_ADDR, char *); #define IN_SOLIB_CALL_TRAMPOLINE(pc, name) in_plt_section((pc), (name)) -/* On ARM Linux, a call to a library routine does not have to go through - any trampoline code. */ +/* On ARM GNU/Linux, a call to a library routine does not have to go + through any trampoline code. */ #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) 0 /* If PC is in a shared library trampoline code, return the PC -- 2.7.4