1 /* Signal trampoline unwinder.
3 Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010, 2011
4 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
24 #include "frame.h" /* For "enum frame_type". */
28 struct trad_frame_cache
;
30 /* A trampoline consists of a small sequence of instructions placed at
31 an unspecified location in the inferior's address space. The only
32 identifying attribute of the trampoline's address is that it does
33 not fall inside an object file's section.
35 The only way to identify a trampoline is to perform a brute force
36 examination of the instructions at and around the PC.
38 This module provides a convenient interface for performing that
41 /* A trampoline descriptor. */
43 /* Magic instruction that to mark the end of the signal trampoline
44 instruction sequence. */
45 #define TRAMP_SENTINEL_INSN ((LONGEST) -1)
49 /* The trampoline's type, some a signal trampolines, some are normal
50 call-frame trampolines (aka thunks). */
51 enum frame_type frame_type
;
52 /* The trampoline's entire instruction sequence. It consists of a
53 bytes/mask pair. Search for this in the inferior at or around
54 the frame's PC. It is assumed that the PC is INSN_SIZE aligned,
55 and that each element of TRAMP contains one INSN_SIZE
56 instruction. It is also assumed that INSN[0] contains the first
57 instruction of the trampoline and hence the address of the
58 instruction matching INSN[0] is the trampoline's "func" address.
59 The instruction sequence is terminated by
60 TRAMP_SENTINEL_INSN. */
67 /* Initialize a trad-frame cache corresponding to the tramp-frame.
68 FUNC is the address of the instruction TRAMP[0] in memory. */
69 void (*init
) (const struct tramp_frame
*self
,
70 struct frame_info
*this_frame
,
71 struct trad_frame_cache
*this_cache
,
75 void tramp_frame_prepend_unwinder (struct gdbarch
*gdbarch
,
76 const struct tramp_frame
*tramp
);
This page took 0.031994 seconds and 4 git commands to generate.