aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32c-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/m32c-tdep.c')
-rw-r--r--gdb/m32c-tdep.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 899e45f..d6bc482 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -2240,14 +2240,15 @@ m32c_return_value (struct gdbarch *gdbarch,
/* Everything else is passed in mem0, using as many bytes as
needed. This is not what the Renesas tools do, but it's
what GCC does at the moment. */
- struct minimal_symbol *mem0
+ struct bound_minimal_symbol mem0
= lookup_minimal_symbol ("mem0", NULL, NULL);
- if (! mem0)
+ if (! mem0.minsym)
error (_("The return value is stored in memory at 'mem0', "
"but GDB cannot find\n"
"its address."));
- read_memory (MSYMBOL_VALUE_ADDRESS (mem0), readbuf, valtype_len);
+ read_memory (MSYMBOL_VALUE_ADDRESS (mem0.minsym), readbuf,
+ valtype_len);
}
}
@@ -2272,14 +2273,15 @@ m32c_return_value (struct gdbarch *gdbarch,
/* Everything else is passed in mem0, using as many bytes as
needed. This is not what the Renesas tools do, but it's
what GCC does at the moment. */
- struct minimal_symbol *mem0
+ struct bound_minimal_symbol mem0
= lookup_minimal_symbol ("mem0", NULL, NULL);
- if (! mem0)
+ if (! mem0.minsym)
error (_("The return value is stored in memory at 'mem0', "
"but GDB cannot find\n"
" its address."));
- write_memory (MSYMBOL_VALUE_ADDRESS (mem0), writebuf, valtype_len);
+ write_memory (MSYMBOL_VALUE_ADDRESS (mem0.minsym), writebuf,
+ valtype_len);
}
}
@@ -2450,7 +2452,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
{
const char *func_name;
char *tramp_name;
- struct minimal_symbol *tramp_msym;
+ struct bound_minimal_symbol tramp_msym;
/* Try to find a linker symbol at this address. */
struct bound_minimal_symbol func_msym
@@ -2473,7 +2475,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
the name any more. */
xfree (tramp_name);
- if (! tramp_msym)
+ if (! tramp_msym.minsym)
{
CORE_ADDR ptrval;
@@ -2505,7 +2507,7 @@ m32c_m16c_address_to_pointer (struct gdbarch *gdbarch,
else
{
/* The trampoline's address is our pointer. */
- addr = MSYMBOL_VALUE_ADDRESS (tramp_msym);
+ addr = MSYMBOL_VALUE_ADDRESS (tramp_msym.minsym);
}
}
@@ -2542,7 +2544,7 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
if (len > 4
&& strcmp (ptr_msym_name + len - 4, ".plt") == 0)
{
- struct minimal_symbol *func_msym;
+ struct bound_minimal_symbol func_msym;
/* We have a .plt symbol; try to find the symbol for the
corresponding function.
@@ -2557,8 +2559,8 @@ m32c_m16c_pointer_to_address (struct gdbarch *gdbarch,
/* If we do have such a symbol, return its value as the
function's true address. */
- if (func_msym)
- ptr = MSYMBOL_VALUE_ADDRESS (func_msym);
+ if (func_msym.minsym)
+ ptr = MSYMBOL_VALUE_ADDRESS (func_msym.minsym);
}
}
else