Remove the macro, update all users to use the getter directly.
Change-Id: I3f0fd6f4455d1c4ebd5da73b561eb18a979ef1f6
return symbol_objfile (BLOCK_FUNCTION (block));
global_block = (struct global_block *) block_global_block (block);
- return COMPUNIT_OBJFILE (global_block->compunit_symtab);
+ return global_block->compunit_symtab->objfile ();
}
/* See block. */
gdb_assert (buildsym_compunit == nullptr);
buildsym_compunit
- = new struct buildsym_compunit (COMPUNIT_OBJFILE (cust),
+ = new struct buildsym_compunit (cust->objfile (),
name,
COMPUNIT_DIRNAME (cust),
compunit_language (cust),
gdb_assert (m_builder == nullptr);
struct compunit_symtab *cust = tug_unshare->compunit_symtab;
m_builder.reset (new struct buildsym_compunit
- (COMPUNIT_OBJFILE (cust), "",
+ (cust->objfile (), "",
COMPUNIT_DIRNAME (cust),
compunit_language (cust),
0, cust));
time. */
tug_unshare->symtabs
- = XOBNEWVEC (&COMPUNIT_OBJFILE (cust)->objfile_obstack,
+ = XOBNEWVEC (&cust->objfile ()->objfile_obstack,
struct symtab *, line_header->file_names_size ());
auto &file_names = line_header->file_names ();
gdb_assert (m_builder == nullptr);
struct compunit_symtab *cust = tug_unshare->compunit_symtab;
m_builder.reset (new struct buildsym_compunit
- (COMPUNIT_OBJFILE (cust), "",
+ (cust->objfile (), "",
COMPUNIT_DIRNAME (cust),
compunit_language (cust),
0, cust));
{
cust = find_pc_compunit_symtab (pc);
- if (cust != NULL && COMPUNIT_OBJFILE (cust) != NULL)
+ if (cust != NULL && cust->objfile () != NULL)
block = block_for_pc (pc);
}
catch (const gdb_exception &except)
}
GDBSCM_HANDLE_GDB_EXCEPTION (exc);
- if (cust == NULL || COMPUNIT_OBJFILE (cust) == NULL)
+ if (cust == NULL || cust->objfile () == NULL)
{
gdbscm_out_of_range_error (FUNC_NAME, SCM_ARG1, pc_scm,
_("cannot locate object file for block"));
}
if (block != NULL)
- return bkscm_scm_from_block (block, COMPUNIT_OBJFILE (cust));
+ return bkscm_scm_from_block (block, cust->objfile ());
return SCM_BOOL_F;
}
\f
set_current_program_space (self->pspace);
cust = find_pc_compunit_symtab (pc);
- if (cust != NULL && COMPUNIT_OBJFILE (cust) != NULL)
+ if (cust != NULL && cust->objfile () != NULL)
block = block_for_pc (pc);
}
catch (const gdb_exception &except)
GDB_PY_HANDLE_EXCEPTION (except);
}
- if (cust == NULL || COMPUNIT_OBJFILE (cust) == NULL)
+ if (cust == NULL || cust->objfile () == NULL)
Py_RETURN_NONE;
if (block)
- return block_to_block_object (block, COMPUNIT_OBJFILE (cust));
+ return block_to_block_object (block, cust->objfile ());
Py_RETURN_NONE;
}
{
if (SYMTAB_COMPUNIT (s) != nullptr)
{
- const objfile *ofp = COMPUNIT_OBJFILE (SYMTAB_COMPUNIT (s));
+ const objfile *ofp = SYMTAB_COMPUNIT (s)->objfile ();
std::string srcpath;
if (IS_ABSOLUTE_PATH (s->filename))
#define SYMTAB_BLOCKVECTOR(symtab) \
COMPUNIT_BLOCKVECTOR (SYMTAB_COMPUNIT (symtab))
#define SYMTAB_OBJFILE(symtab) \
- COMPUNIT_OBJFILE (SYMTAB_COMPUNIT (symtab))
+ (SYMTAB_COMPUNIT (symtab)->objfile ())
#define SYMTAB_PSPACE(symtab) (SYMTAB_OBJFILE (symtab)->pspace)
#define SYMTAB_DIRNAME(symtab) \
COMPUNIT_DIRNAME (SYMTAB_COMPUNIT (symtab))
using compunit_symtab_range = next_range<compunit_symtab>;
-#define COMPUNIT_OBJFILE(cust) ((cust)->objfile ())
#define COMPUNIT_FILETABS(cust) ((cust)->filetabs)
#define COMPUNIT_DEBUGFORMAT(cust) ((cust)->debugformat)
#define COMPUNIT_PRODUCER(cust) ((cust)->producer)