1 /* Definitions for a frame base, for GDB, the GNU debugger.
3 Copyright 2003 Free Software Foundation, Inc.
5 This file is part of GDB.
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.
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.
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., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 #if !defined (FRAME_BASE_H)
23 #define FRAME_BASE_H 1
32 /* Return the frame base methods for the function that contains PC, or
33 NULL if it can't handle this frame. */
35 typedef const struct frame_base
*(frame_base_p_ftype
) (CORE_ADDR pc
);
37 /* Add a frame base handler to the list. The predicates are polled in
38 the order that they are appended. */
40 extern void frame_base_append_predicate (struct gdbarch
*gdbarch
,
41 frame_base_p_ftype
*p
);
43 /* Set the default frame base. If all else fails, this one is
44 returned. If this isn't set, the default is to use legacy code
45 that uses things like the frame ID's base (ulgh!). */
47 extern void frame_base_set_default (struct gdbarch
*gdbarch
,
48 const struct frame_base
*def
);
50 /* Iterate through the list of frame base handlers until one returns
53 extern const struct frame_base
*frame_base_find_by_pc (struct gdbarch
*gdbarch
,
56 /* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
57 and that this is a `normal frame'; use the NEXT frame, and its
58 register unwind method, to determine the address of THIS frame's
61 The exact meaning of `base' is highly dependant on the type of the
62 debug info. It is assumed that dwarf2, stabs, ... will each
63 provide their own methods.
65 A typical implmentation will return the same value for base,
66 locals-base and args-base. That value, however, will likely be
67 different to the frame ID's stack address. */
69 /* A generic base address. */
71 typedef CORE_ADDR (frame_this_base_ftype
) (struct frame_info
*next_frame
,
72 void **this_base_cache
);
74 /* The base address of the frame's local variables. */
76 typedef CORE_ADDR (frame_this_locals_ftype
) (struct frame_info
*next_frame
,
77 void **this_base_cache
);
79 /* The base address of the frame's arguments / parameters. */
81 typedef CORE_ADDR (frame_this_args_ftype
) (struct frame_info
*next_frame
,
82 void **this_base_cache
);
86 /* If non-NULL, a low-level unwinder that shares its implementation
87 with this high-level frame-base method. */
88 const struct frame_unwind
*unwind
;
89 frame_this_base_ftype
*this_base
;
90 frame_this_locals_ftype
*this_locals
;
91 frame_this_args_ftype
*this_args
;
This page took 0.030931 seconds and 4 git commands to generate.