diff options
author | Tom de Vries <tdevries@suse.de> | 2023-08-31 09:37:44 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-08-31 09:37:44 +0200 |
commit | 4b3d893ac8bb787ff229a9f765a771903c760b97 (patch) | |
tree | dc23f1e13fef4a6057cc4d11ce88817380cabe46 /gdb/ctfread.c | |
parent | 2774f2dad5f05e68771c07df6ab0fb23baa2118e (diff) | |
download | gdb-4b3d893ac8bb787ff229a9f765a771903c760b97.zip gdb-4b3d893ac8bb787ff229a9f765a771903c760b97.tar.gz gdb-4b3d893ac8bb787ff229a9f765a771903c760b97.tar.bz2 |
[gdb/symtab] Do more zero-initialization of type::fields
Now that we've introduced type::{alloc_fields,copy_fields}, the places where
no zero-initialization of allocated fields is done are easy to spot:
...
$ find gdb* -type f | grep -v ChangeLog | xargs grep alloc_fields | grep false
gdb/coffread.c: type->alloc_fields (nfields, false);
gdb/coffread.c: type->alloc_fields (nsyms, false);
gdb/stabsread.c: ftype->alloc_fields (nsemi, false);
gdb/gdbtypes.c: resolved_type->alloc_fields (nfields, false);
gdb/gdbtypes.c: alloc_fields (nfields, false);
gdb/gdbtypes.c: alloc_fields (nfields, false);
gdb/mdebugread.c: t->alloc_fields (nfields, false);
gdb/mdebugread.c: ftype->alloc_fields (nparams, false);
...
All hits in gdbtypes.c are ok. There are two hits in the two variants of
copy_fields, and there's already a comment for the third.
AFAICT, the other ones are not ok, so fix those by dropping the "false"
argument.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/ctfread.c')
0 files changed, 0 insertions, 0 deletions