/* Parse expressions for GDB.
- Copyright (C) 1986-2021 Free Software Foundation, Inc.
+ Copyright (C) 1986-2022 Free Software Foundation, Inc.
Modified from expread.y by the Department of Computer Science at the
State University of New York at Buffalo, 1991.
|| tag == TYPE_CODE_STRUCT
|| tag == TYPE_CODE_ENUM);
m_completion_state.expout_tag_completion_type = tag;
- m_completion_state.expout_completion_name.reset (xstrndup (ptr, length));
+ m_completion_state.expout_completion_name
+ = make_unique_xstrndup (ptr, length);
}
/* See parser-defs.h. */
{
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);