1130812Smarcel/* Macro definitions for GDB on all SVR4 target systems.
2130812Smarcel   Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2000
3130812Smarcel   Free Software Foundation, Inc.
4130812Smarcel   Written by Fred Fish at Cygnus Support (fnf@cygnus.com).
5130812Smarcel
6130812Smarcel   This file is part of GDB.
7130812Smarcel
8130812Smarcel   This program is free software; you can redistribute it and/or modify
9130812Smarcel   it under the terms of the GNU General Public License as published by
10130812Smarcel   the Free Software Foundation; either version 2 of the License, or
11130812Smarcel   (at your option) any later version.
12130812Smarcel
13130812Smarcel   This program is distributed in the hope that it will be useful,
14130812Smarcel   but WITHOUT ANY WARRANTY; without even the implied warranty of
15130812Smarcel   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16130812Smarcel   GNU General Public License for more details.
17130812Smarcel
18130812Smarcel   You should have received a copy of the GNU General Public License
19130812Smarcel   along with this program; if not, write to the Free Software
20130812Smarcel   Foundation, Inc., 59 Temple Place - Suite 330,
21130812Smarcel   Boston, MA 02111-1307, USA.  */
22130812Smarcel
23130812Smarcel/* For SVR4 shared libraries, each call to a library routine goes through
24130812Smarcel   a small piece of trampoline code in the ".plt" section.
25130812Smarcel   The horribly ugly wait_for_inferior() routine uses this macro to detect
26130812Smarcel   when we have stepped into one of these fragments.
27130812Smarcel   We do not use lookup_solib_trampoline_symbol_by_pc, because
28130812Smarcel   we cannot always find the shared library trampoline symbols
29130812Smarcel   (e.g. on Irix5).  */
30130812Smarcel
31130812Smarcel#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) in_plt_section((pc), (name))
32130812Smarcelextern int in_plt_section (CORE_ADDR, char *);
33130812Smarcel
34130812Smarcel/* If PC is in a shared library trampoline code, return the PC
35130812Smarcel   where the function itself actually starts.  If not, return 0.  */
36130812Smarcel
37130812Smarcel#define SKIP_TRAMPOLINE_CODE(pc)  find_solib_trampoline_target (pc)
38