static void dbx_read_symtab (legacy_psymtab *self,
struct objfile *objfile);
-static void dbx_psymtab_to_symtab_1 (legacy_psymtab *, struct objfile *);
+static void dbx_expand_psymtab (legacy_psymtab *, struct objfile *);
static void read_dbx_symtab (minimal_symbol_reader &, struct objfile *);
static void
read_dbx_symtab (minimal_symbol_reader &reader, struct objfile *objfile)
{
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
struct external_nlist *bufp = 0; /* =0 avoids gcc -Wall glitch. */
struct internal_nlist nlist;
CORE_ADDR text_addr;
if (psymtab_language == language_cplus)
{
std::string name (namestring, p - namestring);
- std::string new_name = cp_canonicalize_string (name.c_str ());
- if (!new_name.empty ())
+ gdb::unique_xmalloc_ptr<char> new_name
+ = cp_canonicalize_string (name.c_str ());
+ if (new_name != nullptr)
{
- sym_len = new_name.length ();
+ sym_len = strlen (new_name.get ());
sym_name = obstack_strdup (&objfile->objfile_obstack,
- new_name);
+ new_name.get ());
}
}
XOBNEW (&objfile->objfile_obstack, struct symloc);
LDSYMOFF (result) = ldsymoff;
result->legacy_read_symtab = dbx_read_symtab;
- result->legacy_expand_psymtab = dbx_psymtab_to_symtab_1;
+ result->legacy_expand_psymtab = dbx_expand_psymtab;
SYMBOL_SIZE (result) = symbol_size;
SYMBOL_OFFSET (result) = symbol_table_offset;
STRING_OFFSET (result) = string_table_offset;
int textlow_not_set)
{
int i;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
if (capping_symbol_offset != -1)
LDSYMLEN (pst) = capping_symbol_offset - LDSYMOFF (pst);
}
\f
static void
-dbx_psymtab_to_symtab_1 (legacy_psymtab *pst, struct objfile *objfile)
+dbx_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile)
{
gdb_assert (!pst->readin);
const section_offsets §ion_offsets,
struct objfile *objfile, enum language language)
{
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
+ struct gdbarch *gdbarch = objfile->arch ();
struct context_stack *newobj;
struct context_stack cstk;
/* This remembers the address of the start of a function. It is