diff options
author | Tom Tromey <tromey@adacore.com> | 2022-02-08 13:41:53 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-02-11 09:23:56 -0700 |
commit | 29ba33db77f22a54d97db90cb87c39126efad3db (patch) | |
tree | 15d9ced771509549becd510ebcf3dff45f361814 /gdb/findvar.c | |
parent | e951225303b7d0565c985e2d562d3787983ff06f (diff) | |
download | binutils-29ba33db77f22a54d97db90cb87c39126efad3db.zip binutils-29ba33db77f22a54d97db90cb87c39126efad3db.tar.gz binutils-29ba33db77f22a54d97db90cb87c39126efad3db.tar.bz2 |
Add initializers to bound_minimal_symbol
This adds initializers to bound_minimal_symbol, allowing for the
removal of some calls to memset.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r-- | gdb/findvar.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c index 1d22e64..6660b00 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -404,7 +404,7 @@ symbol_read_needs_frame (struct symbol *sym) struct minsym_lookup_data { /* The name of the minimal symbol we are searching for. */ - const char *name; + const char *name = nullptr; /* The field where the callback should store the minimal symbol if found. It should be initialized to NULL before the search @@ -751,7 +751,6 @@ language_defn::read_var_value (struct symbol *var, struct minimal_symbol *msym; struct obj_section *obj_section; - memset (&lookup_data, 0, sizeof (lookup_data)); lookup_data.name = var->linkage_name (); gdbarch_iterate_over_objfiles_in_search_order |