aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2025-02-17 14:59:35 -0500
committerSimon Marchi <simon.marchi@efficios.com>2025-02-19 11:14:41 -0500
commit8af6d60eb9714201c663117169ef4b6ab5b0582b (patch)
tree9ef161f4c8c0ed5f76c05eb8e1d574920c19d299 /gdb
parentc44ab627b02104286f437e134bcd592696fa7652 (diff)
downloadbinutils-8af6d60eb9714201c663117169ef4b6ab5b0582b.zip
binutils-8af6d60eb9714201c663117169ef4b6ab5b0582b.tar.gz
binutils-8af6d60eb9714201c663117169ef4b6ab5b0582b.tar.bz2
gdb/dwarf: set is_debug_types in signatured_type constructor
This makes it more obvious that all created signatured_type objects have this flag set. Also, remove an unnecessary assignment in create_cus_hash_table: when constructing the dwarf2_per_cu_data object, is_debug_types is already initialized to 0/false. Change-Id: I6d28b17ac77edc040172254f6970d05ebc4a47f4 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb')
-rw-r--r--gdb/dwarf2/read.c2
-rw-r--r--gdb/dwarf2/read.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index de932a8..e5bb4e2 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1835,7 +1835,6 @@ dwarf2_per_bfd::allocate_signatured_type (dwarf2_section_info *section,
auto result
= std::make_unique<signatured_type> (this, section, sect_off, signature);
result->index = all_units.size ();
- result->is_debug_types = true;
tu_stats.nr_tus++;
return result;
}
@@ -7149,7 +7148,6 @@ create_cus_hash_table (dwarf2_per_objfile *per_objfile,
sect_offset sect_off = (sect_offset) (info_ptr - section.buffer);
dwarf2_per_cu_data per_cu (per_bfd, &section, sect_off);
- per_cu.is_debug_types = 0;
cutu_reader reader (&per_cu, per_objfile, cu, &dwo_file);
if (!reader.dummy_p)
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index 2aa6e58..56705c5 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -375,7 +375,9 @@ struct signatured_type : public dwarf2_per_cu_data
sect_offset sect_off, ULONGEST signature)
: dwarf2_per_cu_data (per_bfd, section, sect_off),
signature (signature)
- {}
+ {
+ this->is_debug_types = true;
+ }
/* The type's signature. */
ULONGEST signature;