the new sal, if needed. If not NULL, SYMNAME is the name of the
symbol to use when constructing the new canonical name.
- If LITERAL_CANONICAL is non-zero, SYMNAME will be used as the
+ If LITERAL_CANONICAL is true, SYMNAME will be used as the
canonical name for the SAL. */
static void
add_sal_to_sals (struct linespec_state *self,
std::vector<symtab_and_line> *sals,
struct symtab_and_line *sal,
- const char *symname, int literal_canonical)
+ const char *symname, bool literal_canonical)
{
sals->push_back (*sal);
sal.symbol = sym;
add_sal_to_sals (self, &values, &sal,
- sym ? sym->natural_name () : NULL, 0);
+ sym ? sym->natural_name () : nullptr, false);
}
}
sal.symbol = find_pc_sect_containing_function (sal.pc, sal.section);
std::vector<symtab_and_line> sals;
- add_sal_to_sals (self, &sals, &sal, core_addr_to_string (address), 1);
+ add_sal_to_sals (self, &sals, &sal, core_addr_to_string (address), true);
return sals;
}
if (symbol_to_sal (&sal, state->funfirstline, sym.symbol)
&& state->maybe_add_address (pspace, sal.pc))
add_sal_to_sals (state, &sals, &sal,
- sym.symbol->natural_name (), 0);
+ sym.symbol->natural_name (), false);
}
}
else if (!ls->function_symbols.empty () || !ls->minimal_symbols.empty ())
if (symbol_to_sal (&sal, state->funfirstline, sym.symbol)
&& state->maybe_add_address (pspace, sal.pc))
add_sal_to_sals (state, &sals, &sal,
- sym.symbol->natural_name (), 0);
+ sym.symbol->natural_name (), false);
}
}
}
val.pc = 0;
val.explicit_line = true;
- add_sal_to_sals (self, &values, &val, NULL, 0);
+ add_sal_to_sals (self, &values, &val, NULL, false);
}
return values;
sal.section = msymbol->obj_section (objfile);
if (self->maybe_add_address (objfile->pspace (), sal.pc))
- add_sal_to_sals (self, result, &sal, msymbol->natural_name (), 0);
+ add_sal_to_sals (self, result, &sal, msymbol->natural_name (), false);
}
/* Helper for search_minsyms_for_name that adds the symbol to the