* Makefile.in (linuw_low_h): Move higher.
[binutils-gdb.git] / gdb / dwarf2loc.h
blob76577f11fdcfc7073fdec0b3f34a3ca390609260
1 /* DWARF 2 location expression support for GDB.
3 Copyright (C) 2003, 2005, 2007, 2008, 2009 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;
24 struct objfile;
25 struct dwarf2_per_cu_data;
27 /* This header is private to the DWARF-2 reader. It is shared between
28 dwarf2read.c and dwarf2loc.c. */
30 /* Return the OBJFILE associated with the compilation unit CU. */
31 struct objfile *dwarf2_per_cu_objfile (struct dwarf2_per_cu_data *cu);
33 /* Return the address size given in the compilation unit header for CU. */
34 CORE_ADDR dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *cu);
36 /* The symbol location baton types used by the DWARF-2 reader (i.e.
37 SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct
38 dwarf2_locexpr_baton" is for a symbol with a single location
39 expression; "struct dwarf2_loclist_baton" is for a symbol with a
40 location list. */
42 struct dwarf2_locexpr_baton
44 /* Pointer to the start of the location expression. */
45 gdb_byte *data;
47 /* Length of the location expression. */
48 unsigned long size;
50 /* The compilation unit containing the symbol whose location
51 we're computing. */
52 struct dwarf2_per_cu_data *per_cu;
55 struct dwarf2_loclist_baton
57 /* The initial base address for the location list, based on the compilation
58 unit. */
59 CORE_ADDR base_address;
61 /* Pointer to the start of the location list. */
62 gdb_byte *data;
64 /* Length of the location list. */
65 unsigned long size;
67 /* The compilation unit containing the symbol whose location
68 we're computing. */
69 struct dwarf2_per_cu_data *per_cu;
72 extern const struct symbol_ops dwarf2_locexpr_funcs;
73 extern const struct symbol_ops dwarf2_loclist_funcs;
75 #endif /* dwarf2loc.h */