\f
-/* See definition in parser-defs.h. */
-
-expr_builder::expr_builder (const struct language_defn *lang,
- struct gdbarch *gdbarch)
- : expout (new expression (lang, gdbarch))
-{
-}
-
-expression_up
-expr_builder::release ()
-{
- return std::move (expout);
-}
-
-expression::expression (const struct language_defn *lang, struct gdbarch *arch)
- : language_defn (lang),
- gdbarch (arch)
-{
-}
-
-expression::~expression ()
-{
-}
-
/* Return the type of MSYMBOL, a minimal symbol of OBJFILE. If
ADDRESS_P is not NULL, set it to the MSYMBOL's resolved
address. */
{
if (symbol_read_needs_frame (sym.symbol))
block_tracker->update (sym);
- push_new<expr::var_value_operation> (sym.symbol, sym.block);
+ push_new<expr::var_value_operation> (sym);
}
else
{
struct bound_minimal_symbol msymbol = lookup_bound_minimal_symbol (name);
if (msymbol.minsym != NULL)
- push_new<expr::var_msym_value_operation> (msymbol.minsym,
- msymbol.objfile);
+ push_new<expr::var_msym_value_operation> (msymbol);
else if (!have_full_symbols () && !have_partial_symbols ())
error (_("No symbol table is loaded. Use the \"file\" command."));
else
sym = lookup_symbol (copy.c_str (), NULL, VAR_DOMAIN, NULL);
if (sym.symbol)
{
- push_new<expr::var_value_operation> (sym.symbol, sym.block);
+ push_new<expr::var_value_operation> (sym);
return;
}
msym = lookup_bound_minimal_symbol (copy.c_str ());
if (msym.minsym)
{
- push_new<expr::var_msym_value_operation> (msym.minsym, msym.objfile);
+ push_new<expr::var_msym_value_operation> (msym);
return;
}
va_end (args);
}
-/* Return 1 if EXP uses OBJFILE (and will become dangling when OBJFILE
- is unloaded), otherwise return 0. OBJFILE must not be a separate debug info
- file. */
+/* Return rue if EXP uses OBJFILE (and will become dangling when
+ OBJFILE is unloaded), otherwise return false. OBJFILE must not be
+ a separate debug info file. */
-int
+bool
exp_uses_objfile (struct expression *exp, struct objfile *objfile)
{
gdb_assert (objfile->separate_debug_objfile_backlink == NULL);