int print_level, enum print_what print_what,
int set_current_sal)
{
- struct cleanup *old_chain;
-
- old_chain = make_cleanup_restore_current_uiout ();
-
- current_uiout = uiout;
+ scoped_restore save_uiout = make_scoped_restore (¤t_uiout, uiout);
print_stack_frame (frame, print_level, print_what, set_current_sal);
-
- do_cleanups (old_chain);
}
/* Show or print a stack frame FRAME briefly. The output is formatted
printf_filtered ("saved %s = ", pc_regname);
if (!frame_id_p (frame_unwind_caller_id (fi)))
- val_print_unavailable (gdb_stdout);
+ val_print_not_saved (gdb_stdout);
else
{
TRY
message. */
if (retval_exp)
{
- struct expression *retval_expr = parse_expression (retval_exp);
- struct cleanup *old_chain = make_cleanup (xfree, retval_expr);
+ expression_up retval_expr = parse_expression (retval_exp);
struct type *return_type = NULL;
/* Compute the return value. Should the computation fail, this
call throws an error. */
- return_value = evaluate_expression (retval_expr);
+ return_value = evaluate_expression (retval_expr.get ());
/* Cast return value to the return type of the function. Should
the cast fail, this call throws an error. */
"Please use an explicit cast of the value to return."));
return_type = value_type (return_value);
}
- do_cleanups (old_chain);
return_type = check_typedef (return_type);
return_value = value_cast (return_type, return_value);