Commit | Line | Data |
---|---|---|
852483bc MK |
1 | /* DWARF 2 location expression support for GDB. |
2 | ||
9b254dd1 | 3 | Copyright (C) 2003, 2005, 2007, 2008 Free Software Foundation, Inc. |
4c2df51b DJ |
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 | |
a9762ec7 | 9 | the Free Software Foundation; either version 3 of the License, or |
4c2df51b DJ |
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 | |
a9762ec7 | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
4c2df51b DJ |
19 | |
20 | #if !defined (DWARF2LOC_H) | |
21 | #define DWARF2LOC_H | |
22 | ||
a67af2b9 AC |
23 | struct symbol_ops; |
24 | ||
4c2df51b DJ |
25 | /* This header is private to the DWARF-2 reader. It is shared between |
26 | dwarf2read.c and dwarf2loc.c. */ | |
27 | ||
0d53c4c4 DJ |
28 | /* The symbol location baton types used by the DWARF-2 reader (i.e. |
29 | SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct | |
30 | dwarf2_locexpr_baton" is for a symbol with a single location | |
31 | expression; "struct dwarf2_loclist_baton" is for a symbol with a | |
32 | location list. */ | |
4c2df51b DJ |
33 | |
34 | struct dwarf2_locexpr_baton | |
35 | { | |
0d53c4c4 | 36 | /* Pointer to the start of the location expression. */ |
852483bc | 37 | gdb_byte *data; |
0d53c4c4 DJ |
38 | |
39 | /* Length of the location expression. */ | |
607269ae | 40 | unsigned long size; |
0d53c4c4 DJ |
41 | |
42 | /* The objfile containing the symbol whose location we're computing. */ | |
43 | struct objfile *objfile; | |
44 | }; | |
45 | ||
46 | struct dwarf2_loclist_baton | |
47 | { | |
48 | /* The initial base address for the location list, based on the compilation | |
49 | unit. */ | |
50 | CORE_ADDR base_address; | |
51 | ||
52 | /* Pointer to the start of the location list. */ | |
852483bc | 53 | gdb_byte *data; |
0d53c4c4 DJ |
54 | |
55 | /* Length of the location list. */ | |
607269ae | 56 | unsigned long size; |
0d53c4c4 DJ |
57 | |
58 | /* The objfile containing the symbol whose location we're computing. */ | |
c3228f12 EZ |
59 | /* Used (only???) by thread local variables. The objfile in which |
60 | this symbol is defined. To find a thread-local variable (e.g., a | |
61 | variable declared with the `__thread' storage class), we may need | |
62 | to know which object file it's in. */ | |
4c2df51b DJ |
63 | struct objfile *objfile; |
64 | }; | |
65 | ||
a67af2b9 AC |
66 | extern const struct symbol_ops dwarf2_locexpr_funcs; |
67 | extern const struct symbol_ops dwarf2_loclist_funcs; | |
4c2df51b | 68 | |
852483bc | 69 | #endif /* dwarf2loc.h */ |