]>
Commit | Line | Data |
---|---|---|
4c2df51b DJ |
1 | /* Dwarf2 location expression support for GDB. |
2 | Copyright 2003 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GDB. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
20 | ||
21 | #if !defined (DWARF2LOC_H) | |
22 | #define DWARF2LOC_H | |
23 | ||
a67af2b9 AC |
24 | struct symbol_ops; |
25 | ||
4c2df51b DJ |
26 | /* This header is private to the DWARF-2 reader. It is shared between |
27 | dwarf2read.c and dwarf2loc.c. */ | |
28 | ||
0d53c4c4 DJ |
29 | /* The symbol location baton types used by the DWARF-2 reader (i.e. |
30 | SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct | |
31 | dwarf2_locexpr_baton" is for a symbol with a single location | |
32 | expression; "struct dwarf2_loclist_baton" is for a symbol with a | |
33 | location list. */ | |
4c2df51b DJ |
34 | |
35 | struct dwarf2_locexpr_baton | |
36 | { | |
0d53c4c4 | 37 | /* Pointer to the start of the location expression. */ |
4c2df51b | 38 | unsigned char *data; |
0d53c4c4 DJ |
39 | |
40 | /* Length of the location expression. */ | |
4c2df51b | 41 | unsigned short size; |
0d53c4c4 DJ |
42 | |
43 | /* The objfile containing the symbol whose location we're computing. */ | |
44 | struct objfile *objfile; | |
45 | }; | |
46 | ||
47 | struct dwarf2_loclist_baton | |
48 | { | |
49 | /* The initial base address for the location list, based on the compilation | |
50 | unit. */ | |
51 | CORE_ADDR base_address; | |
52 | ||
53 | /* Pointer to the start of the location list. */ | |
54 | unsigned char *data; | |
55 | ||
56 | /* Length of the location list. */ | |
57 | unsigned short size; | |
58 | ||
59 | /* The objfile containing the symbol whose location we're computing. */ | |
c3228f12 EZ |
60 | /* Used (only???) by thread local variables. The objfile in which |
61 | this symbol is defined. To find a thread-local variable (e.g., a | |
62 | variable declared with the `__thread' storage class), we may need | |
63 | to know which object file it's in. */ | |
4c2df51b DJ |
64 | struct objfile *objfile; |
65 | }; | |
66 | ||
a67af2b9 AC |
67 | extern const struct symbol_ops dwarf2_locexpr_funcs; |
68 | extern const struct symbol_ops dwarf2_loclist_funcs; | |
4c2df51b DJ |
69 | |
70 | #endif |