Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: gdb/dwarf2loc.h

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/dwarf2expr.c ('k') | gdb/dwarf2loc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* DWARF 2 location expression support for GDB. 1 /* DWARF 2 location expression support for GDB.
2 2
3 Copyright (C) 2003, 2005, 2007-2012 Free Software Foundation, Inc. 3 Copyright (C) 2003, 2005, 2007-2012 Free Software Foundation, Inc.
4 4
5 This file is part of GDB. 5 This file is part of GDB.
6 6
7 This program is free software; you can redistribute it and/or modify 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 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 9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version. 10 (at your option) any later version.
11 11
12 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 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/>. */ 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 19
20 #if !defined (DWARF2LOC_H) 20 #if !defined (DWARF2LOC_H)
21 #define DWARF2LOC_H 21 #define DWARF2LOC_H
22 22
23 #include "dwarf2expr.h"
24
23 struct symbol_computed_ops; 25 struct symbol_computed_ops;
24 struct objfile; 26 struct objfile;
25 struct dwarf2_per_cu_data; 27 struct dwarf2_per_cu_data;
26 struct dwarf2_loclist_baton; 28 struct dwarf2_loclist_baton;
27 struct agent_expr; 29 struct agent_expr;
28 struct axs_value; 30 struct axs_value;
29 31
30 /* This header is private to the DWARF-2 reader. It is shared between 32 /* This header is private to the DWARF-2 reader. It is shared between
31 dwarf2read.c and dwarf2loc.c. */ 33 dwarf2read.c and dwarf2loc.c. */
32 34
33 /* `set debug entry-values' setting. */ 35 /* `set debug entry-values' setting. */
34 extern int entry_values_debug; 36 extern int entry_values_debug;
35 37
36 /* Return the OBJFILE associated with the compilation unit CU. If CU 38 /* Return the OBJFILE associated with the compilation unit CU. If CU
37 came from a separate debuginfo file, then the master objfile is 39 came from a separate debuginfo file, then the master objfile is
38 returned. */ 40 returned. */
39 struct objfile *dwarf2_per_cu_objfile (struct dwarf2_per_cu_data *cu); 41 struct objfile *dwarf2_per_cu_objfile (struct dwarf2_per_cu_data *cu);
40 42
41 /* Return the address size given in the compilation unit header for CU. */ 43 /* Return the address size given in the compilation unit header for CU. */
42 CORE_ADDR dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *cu); 44 int dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *cu);
43 45
44 /* Return the DW_FORM_ref_addr size given in the compilation unit header for 46 /* Return the DW_FORM_ref_addr size given in the compilation unit header for
45 CU. */ 47 CU. */
46 int dwarf2_per_cu_ref_addr_size (struct dwarf2_per_cu_data *cu); 48 int dwarf2_per_cu_ref_addr_size (struct dwarf2_per_cu_data *cu);
47 49
48 /* Return the offset size given in the compilation unit header for CU. */ 50 /* Return the offset size given in the compilation unit header for CU. */
49 int dwarf2_per_cu_offset_size (struct dwarf2_per_cu_data *cu); 51 int dwarf2_per_cu_offset_size (struct dwarf2_per_cu_data *cu);
50 52
51 /* Return the text offset of the CU. The returned offset comes from 53 /* Return the text offset of the CU. The returned offset comes from
52 this CU's objfile. If this objfile came from a separate debuginfo 54 this CU's objfile. If this objfile came from a separate debuginfo
53 file, then the offset may be different from the corresponding 55 file, then the offset may be different from the corresponding
54 offset in the parent objfile. */ 56 offset in the parent objfile. */
55 CORE_ADDR dwarf2_per_cu_text_offset (struct dwarf2_per_cu_data *cu); 57 CORE_ADDR dwarf2_per_cu_text_offset (struct dwarf2_per_cu_data *cu);
56 58
57 /* Find a particular location expression from a location list. */ 59 /* Find a particular location expression from a location list. */
58 const gdb_byte *dwarf2_find_location_expression 60 const gdb_byte *dwarf2_find_location_expression
59 (struct dwarf2_loclist_baton *baton, 61 (struct dwarf2_loclist_baton *baton,
60 size_t *locexpr_length, 62 size_t *locexpr_length,
61 CORE_ADDR pc); 63 CORE_ADDR pc);
62 64
63 struct dwarf2_locexpr_baton dwarf2_fetch_die_location_block 65 struct dwarf2_locexpr_baton dwarf2_fetch_die_location_block
64 (unsigned int offset, struct dwarf2_per_cu_data *per_cu, 66 (cu_offset offset_in_cu, struct dwarf2_per_cu_data *per_cu,
65 CORE_ADDR (*get_frame_pc) (void *baton), 67 CORE_ADDR (*get_frame_pc) (void *baton),
66 void *baton); 68 void *baton);
67 69
68 struct type *dwarf2_get_die_type (unsigned int die_offset, 70 struct type *dwarf2_get_die_type (cu_offset die_offset,
69 struct dwarf2_per_cu_data *per_cu); 71 struct dwarf2_per_cu_data *per_cu);
70 72
71 /* Evaluate a location description, starting at DATA and with length 73 /* Evaluate a location description, starting at DATA and with length
72 SIZE, to find the current location of variable of TYPE in the context 74 SIZE, to find the current location of variable of TYPE in the context
73 of FRAME. */ 75 of FRAME. */
74 76
75 struct value *dwarf2_evaluate_loc_desc (struct type *type, 77 struct value *dwarf2_evaluate_loc_desc (struct type *type,
76 struct frame_info *frame, 78 struct frame_info *frame,
77 const gdb_byte *data, 79 const gdb_byte *data,
78 unsigned short size, 80 unsigned short size,
79 struct dwarf2_per_cu_data *per_cu); 81 struct dwarf2_per_cu_data *per_cu);
80 82
83 CORE_ADDR dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu,
84 unsigned int addr_index);
85
81 /* The symbol location baton types used by the DWARF-2 reader (i.e. 86 /* The symbol location baton types used by the DWARF-2 reader (i.e.
82 SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct 87 SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct
83 dwarf2_locexpr_baton" is for a symbol with a single location 88 dwarf2_locexpr_baton" is for a symbol with a single location
84 expression; "struct dwarf2_loclist_baton" is for a symbol with a 89 expression; "struct dwarf2_loclist_baton" is for a symbol with a
85 location list. */ 90 location list. */
86 91
87 struct dwarf2_locexpr_baton 92 struct dwarf2_locexpr_baton
88 { 93 {
89 /* Pointer to the start of the location expression. Valid only if SIZE is 94 /* Pointer to the start of the location expression. Valid only if SIZE is
90 not zero. */ 95 not zero. */
(...skipping 16 matching lines...) Expand all
107 112
108 /* Pointer to the start of the location list. */ 113 /* Pointer to the start of the location list. */
109 const gdb_byte *data; 114 const gdb_byte *data;
110 115
111 /* Length of the location list. */ 116 /* Length of the location list. */
112 unsigned long size; 117 unsigned long size;
113 118
114 /* The compilation unit containing the symbol whose location 119 /* The compilation unit containing the symbol whose location
115 we're computing. */ 120 we're computing. */
116 struct dwarf2_per_cu_data *per_cu; 121 struct dwarf2_per_cu_data *per_cu;
122
123 /* Non-zero if the location list lives in .debug_loc.dwo.
124 The format of entries in this section are different. */
125 unsigned char from_dwo;
117 }; 126 };
118 127
119 extern const struct symbol_computed_ops dwarf2_locexpr_funcs; 128 extern const struct symbol_computed_ops dwarf2_locexpr_funcs;
120 extern const struct symbol_computed_ops dwarf2_loclist_funcs; 129 extern const struct symbol_computed_ops dwarf2_loclist_funcs;
121 130
122 /* Compile a DWARF location expression to an agent expression. 131 /* Compile a DWARF location expression to an agent expression.
123 132
124 EXPR is the agent expression we are building. 133 EXPR is the agent expression we are building.
125 LOC is the agent value we modify. 134 LOC is the agent value we modify.
126 ARCH is the architecture. 135 ARCH is the architecture.
(...skipping 26 matching lines...) Expand all
153 (GDB "next") sites. One is interested primarily in the PC field. */ 162 (GDB "next") sites. One is interested primarily in the PC field. */
154 struct call_site *call_site[1]; 163 struct call_site *call_site[1];
155 }; 164 };
156 165
157 struct call_site_stuff; 166 struct call_site_stuff;
158 extern struct call_site_chain *call_site_find_chain (struct gdbarch *gdbarch, 167 extern struct call_site_chain *call_site_find_chain (struct gdbarch *gdbarch,
159 CORE_ADDR caller_pc, 168 CORE_ADDR caller_pc,
160 CORE_ADDR callee_pc); 169 CORE_ADDR callee_pc);
161 170
162 #endif /* dwarf2loc.h */ 171 #endif /* dwarf2loc.h */
OLDNEW
« no previous file with comments | « gdb/dwarf2expr.c ('k') | gdb/dwarf2loc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698