diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-05-31 12:33:32 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-05-31 12:33:32 -0400 |
commit | 9ea36493f6e9963cbe09f1c72fbc50a732d5a932 (patch) | |
tree | 8f0b4a938e7df4a6781dcd42c98d5d1e743d87ad /gdb/dwarf2/read.h | |
parent | 46c6bcf650644ae22941ccb49dfe5fbb6e185513 (diff) | |
download | gdb-9ea36493f6e9963cbe09f1c72fbc50a732d5a932.zip gdb-9ea36493f6e9963cbe09f1c72fbc50a732d5a932.tar.gz gdb-9ea36493f6e9963cbe09f1c72fbc50a732d5a932.tar.bz2 |
gdb: pass signature to allocate_signatured_type and signatured_type constructor
All signatured_type constucted (even those used only for lookups in hash
maps) need a signature. Enforce that by passing the signature all the
way to the signatured_type constructor.
gdb/ChangeLog:
* dwarf2/read.h (struct structured_type) <signatured_type>: New.
Update all callers.
(struct dwarf2_per_bfd) <allocate_signatured_type>: Add
signature parameter, update all callers.
* dwar2/read.c (dwarf2_per_bfd::allocate_signatured_type): Add
signature parameter.
Change-Id: I99bc1f88f54127666aa133ddbbabb7f7668fa14a
Diffstat (limited to 'gdb/dwarf2/read.h')
-rw-r--r-- | gdb/dwarf2/read.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index 9893791..6f45eea 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -281,8 +281,12 @@ struct dwarf2_per_cu_data struct signatured_type : public dwarf2_per_cu_data { + signatured_type (ULONGEST signature) + : signature (signature) + {} + /* The type's signature. */ - ULONGEST signature = 0; + ULONGEST signature; /* Offset in the TU of the type's DIE, as read from the TU header. If this TU is a DWO stub and the definition lives in a DWO file @@ -341,7 +345,7 @@ struct dwarf2_per_bfd /* A convenience function to allocate a signatured_type. The returned object has its "index" field set properly. The object is allocated on the dwarf2_per_bfd obstack. */ - signatured_type_up allocate_signatured_type (); + signatured_type_up allocate_signatured_type (ULONGEST signature); private: /* This function is mapped across the sections and remembers the |