{
struct bound_minimal_symbol result;
- memset (&result, 0, sizeof (result));
-
symbol_name_match_type match_type = name_match_type_from_name (name);
lookup_name_info lookup_name (name, match_type);
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
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
/* The minimal symbol that was found, or NULL if no minimal symbol
was found. */
- struct minimal_symbol *minsym;
+ struct minimal_symbol *minsym = nullptr;
/* If MINSYM is not NULL, then this is the objfile in which the
symbol is defined. */
- struct objfile *objfile;
+ struct objfile *objfile = nullptr;
/* Return the obj_section from OBJFILE for MINSYM. */
struct bound_minimal_symbol msym;
sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0).symbol;
- if (sym != NULL)
+ if (sym == nullptr)
{
- memset (&msym, 0, sizeof (msym));
- }
- else
- {
- gdb_assert (sym == NULL);
msym = lookup_bound_minimal_symbol (physname);
if (msym.minsym == NULL)
return NULL;