1b725ae77Skettenis /* Target definitions for GNU/Linux on ARM, for GDB. 2b725ae77Skettenis Copyright 1999, 2000 Free Software Foundation, Inc. 3b725ae77Skettenis 4b725ae77Skettenis This file is part of GDB. 5b725ae77Skettenis 6b725ae77Skettenis This program is free software; you can redistribute it and/or modify 7b725ae77Skettenis it under the terms of the GNU General Public License as published by 8b725ae77Skettenis the Free Software Foundation; either version 2 of the License, or 9b725ae77Skettenis (at your option) any later version. 10b725ae77Skettenis 11b725ae77Skettenis This program is distributed in the hope that it will be useful, 12b725ae77Skettenis but WITHOUT ANY WARRANTY; without even the implied warranty of 13b725ae77Skettenis MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14b725ae77Skettenis GNU General Public License for more details. 15b725ae77Skettenis 16b725ae77Skettenis You should have received a copy of the GNU General Public License 17b725ae77Skettenis along with this program; if not, write to the Free Software 18b725ae77Skettenis Foundation, Inc., 59 Temple Place - Suite 330, 19b725ae77Skettenis Boston, MA 02111-1307, USA. */ 20b725ae77Skettenis 21b725ae77Skettenis #ifndef TM_ARMLINUX_H 22b725ae77Skettenis #define TM_ARMLINUX_H 23b725ae77Skettenis 24b725ae77Skettenis /* Include the common ARM target definitions. */ 25b725ae77Skettenis #include "arm/tm-arm.h" 26b725ae77Skettenis 27b725ae77Skettenis #include "config/tm-linux.h" 28b725ae77Skettenis 29b725ae77Skettenis /* We've multi-arched this. */ 30b725ae77Skettenis #undef IN_SOLIB_CALL_TRAMPOLINE 31b725ae77Skettenis 32b725ae77Skettenis /* On ARM GNU/Linux, a call to a library routine does not have to go 33b725ae77Skettenis through any trampoline code. */ 34b725ae77Skettenis #define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) 0 35b725ae77Skettenis 36b725ae77Skettenis /* We've multi-arched this. */ 37b725ae77Skettenis #undef SKIP_TRAMPOLINE_CODE 38b725ae77Skettenis 39b725ae77Skettenis /* When we call a function in a shared library, and the PLT sends us 40b725ae77Skettenis into the dynamic linker to find the function's real address, we 41b725ae77Skettenis need to skip over the dynamic linker call. This function decides 42b725ae77Skettenis when to skip, and where to skip to. See the comments for 43b725ae77Skettenis SKIP_SOLIB_RESOLVER at the top of infrun.c. */ 44b725ae77Skettenis #if 0 45b725ae77Skettenis #undef IN_SOLIB_DYNSYM_RESOLVE_CODE 46b725ae77Skettenis extern CORE_ADDR arm_in_solib_dynsym_resolve_code (CORE_ADDR pc, char *name); 47b725ae77Skettenis #define IN_SOLIB_DYNSYM_RESOLVE_CODE arm_in_solib_dynsym_resolve_code 48b725ae77Skettenis /* ScottB: Current definition is 49b725ae77Skettenis extern CORE_ADDR in_svr4_dynsym_resolve_code (CORE_ADDR pc, char *name); 50b725ae77Skettenis #define IN_SOLIB_DYNSYM_RESOLVE_CODE in_svr4_dynsym_resolve_code */ 51b725ae77Skettenis #endif 52b725ae77Skettenis 53b725ae77Skettenis /* When the ARM Linux kernel invokes a signal handler, the return 54b725ae77Skettenis address points at a special instruction which'll trap back into 55b725ae77Skettenis the kernel. These definitions are used to identify this bit of 56b725ae77Skettenis code as a signal trampoline in order to support backtracing 57b725ae77Skettenis through calls to signal handlers. */ 58b725ae77Skettenis 59b725ae77Skettenis int arm_linux_in_sigtramp (CORE_ADDR pc, char *name); 60*11efff7fSkettenis #define DEPRECATED_IN_SIGTRAMP(pc, name) arm_linux_in_sigtramp (pc, name) 61b725ae77Skettenis 62b725ae77Skettenis /* Each OS has different mechanisms for accessing the various 63b725ae77Skettenis registers stored in the sigcontext structure. These definitions 64b725ae77Skettenis provide a mechanism by which the generic code in arm-tdep.c can 65b725ae77Skettenis find the addresses at which various registers are saved at in the 66b725ae77Skettenis sigcontext structure. If SIGCONTEXT_REGISTER_ADDRESS is not 67b725ae77Skettenis defined, arm-tdep.c will define it to be 0. (See ia64-tdep.c and 68b725ae77Skettenis ia64-linux-tdep.c to see what a similar mechanism looks like when 69b725ae77Skettenis multi-arched.) */ 70b725ae77Skettenis 71b725ae77Skettenis extern CORE_ADDR arm_linux_sigcontext_register_address (CORE_ADDR, CORE_ADDR, 72b725ae77Skettenis int); 73b725ae77Skettenis #define SIGCONTEXT_REGISTER_ADDRESS arm_linux_sigcontext_register_address 74b725ae77Skettenis 75b725ae77Skettenis #endif /* TM_ARMLINUX_H */ 76