#include "objfiles.h"
#include "valprint.h"
#include "c-lang.h"
-#include "exceptions.h"
#include "typeprint.h"
-#include "gdb_assert.h"
-#include <string.h>
-
static struct cp_abi_ops gnu_v3_abi_ops;
/* A gdbarch key for std::type_info, in the event that it can't be
If we didn't like this approach, we could instead look in the
type_info object itself to get the class name. But this way
should work just as well, and doesn't read target memory. */
- vtable_symbol_name = SYMBOL_DEMANGLED_NAME (vtable_symbol);
+ vtable_symbol_name = MSYMBOL_DEMANGLED_NAME (vtable_symbol);
if (vtable_symbol_name == NULL
|| strncmp (vtable_symbol_name, "vtable for ", 11))
{
else
{
char *sym_name;
- struct minimal_symbol *minsym;
+ struct bound_minimal_symbol minsym;
sym_name = concat ("typeinfo for ", typename, (char *) NULL);
make_cleanup (xfree, sym_name);
minsym = lookup_minimal_symbol (sym_name, NULL, NULL);
- if (minsym == NULL)
+ if (minsym.minsym == NULL)
error (_("could not find typeinfo symbol for '%s'"), typename);
- result = value_at_lazy (typeinfo_type, SYMBOL_VALUE_ADDRESS (minsym));
+ result = value_at_lazy (typeinfo_type, BMSYMBOL_VALUE_ADDRESS (minsym));
}
do_cleanups (cleanup);
#define TYPEINFO_PREFIX "typeinfo for "
#define TYPEINFO_PREFIX_LEN (sizeof (TYPEINFO_PREFIX) - 1)
- symname = SYMBOL_DEMANGLED_NAME (typeinfo_sym.minsym);
+ symname = MSYMBOL_DEMANGLED_NAME (typeinfo_sym.minsym);
if (symname == NULL || strncmp (symname, TYPEINFO_PREFIX,
TYPEINFO_PREFIX_LEN))
error (_("typeinfo symbol '%s' has unexpected name"),
- SYMBOL_LINKAGE_NAME (typeinfo_sym.minsym));
+ MSYMBOL_LINKAGE_NAME (typeinfo_sym.minsym));
class_name = symname + TYPEINFO_PREFIX_LEN;
/* Strip off @plt and version suffixes. */
{
CORE_ADDR real_stop_pc, method_stop_pc, func_addr;
struct gdbarch *gdbarch = get_frame_arch (frame);
- struct minimal_symbol *thunk_sym, *fn_sym;
+ struct bound_minimal_symbol thunk_sym, fn_sym;
struct obj_section *section;
const char *thunk_name, *fn_name;
real_stop_pc = stop_pc;
/* Find the linker symbol for this potential thunk. */
- thunk_sym = lookup_minimal_symbol_by_pc (real_stop_pc).minsym;
+ thunk_sym = lookup_minimal_symbol_by_pc (real_stop_pc);
section = find_pc_section (real_stop_pc);
- if (thunk_sym == NULL || section == NULL)
+ if (thunk_sym.minsym == NULL || section == NULL)
return 0;
/* The symbol's demangled name should be something like "virtual
thunk to FUNCTION", where FUNCTION is the name of the function
being thunked to. */
- thunk_name = SYMBOL_DEMANGLED_NAME (thunk_sym);
+ thunk_name = MSYMBOL_DEMANGLED_NAME (thunk_sym.minsym);
if (thunk_name == NULL || strstr (thunk_name, " thunk to ") == NULL)
return 0;
fn_name = strstr (thunk_name, " thunk to ") + strlen (" thunk to ");
fn_sym = lookup_minimal_symbol (fn_name, NULL, section->objfile);
- if (fn_sym == NULL)
+ if (fn_sym.minsym == NULL)
return 0;
- method_stop_pc = SYMBOL_VALUE_ADDRESS (fn_sym);
+ method_stop_pc = BMSYMBOL_VALUE_ADDRESS (fn_sym);
/* Some targets have minimal symbols pointing to function descriptors
(powerpc 64 for example). Make sure to retrieve the address