]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/dwarf2loc.h
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / dwarf2loc.h
1 /* DWARF 2 location expression support for GDB.
2
3 Copyright (C) 2003, 2005, 2007 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., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. */
21
22 #if !defined (DWARF2LOC_H)
23 #define DWARF2LOC_H
24
25 struct symbol_ops;
26
27 /* This header is private to the DWARF-2 reader. It is shared between
28 dwarf2read.c and dwarf2loc.c. */
29
30 /* The symbol location baton types used by the DWARF-2 reader (i.e.
31 SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct
32 dwarf2_locexpr_baton" is for a symbol with a single location
33 expression; "struct dwarf2_loclist_baton" is for a symbol with a
34 location list. */
35
36 struct dwarf2_locexpr_baton
37 {
38 /* Pointer to the start of the location expression. */
39 gdb_byte *data;
40
41 /* Length of the location expression. */
42 unsigned short size;
43
44 /* The objfile containing the symbol whose location we're computing. */
45 struct objfile *objfile;
46 };
47
48 struct dwarf2_loclist_baton
49 {
50 /* The initial base address for the location list, based on the compilation
51 unit. */
52 CORE_ADDR base_address;
53
54 /* Pointer to the start of the location list. */
55 gdb_byte *data;
56
57 /* Length of the location list. */
58 unsigned short size;
59
60 /* The objfile containing the symbol whose location we're computing. */
61 /* Used (only???) by thread local variables. The objfile in which
62 this symbol is defined. To find a thread-local variable (e.g., a
63 variable declared with the `__thread' storage class), we may need
64 to know which object file it's in. */
65 struct objfile *objfile;
66 };
67
68 extern const struct symbol_ops dwarf2_locexpr_funcs;
69 extern const struct symbol_ops dwarf2_loclist_funcs;
70
71 #endif /* dwarf2loc.h */