X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fconfig%2Farm%2Ftm-linux.h;h=51036b663661a708aa650747aa338c1ed87264d4;hb=3fd3d7d29c5ea6ba2dff07fe353bac80fefce363;hp=27cc0d1573b72dc1a689aa9bfde8b3558e6f35e6;hpb=ed9a39ebf9f55562c7c582155f6721c3e685ce91;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/config/arm/tm-linux.h b/gdb/config/arm/tm-linux.h index 27cc0d1573..51036b6636 100644 --- a/gdb/config/arm/tm-linux.h +++ b/gdb/config/arm/tm-linux.h @@ -1,5 +1,5 @@ /* Target definitions for GNU/Linux on ARM, for GDB. - Copyright 1999 Free Software Foundation, Inc. + Copyright 1999, 2000 Free Software Foundation, Inc. This file is part of GDB. @@ -21,14 +21,18 @@ #ifndef TM_ARMLINUX_H #define TM_ARMLINUX_H +#ifdef GDBSERVER +#define ARM_GNULINUX_TARGET +#endif + /* Include the common ARM target definitions. */ #include "arm/tm-arm.h" #include "tm-linux.h" -/* Target byte order on ARM Linux is not selectable. */ -#undef TARGET_BYTE_ORDER_SELECTABLE_P -#define TARGET_BYTE_ORDER_SELECTABLE_P 0 +/* Use target-specific function to define link map offsets. */ +extern struct link_map_offsets *arm_linux_svr4_fetch_link_map_offsets (void); +#define SVR4_FETCH_LINK_MAP_OFFSETS() arm_linux_svr4_fetch_link_map_offsets () /* Under ARM Linux the traditional way of performing a breakpoint is to execute a particular software interrupt, rather than use a particular @@ -60,7 +64,23 @@ extern void arm_linux_extract_return_value (struct type *, char[], char *); #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ arm_linux_extract_return_value ((TYPE), (REGBUF), (VALBUF)) +/* Things needed for making the inferior call functions. + + FIXME: This and arm_push_arguments should be merged. However this + function breaks on a little endian host, big endian target + using the COFF file format. ELF is ok. + + ScottB. */ + +#undef PUSH_ARGUMENTS +#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \ + sp = arm_linux_push_arguments ((nargs), (args), (sp), (struct_return), \ + (struct_addr)) +extern CORE_ADDR arm_linux_push_arguments (int, struct value **, CORE_ADDR, + int, CORE_ADDR); + /* The first page is not writeable in ARM Linux. */ +#undef LOWEST_PC #define LOWEST_PC 0x8000 /* Define NO_SINGLE_STEP if ptrace(PT_STEP,...) fails to function correctly @@ -102,8 +122,8 @@ extern CORE_ADDR find_solib_trampoline_target (CORE_ADDR pc); need to skip over the dynamic linker call. This function decides when to skip, and where to skip to. See the comments for SKIP_SOLIB_RESOLVER at the top of infrun.c. */ -extern CORE_ADDR arm_skip_solib_resolver (CORE_ADDR pc); -#define SKIP_SOLIB_RESOLVER arm_skip_solib_resolver +extern CORE_ADDR arm_linux_skip_solib_resolver (CORE_ADDR pc); +#define SKIP_SOLIB_RESOLVER arm_linux_skip_solib_resolver /* When we call a function in a shared library, and the PLT sends us into the dynamic linker to find the function's real address, we @@ -119,4 +139,26 @@ extern CORE_ADDR in_svr4_dynsym_resolve_code (CORE_ADDR pc, char *name); #define IN_SOLIB_DYNSYM_RESOLVE_CODE in_svr4_dynsym_resolve_code */ #endif +/* When the ARM Linux kernel invokes a signal handler, the return + address points at a special instruction which'll trap back into + the kernel. These definitions are used to identify this bit of + code as a signal trampoline in order to support backtracing + through calls to signal handlers. */ + +int arm_linux_in_sigtramp (CORE_ADDR pc, char *name); +#define IN_SIGTRAMP(pc, name) arm_linux_in_sigtramp (pc, name) + +/* Each OS has different mechanisms for accessing the various + registers stored in the sigcontext structure. These definitions + provide a mechanism by which the generic code in arm-tdep.c can + find the addresses at which various registers are saved at in the + sigcontext structure. If SIGCONTEXT_REGISTER_ADDRESS is not + defined, arm-tdep.c will define it to be 0. (See ia64-tdep.c and + ia64-linux-tdep.c to see what a similar mechanism looks like when + multi-arched.) */ + +extern CORE_ADDR arm_linux_sigcontext_register_address (CORE_ADDR, CORE_ADDR, + int); +#define SIGCONTEXT_REGISTER_ADDRESS arm_linux_sigcontext_register_address + #endif /* TM_ARMLINUX_H */