wrap_here (" ");
if (funname)
- printf_filtered (" in %s", funname);
+ {
+ printf_filtered (" in ");
+ fputs_demangled (funname, stdout, 1);
+ }
wrap_here (" ");
if (sal.symtab)
printf_filtered (" (%s:%d)", sal.symtab->filename, sal.line);
fputs_filtered (" = ", stream);
print_variable_value (sym, frame, stream);
fprintf_filtered (stream, "\n");
- fflush (stream);
}
}
return values_printed;
local_hex_string(SYMBOL_VALUE_ADDRESS (sym)));
fprintf_filtered (stream, " in file %s, line %d\n",
sal.symtab->filename, sal.line);
- fflush (stream);
}
}
return values_printed;
or 0 if nothing was printed because we have no info
on the function running in FRAME. */
-static int
+static void
print_frame_local_vars (frame, stream)
register FRAME frame;
register FILE *stream;
if (block == 0)
{
fprintf_filtered (stream, "No symbol table info available.\n");
- fflush (stream);
- return 0;
+ return;
}
while (block != 0)
if (!values_printed)
{
fprintf_filtered (stream, "No locals.\n");
- fflush (stream);
}
-
- return 1;
}
/* Same, but print labels. */
-static int
+static void
print_frame_label_vars (frame, this_level_only, stream)
register FRAME frame;
int this_level_only;
if (block == 0)
{
fprintf_filtered (stream, "No symbol table info available.\n");
- fflush (stream);
- return 0;
+ return;
}
bl = blockvector_for_pc (BLOCK_END (block) - 4, &index);
index++;
}
if (have_default)
- return 1;
+ return;
if (values_printed && this_level_only)
- return 1;
+ return;
/* After handling the function's top-level block, stop.
Don't continue to its superblock, the block of
if (!values_printed && !this_level_only)
{
fprintf_filtered (stream, "No catches.\n");
- fflush (stream);
}
-
- return values_printed;
}
/* ARGSUSED */
print_frame_label_vars (selected_frame, 0, stdout);
}
-static int
+static void
print_frame_arg_vars (frame, stream)
register FRAME frame;
register FILE *stream;
if (func == 0)
{
fprintf_filtered (stream, "No symbol table info available.\n");
- fflush (stream);
- return 0;
+ return;
}
b = SYMBOL_BLOCK_VALUE (func);
b, VAR_NAMESPACE, (int *)NULL, (struct symtab **)NULL);
print_variable_value (sym2, frame, stream);
fprintf_filtered (stream, "\n");
- fflush (stream);
}
}
if (!values_printed)
{
fprintf_filtered (stream, "No arguments.\n");
- fflush (stream);
}
-
- return 1;
}
static void
return frame;
}
-/* The "frame" command. With no arg, print selected frame briefly.
+/* The "select_frame" command. With no arg, NOP.
With arg LEVEL_EXP, select the frame at level LEVEL if it is a
valid level. Otherwise, treat level_exp as an address expression
- and print it. See parse_frame_specification for more info on proper
+ and select it. See parse_frame_specification for more info on proper
frame expressions. */
+/* ARGSUSED */
static void
-frame_command (level_exp, from_tty)
+select_frame_command (level_exp, from_tty)
char *level_exp;
int from_tty;
{
level = 0;
select_frame (frame, level);
+}
- if (!from_tty)
- return;
+/* The "frame" command. With no arg, print selected frame briefly.
+ With arg, behaves like select_frame and then prints the selected
+ frame. */
+static void
+frame_command (level_exp, from_tty)
+ char *level_exp;
+ int from_tty;
+{
+ select_frame_command (level_exp, from_tty);
print_stack_frame (selected_frame, selected_frame_level, 1);
}
add_com_alias ("f", "frame", class_stack, 1);
+ add_com ("select-frame", class_stack, select_frame_command,
+ "Select a stack frame without printing anything.\n\
+An argument specifies the frame to select.\n\
+It can be a stack frame number or the address of the frame.\n");
+
add_com ("backtrace", class_stack, backtrace_command,
"Print backtrace of all stack frames, or innermost COUNT frames.\n\
With a negative argument, print outermost -COUNT frames.");