aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2020-02-08 13:40:54 -0700
committerTom Tromey <tom@tromey.com>2020-02-08 13:43:24 -0700
commit09ba997f323198495bcf6884dd402fa5b9cc8978 (patch)
tree5d883bb6d9ee48fc11cc6e8418582a222c3d1b63 /gdb/compile
parent96c738c02fe6cee17476fb4a904e3af3d9dff3a6 (diff)
downloadgdb-09ba997f323198495bcf6884dd402fa5b9cc8978.zip
gdb-09ba997f323198495bcf6884dd402fa5b9cc8978.tar.gz
gdb-09ba997f323198495bcf6884dd402fa5b9cc8978.tar.bz2
Add some methods to dwarf2_per_cu_data
This changes a few helper functions to be methods on dwarf2_per_cu_data. 2020-02-08 Tom Tromey <tom@tromey.com> * dwarf2/loc.c (dwarf2_find_location_expression) (dwarf_evaluate_loc_desc::get_tls_address) (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value) (rw_pieced_value, dwarf2_evaluate_loc_desc_full) (dwarf2_locexpr_baton_eval, dwarf2_evaluate_property) (dwarf2_compile_property_to_c) (dwarf2_loc_desc_get_symbol_read_needs) (dwarf2_compile_expr_to_ax, locexpr_describe_location) (locexpr_tracepoint_var_ref, locexpr_generate_c_location) (loclist_describe_location, loclist_tracepoint_var_ref) (loclist_generate_c_location): Update. * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Update. * dwarf2/loc.h (dwarf2_per_cu_objfile, dwarf2_per_cu_addr_size) (dwarf2_per_cu_ref_addr_size, dwarf2_per_cu_offset_size) (dwarf2_per_cu_text_offset, dwarf2_version): Don't declare. * dwarf2/read.c (dwarf2_per_cu_data::objfile) (dwarf2_per_cu_data::addr_size) (dwarf2_per_cu_data::ref_addr_size) (dwarf2_per_cu_data::text_offset) (dwarf2_per_cu_data::addr_type): Now methods. (per_cu_header_read_in): Make per_cu "const". (dwarf2_version): Remove. (dwarf2_per_cu_data::int_type): Now a method. (dwarf2_per_cu_data::_addr_sized_int_type): Likewise. (set_die_type, read_array_type, read_subrange_index_type) (read_tag_string_type, read_subrange_type): Update. * dwarf2/read.h (struct dwarf2_per_cu_data) <addr_size, offset_size, ref_addr_size, text_offset, addr_type, version, objfile, int_type, addr_sized_int_type>: Declare methods. Change-Id: I07a42fa26e00795352389fa7a0cc1c12997d26f7
Diffstat (limited to 'gdb/compile')
-rw-r--r--gdb/compile/compile-loc2c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c
index 636c929..06a044d 100644
--- a/gdb/compile/compile-loc2c.c
+++ b/gdb/compile/compile-loc2c.c
@@ -21,6 +21,7 @@
#include "dwarf2.h"
#include "dwarf2/expr.h"
#include "dwarf2/loc.h"
+#include "dwarf2/read.h"
#include "ui-file.h"
#include "utils.h"
#include "compile-internal.h"
@@ -718,7 +719,7 @@ do_compile_dwarf_expr_to_c (int indent, string_file *stream,
index, not an address. We don't support things like
branching between the address and the TLS op. */
if (op_ptr >= op_end || *op_ptr != DW_OP_GNU_push_tls_address)
- uoffset += dwarf2_per_cu_text_offset (per_cu);
+ uoffset += per_cu->text_offset ();
push (indent, stream, uoffset);
break;