* inftarg.c (child_create_inferior, child_attach,
[deliverable/binutils-gdb.git] / gdb / tm-sysv4.h
1 /* Macro definitions for GDB on all SVR4 target systems.
2 Copyright (C) 1991, 1992, Free Software Foundation, Inc.
3 Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20
21 #include "solib.h" /* Support for shared libraries. */
22
23 /* For SVR4 shared libraries, each call to a library routine goes through
24 a small piece of trampoline code in the ".init" section. Although each
25 of these fragments is labeled with the name of the routine being called,
26 the gdb symbol reading code deliberately ignores them so it won't confuse
27 them with the real functions. It does however know about the label that
28 precedes all of the fragments, which is "_init". Thus when we lookup a
29 function that corresponds to a PC value which is in one of the trampoline
30 fragments, we'll appear to be in the function "_init". The following
31 macro will evaluate to nonzero when NAME is valid and matches "_init".
32 The horribly ugly wait_for_inferior() routine uses this macro to detect
33 when we have stepped into one of these fragments. */
34
35 #define IN_SOLIB_TRAMPOLINE(pc,name) ((name) && (strcmp ("_init", name) == 0))
36
37 /* In SVR4 ELF files, the ABI defines (pg. 4-25) that "External C symbols
38 have the same names in C, assembly code, and object files' symbol
39 tables." So... */
40
41 #undef NAMES_HAVE_UNDERSCORE
This page took 0.067632 seconds and 4 git commands to generate.