else
fi = NULL;
- /* frame = -2 means always use selected frame. */
if (type == USE_SELECTED_FRAME)
var->root->floating = true;
}
p = expression;
- innermost_block.reset ();
+ innermost_block.reset (INNERMOST_BLOCK_FOR_SYMBOLS
+ | INNERMOST_BLOCK_FOR_REGISTERS);
/* Wrap the call to parse expression, so we can
return a sensible error. */
TRY
}
var->format = variable_default_display (var.get ());
- var->root->valid_block = innermost_block.block ();
+ var->root->valid_block =
+ var->root->floating ? NULL : innermost_block.block ();
var->name = expression;
/* For a root var, the name and the expr are the same. */
var->path_expr = expression;
{
get_formatted_print_options (opts, format_code[(int) format]);
opts->deref_ref = 0;
- opts->raw = 1;
+ opts->raw = !pretty_printing;
}
std::string