gdb
[deliverable/binutils-gdb.git] / gdb / dwarf2loc.h
CommitLineData
852483bc
MK
1/* DWARF 2 location expression support for GDB.
2
0fb0cc75 3 Copyright (C) 2003, 2005, 2007, 2008, 2009 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 23struct symbol_ops;
ae0d2f24
UW
24struct objfile;
25struct dwarf2_per_cu_data;
a67af2b9 26
4c2df51b
DJ
27/* This header is private to the DWARF-2 reader. It is shared between
28 dwarf2read.c and dwarf2loc.c. */
29
ae0d2f24
UW
30/* Return the OBJFILE associated with the compilation unit CU. */
31struct objfile *dwarf2_per_cu_objfile (struct dwarf2_per_cu_data *cu);
32
33/* Return the address size given in the compilation unit header for CU. */
34CORE_ADDR dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *cu);
35
0d53c4c4
DJ
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. */
4c2df51b
DJ
41
42struct dwarf2_locexpr_baton
43{
0d53c4c4 44 /* Pointer to the start of the location expression. */
852483bc 45 gdb_byte *data;
0d53c4c4
DJ
46
47 /* Length of the location expression. */
607269ae 48 unsigned long size;
0d53c4c4 49
ae0d2f24
UW
50 /* The compilation unit containing the symbol whose location
51 we're computing. */
52 struct dwarf2_per_cu_data *per_cu;
0d53c4c4
DJ
53};
54
55struct dwarf2_loclist_baton
56{
57 /* The initial base address for the location list, based on the compilation
58 unit. */
59 CORE_ADDR base_address;
60
61 /* Pointer to the start of the location list. */
852483bc 62 gdb_byte *data;
0d53c4c4
DJ
63
64 /* Length of the location list. */
607269ae 65 unsigned long size;
0d53c4c4 66
ae0d2f24
UW
67 /* The compilation unit containing the symbol whose location
68 we're computing. */
69 struct dwarf2_per_cu_data *per_cu;
4c2df51b
DJ
70};
71
a67af2b9
AC
72extern const struct symbol_ops dwarf2_locexpr_funcs;
73extern const struct symbol_ops dwarf2_loclist_funcs;
4c2df51b 74
852483bc 75#endif /* dwarf2loc.h */
This page took 0.426057 seconds and 4 git commands to generate.