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 /* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
33 and that this is a `normal frame'; use the NEXT frame, and its
34 register unwind method, to determine the address of THIS frame's
37 The exact meaning of `base' is highly dependant on the type of the
38 debug info. It is assumed that dwarf2, stabs, ... will each
39 provide their own methods.
41 A typical implmentation will return the same value for base,
42 locals-base and args-base. That value, however, will likely be
43 different to the frame ID's stack address. */
45 /* A generic base address. */
47 typedef CORE_ADDR (frame_this_base_ftype
) (struct frame_info
*next_frame
,
48 void **this_base_cache
);
50 /* The base address of the frame's local variables. */
52 typedef CORE_ADDR (frame_this_locals_ftype
) (struct frame_info
*next_frame
,
53 void **this_base_cache
);
55 /* The base address of the frame's arguments / parameters. */
57 typedef CORE_ADDR (frame_this_args_ftype
) (struct frame_info
*next_frame
,
58 void **this_base_cache
);
62 /* If non-NULL, a low-level unwinder that shares its implementation
63 with this high-level frame-base method. */
64 const struct frame_unwind
*unwind
;
65 frame_this_base_ftype
*this_base
;
66 frame_this_locals_ftype
*this_locals
;
67 frame_this_args_ftype
*this_args
;
70 /* Given the NEXT frame, return the frame base methods for THIS frame,
71 or NULL if it can't handle THIS frame. */
73 typedef const struct frame_base
*(frame_base_sniffer_ftype
) (struct frame_info
*next_frame
);
75 /* Append a frame base sniffer to the list. The sniffers are polled
76 in the order that they are appended. */
78 extern void frame_base_append_sniffer (struct gdbarch
*gdbarch
,
79 frame_base_sniffer_ftype
*sniffer
);
81 /* Set the default frame base. If all else fails, this one is
82 returned. If this isn't set, the default is to use legacy code
83 that uses things like the frame ID's base (ulgh!). */
85 extern void frame_base_set_default (struct gdbarch
*gdbarch
,
86 const struct frame_base
*def
);
88 /* Iterate through the list of frame base handlers until one returns
91 extern const struct frame_base
*frame_base_find_by_frame (struct frame_info
*next_frame
);
This page took 0.033012 seconds and 4 git commands to generate.