diff options
Diffstat (limited to 'gdb/m32c-tdep.c')
-rw-r--r-- | gdb/m32c-tdep.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c index 1d773773a74..3a0267b66e0 100644 --- a/gdb/m32c-tdep.c +++ b/gdb/m32c-tdep.c @@ -2457,14 +2457,15 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch, struct minimal_symbol *tramp_msym; /* Try to find a linker symbol at this address. */ - struct minimal_symbol *func_msym = lookup_minimal_symbol_by_pc (addr); + struct bound_minimal_symbol func_msym + = lookup_minimal_symbol_by_pc (addr); - if (! func_msym) + if (! func_msym.minsym) error (_("Cannot convert code address %s to function pointer:\n" "couldn't find a symbol at that address, to find trampoline."), paddress (gdbarch, addr)); - func_name = SYMBOL_LINKAGE_NAME (func_msym); + func_name = SYMBOL_LINKAGE_NAME (func_msym.minsym); tramp_name = xmalloc (strlen (func_name) + 5); strcpy (tramp_name, func_name); strcat (tramp_name, ".plt"); @@ -2535,11 +2536,11 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch, { /* See if there is a minimal symbol at that address whose name is "NAME.plt". */ - struct minimal_symbol *ptr_msym = lookup_minimal_symbol_by_pc (ptr); + struct bound_minimal_symbol ptr_msym = lookup_minimal_symbol_by_pc (ptr); - if (ptr_msym) + if (ptr_msym.minsym) { - const char *ptr_msym_name = SYMBOL_LINKAGE_NAME (ptr_msym); + const char *ptr_msym_name = SYMBOL_LINKAGE_NAME (ptr_msym.minsym); int len = strlen (ptr_msym_name); if (len > 4 @@ -2572,7 +2573,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch, { ptr_msym = lookup_minimal_symbol_by_pc ((aspace << 16) | ptr); - if (ptr_msym) + if (ptr_msym.minsym) ptr |= aspace << 16; } } |