struct breakpoint_objfile_data
{
/* Minimal symbol for "_ovly_debug_event" (if any). */
- struct bound_minimal_symbol overlay_msym {};
+ struct bound_minimal_symbol overlay_msym;
/* Minimal symbol(s) for "longjmp", "siglongjmp", etc. (if any). */
- struct bound_minimal_symbol longjmp_msym[NUM_LONGJMP_NAMES] {};
+ struct bound_minimal_symbol longjmp_msym[NUM_LONGJMP_NAMES];
/* True if we have looked for longjmp probes. */
int longjmp_searched = 0;
std::vector<probe *> longjmp_probes;
/* Minimal symbol for "std::terminate()" (if any). */
- struct bound_minimal_symbol terminate_msym {};
+ struct bound_minimal_symbol terminate_msym;
/* Minimal symbol for "_Unwind_DebugHook" (if any). */
- struct bound_minimal_symbol exception_msym {};
+ struct bound_minimal_symbol exception_msym;
/* True if we have looked for exception probes. */
int exception_searched = 0;
hppa_lookup_stub_minimal_symbol (const char *name,
enum unwind_stub_types stub_type)
{
- struct bound_minimal_symbol result = { NULL, NULL };
+ struct bound_minimal_symbol result;
for (objfile *objfile : current_program_space->objfiles ())
{
if (!list_mode && !msymbol_is_function (objfile, minsym))
return;
- struct bound_minimal_symbol mo = {minsym, objfile};
- msyms->push_back (mo);
+ msyms->emplace_back (minsym, objfile);
return;
}
struct found_minimal_symbols
{
/* External symbols are best. */
- bound_minimal_symbol external_symbol {};
+ bound_minimal_symbol external_symbol;
/* File-local symbols are next best. */
- bound_minimal_symbol file_symbol {};
+ bound_minimal_symbol file_symbol;
/* Symbols for shared library trampolines are next best. */
- bound_minimal_symbol trampoline_symbol {};
+ bound_minimal_symbol trampoline_symbol;
/* Called when a symbol name matches. Check if the minsym is a
better type than what we had already found, and record it in one
lookup_minimal_symbol_text (const char *name, struct objfile *objf)
{
struct minimal_symbol *msymbol;
- struct bound_minimal_symbol found_symbol = { NULL, NULL };
- struct bound_minimal_symbol found_file_symbol = { NULL, NULL };
+ struct bound_minimal_symbol found_symbol;
+ struct bound_minimal_symbol found_file_symbol;
unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
struct bound_minimal_symbol
{
+ bound_minimal_symbol (struct minimal_symbol *msym, struct objfile *objf)
+ : minsym (msym),
+ objfile (objf)
+ {
+ }
+
+ bound_minimal_symbol () = default;
+
/* The minimal symbol that was found, or NULL if no minimal symbol
was found. */
if (address_arg != NULL)
{
- struct bound_minimal_symbol msymbol = { NULL, NULL };
+ struct bound_minimal_symbol msymbol;
/* We don't assume each pc has a unique objfile (this is for
debugging). */