OSDN Git Service

* include/getopt.h: Add HAVE_DECL_GETOPT to save pain elsewhere.
[pf3gnuchains/pf3gnuchains3x.git] / gdb / dwarf2cfi.h
1 /* Stack unwinding code based on dwarf2 frame info for GDB, the GNU debugger.
2    Copyright 2001
3    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 DWARF2CFI_H
23 #define DWARF2CFI_H
24
25 /* Return the frame address.  */
26 CORE_ADDR cfi_read_fp ();
27
28 /* Store the frame address.  */
29 void cfi_write_fp (CORE_ADDR val);
30
31 /* Restore the machine to the state it had before the current frame
32    was created.  */
33 void cfi_pop_frame (struct frame_info *);
34
35 /* Determine the address of the calling function's frame.  */
36 CORE_ADDR cfi_frame_chain (struct frame_info *fi);
37
38 /* Sets the pc of the frame.  */
39 void cfi_init_frame_pc (int fromleaf, struct frame_info *fi);
40
41 /* Initialize unwind context informations of the frame.  */
42 void cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi);
43
44 /* Obtain return address of the frame.  */
45 CORE_ADDR cfi_get_ra (struct frame_info *fi);
46
47 /* Find register number REGNUM relative to FRAME and put its
48    (raw) contents in *RAW_BUFFER.  Set *OPTIMIZED if the variable
49    was optimized out (and thus can't be fetched).  If the variable
50    was fetched from memory, set *ADDRP to where it was fetched from,
51    otherwise it was fetched from a register.
52
53    The argument RAW_BUFFER must point to aligned memory.  */
54 void cfi_get_saved_register (char *raw_buffer,
55                              int *optimized,
56                              CORE_ADDR * addrp,
57                              struct frame_info *frame,
58                              int regnum, enum lval_type *lval);
59
60 /*  Return the register that the function uses for a frame pointer,
61     plus any necessary offset to be applied to the register before
62     any frame pointer offsets.  */
63 void cfi_virtual_frame_pointer (CORE_ADDR pc, int *frame_regnum,
64                                 LONGEST * frame_offset);
65
66 #endif