/* See expression.h. */
+bool
+expression::uses_objfile (struct objfile *objfile) const
+{
+ gdb_assert (objfile->separate_debug_objfile_backlink == nullptr);
+ return op->uses_objfile (objfile);
+}
+
+/* See expression.h. */
+
struct value *
expression::evaluate (struct type *expect_type, enum noside noside)
{
op->dump (stream, 0);
}
+ /* Return true if this expression uses OBJFILE (and will become
+ dangling when OBJFILE is unloaded), otherwise return false.
+ OBJFILE must not be a separate debug info file. */
+ bool uses_objfile (struct objfile *objfile) const;
+
/* Evaluate the expression. EXPECT_TYPE is the context type of the
expression; normally this should be nullptr. NOSIDE controls how
evaluation is performed. */
va_end (args);
}
-/* 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. */
-
-bool
-exp_uses_objfile (struct expression *exp, struct objfile *objfile)
-{
- gdb_assert (objfile->separate_debug_objfile_backlink == NULL);
-
- return exp->op->uses_objfile (objfile);
-}
-
void _initialize_parse ();
void
_initialize_parse ()
extern void parser_fprintf (FILE *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
-extern bool exp_uses_objfile (struct expression *exp, struct objfile *objfile);
-
#endif /* PARSER_DEFS_H */
}
if (bl_objf == objfile
- || (d->exp != NULL && exp_uses_objfile (d->exp.get (), objfile)))
+ || (d->exp != nullptr && d->exp->uses_objfile (objfile)))
{
d->exp.reset ();
d->block = NULL;
}
}
- if (var->root->exp != nullptr
- && exp_uses_objfile (var->root->exp.get (), objfile))
+ if (var->root->exp != nullptr && var->root->exp->uses_objfile (objfile))
{
/* The varobj's current expression references the objfile. For
globals and floating, it is possible that when we try to