gdb/dwarf: initialize tu_stats fields
Checks
Commit Message
Initialize fields of tu_stats to 0, remove the explicit default
initialization of dwarf2_per_bfd::tu_stats.
Change-Id: I98b2d5c4171291a3df2569466559174fb7cf32b6
---
gdb/dwarf2/read.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
base-commit: b9935b23e47b6ff43d8099460b09c2e11666aa47
Comments
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
Simon> Initialize fields of tu_stats to 0, remove the explicit default
Simon> initialization of dwarf2_per_bfd::tu_stats.
Ok.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
On 2025-02-25 16:39, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> Initialize fields of tu_stats to 0, remove the explicit default
> Simon> initialization of dwarf2_per_bfd::tu_stats.
>
> Ok.
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom
Pushed, thanks.
Simon
@@ -38,12 +38,12 @@ extern struct cmd_list_element *show_dwarf_cmdlist;
struct tu_stats
{
- int nr_uniq_abbrev_tables;
- int nr_symtabs;
- int nr_symtab_sharers;
- int nr_stmt_less_type_units;
- int nr_all_type_units_reallocs;
- int nr_tus;
+ int nr_uniq_abbrev_tables = 0;
+ int nr_symtabs = 0;
+ int nr_symtab_sharers = 0;
+ int nr_stmt_less_type_units = 0;
+ int nr_all_type_units_reallocs = 0;
+ int nr_tus = 0;
};
struct dwarf2_cu;
@@ -529,7 +529,7 @@ struct dwarf2_per_bfd
/* Type unit statistics, to see how well the scaling improvements
are doing. */
- struct tu_stats tu_stats {};
+ struct tu_stats tu_stats;
/* A table mapping DW_AT_dwo_name values to struct dwo_file objects.
This is NULL if the table hasn't been allocated yet. */