2003-06-17 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / trad-frame.h
CommitLineData
a0f267c7
AC
1/* Traditional frame unwind support, for GDB the GNU Debugger.
2
3 Copyright 2003 Free Software Foundation, Inc.
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., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21
22#ifndef TRAD_FRAME_H
23#define TRAD_FRAME_H
24
2cdf3c63
AC
25struct frame_info;
26
8983bd83
AC
27/* A traditional saved regs table, indexed by REGNUM, encoding where
28 the value of REGNUM for the previous frame can be found in this
29 frame.
30
31 The table is initialized with an identity encoding (ADDR == 0,
32 REALNUM == REGNUM) indicating that the value of REGNUM in the
33 previous frame can be found in register REGNUM (== REALNUM) in this
34 frame.
35
36 The initial encoding can then be changed:
37
38 Modify ADDR (REALNUM >= 0, ADDR != 0) to indicate that the value of
39 register REGNUM in the previous frame can be found in memory at
40 ADDR in this frame.
41
42 Modify REALNUM (REALNUM >= 0, ADDR == 0) to indicate that the value
43 of register REGNUM in the previous frame is found in register
44 REALNUM in this frame.
45
46 Call trad_frame_register_value (REALNUM < 0) to indicate that the
47 value of register REGNUM in the previous frame is found in ADDR. */
48
49struct trad_frame_saved_reg
a0f267c7 50{
8983bd83
AC
51 LONGEST addr; /* A CORE_ADDR fits in a longest. */
52 int realnum;
a0f267c7
AC
53};
54
8983bd83
AC
55/* Convenience function, encode REGNUM's location in the trad-frame. */
56void trad_frame_register_value (struct trad_frame_saved_reg this_saved_regs[],
a0f267c7
AC
57 int regnum, LONGEST val);
58
59/* Return a freshly allocated (and initialized) trad_frame array. */
8983bd83 60struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct frame_info *next_frame);
a0f267c7
AC
61
62/* Given the trad_frame info, return the location of the specified
63 register. */
64void trad_frame_prev_register (struct frame_info *next_frame,
8983bd83 65 struct trad_frame_saved_reg this_saved_regs[],
a0f267c7
AC
66 int regnum, int *optimizedp,
67 enum lval_type *lvalp, CORE_ADDR *addrp,
68 int *realnump, void *bufferp);
69
70#endif
This page took 0.031178 seconds and 4 git commands to generate.