This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] -stack-select-frame
> I don't care, really, but isn't necessary in our experience at
> Apple. The first thing a GUI has to do when execution has stopped is
> get the current stack. It shows the stack to the developer, and then
> the developer decides that stack frame 2 is of interest to her, so
> she clicks there and the GUI sends stack-select-frame. The GUI
> already has the stack-list-frames output from when it stopped -- it
> knows very well what's at frame 2.
I thought it would save some time if the user doesn't need to see the
whole stack.
> If the GUI has short term memory problems, stack-list-frames is
> always at its disposal.
>
> > * mi/mi-cmd-stack.c (mi_cmd_stack_select_frame): Don't test for
> > stack. Print frame details.
>
> > enum mi_cmd_result
> > mi_cmd_stack_select_frame (char *command, char **argv, int argc)
> > {
> > - if (!target_has_stack)
> > - error (_("mi_cmd_stack_select_frame: No stack."));
> > -
Because now GDB will report it as follows:
-stack-select-frame
&"No stack.\n"
^error,msg="No stack."
(gdb)
Nick