summaryrefslogtreecommitdiff
path: root/gdb
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:40:58 -0700
commit9e35d4996169bc7fa833e8449585d517b8ccc5f8 (patch)
treeafa821ca01adda4d19e17a02f14097512cac0f38 /gdb
parent1eba2311e1a31072538aaa7937dd4cb893aea634 (diff)
downloadbinutils-gdb-9e35d4996169bc7fa833e8449585d517b8ccc5f8.tar.gz
Remove die_reader_specs::comp_dir
die_reader_specs::comp_dir is assigned but never read; this patch removes it. gdb/ChangeLog 2020-02-08 Tom Tromey <tom@tromey.com> * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove. (init_cu_die_reader, read_cutu_die_from_dwo): Update. Change-Id: I9818a2593197a6972cddec23cd2f3dd0ce28f580
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2read.c11
2 files changed, 5 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c3e86da09c2..15a85a6e35d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2020-02-08 Tom Tromey <tom@tromey.com>
+ * dwarf2read.c (struct die_reader_specs) <comp_dir>: Remove.
+ (init_cu_die_reader, read_cutu_die_from_dwo): Update.
+
+2020-02-08 Tom Tromey <tom@tromey.com>
+
* dwarf2read.h (struct die_info): Don't declare.
2020-02-08 Tom Tromey <tom@tromey.com>
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7a9de41e7d8..05311974793 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -903,9 +903,6 @@ struct die_reader_specs
/* The end of the buffer. */
const gdb_byte *buffer_end;
- /* The value of the DW_AT_comp_dir attribute. */
- const char *comp_dir;
-
/* The abbreviation table to use when reading the DIEs. */
struct abbrev_table *abbrev_table;
};
@@ -6914,7 +6911,6 @@ init_cu_die_reader (struct die_reader_specs *reader,
reader->die_section = section;
reader->buffer = section->buffer;
reader->buffer_end = section->buffer + section->size;
- reader->comp_dir = NULL;
reader->abbrev_table = abbrev_table;
}
@@ -7096,13 +7092,6 @@ read_cutu_die_from_dwo (struct dwarf2_per_cu_data *this_cu,
dump_die (comp_unit_die, dwarf_die_debug);
}
- /* Save the comp_dir attribute. If there is no DWP file then we'll read
- TUs by skipping the stub and going directly to the entry in the DWO file.
- However, skipping the stub means we won't get DW_AT_comp_dir, so we have
- to get it via circuitous means. Blech. */
- if (comp_dir != NULL)
- result_reader->comp_dir = DW_STRING (comp_dir);
-
/* Skip dummy compilation units. */
if (info_ptr >= begin_info_ptr + dwo_unit->length
|| peek_abbrev_code (abfd, info_ptr) == 0)