Update
[gdb.git] / gdb / dwarf2loc.h
blob22c66bd8394383f7328707e0412b7396e6df19c2
1 /* DWARF 2 location expression support for GDB.
3 Copyright (C) 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
5 This file is part of GDB.
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 3 of the License, or
10 (at your option) any later version.
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.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #if !defined (DWARF2LOC_H)
21 #define DWARF2LOC_H
23 struct symbol_ops;
25 /* This header is private to the DWARF-2 reader. It is shared between
26 dwarf2read.c and dwarf2loc.c. */
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. */
34 struct dwarf2_locexpr_baton
36 /* Pointer to the start of the location expression. */
37 gdb_byte *data;
39 /* Length of the location expression. */
40 unsigned long size;
42 /* The objfile containing the symbol whose location we're computing. */
43 struct objfile *objfile;
46 struct dwarf2_loclist_baton
48 /* The initial base address for the location list, based on the compilation
49 unit. */
50 CORE_ADDR base_address;
52 /* Pointer to the start of the location list. */
53 gdb_byte *data;
55 /* Length of the location list. */
56 unsigned long size;
58 /* The objfile containing the symbol whose location we're computing. */
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. */
63 struct objfile *objfile;
66 extern const struct symbol_ops dwarf2_locexpr_funcs;
67 extern const struct symbol_ops dwarf2_loclist_funcs;
69 #endif /* dwarf2loc.h */