Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] -stack-select-frame
@ 2005-06-16  3:36 Nick Roberts
  2005-06-16  4:42 ` Daniel Jacobowitz
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Nick Roberts @ 2005-06-16  3:36 UTC (permalink / raw)
  To: gdb-patches


Last year I submitted a dreadful patch for -stack-select-frame
(thread subject: How does GDB/MI give the current frame).

Here, hopefully, is a much more sensible one.  The idea is the same: that
-stack-select-frame tells the frontend what the current or selected frame
is.

The current documentation for -stack-select-frame is slightly wrong because
the argument FRAMENUM is optional.  I've corrected this and explained what
the patch does.

Nick


2005-06-16  Nick Roberts  <nickrob@snap.net.nz>

	* mi/mi-cmd-stack.c (mi_cmd_stack_select_frame): Don't test for
	stack.  Print frame details.
	* gdb.texinfo (GDB/MI Stack Manipulation): Revise description
	of -stack-select-frame.


*** /home/nick/src/gdb/mi/mi-cmd-stack.c.~1.25.~	2005-02-13 00:36:20.000000000 +1300
--- /home/nick/src/gdb/mi/mi-cmd-stack.c	2005-06-16 14:28:29.000000000 +1200
***************
*** 329,337 ****
  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."));
- 
    if (argc > 1)
      error (_("mi_cmd_stack_select_frame: Usage: [FRAME_SPEC]"));
  
--- 329,334 ----
***************
*** 340,344 ****
--- 337,342 ----
      select_frame_command (0, 1 /* not used */ );
    else
      select_frame_command (argv[0], 1 /* not used */ );
+   print_stack_frame (get_selected_frame (NULL), 1, LOC_AND_ADDRESS);
    return MI_CMD_DONE;
  }


*** /home/nick/src/gdb/doc/gdb.texinfo.~1.261.~	2005-06-16 14:36:11.000000000 +1200
--- /home/nick/src/gdb/doc/gdb.texinfo	2005-06-16 15:01:18.000000000 +1200
***************
*** 19473,19483 ****
  @subsubheading Synopsis
  
  @smallexample
!  -stack-select-frame @var{framenum}
  @end smallexample
  
! Change the current frame.  Select a different frame @var{framenum} on
! the stack.
  
  @subsubheading @value{GDBN} Command
  
--- 19473,19484 ----
  @subsubheading Synopsis
  
  @smallexample
!  -stack-select-frame [ @var{framenum} ]
  @end smallexample
  
! Select a different frame @var{framenum} on the stack and print its
! details.  If the argument @var{framenum} is not specified, just print
! the details of the current frame.
  
  @subsubheading @value{GDBN} Command
  
***************
*** 19489,19495 ****
  @smallexample
  (@value{GDBP})
  -stack-select-frame 2
! ^done
  (@value{GDBP})
  @end smallexample
  
--- 19490,19497 ----
  @smallexample
  (@value{GDBP})
  -stack-select-frame 2
! ^done,frame=@{level="2",addr="0x000107a4",func="foo",
!   file="recursive2.c",fullname="/home/foo/bar/devo/myproject/recursive2.c",line=line="14"@},
  (@value{GDBP})
  @end smallexample


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2005-06-18  8:56 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1119003319.5434.ezmlm@sources.redhat.com>
2005-06-17 17:45 ` [PATCH] -stack-select-frame Jim Ingham
2005-06-16  3:36 Nick Roberts
2005-06-16  4:42 ` Daniel Jacobowitz
2005-06-16  6:41   ` Nick Roberts
2005-06-16 13:21     ` Daniel Jacobowitz
2005-06-16 22:58       ` Nick Roberts
2005-06-16 23:20         ` Bob Rossi
2005-06-16 23:47         ` Daniel Jacobowitz
2005-06-17  3:07           ` Nick Roberts
2005-06-17  3:21             ` Daniel Jacobowitz
2005-06-17  7:37               ` Nick Roberts
2005-06-17 10:15                 ` Eli Zaretskii
2005-06-17 13:33                   ` Daniel Jacobowitz
2005-06-18  8:56                     ` Eli Zaretskii
2005-06-17  9:55               ` Eli Zaretskii
2005-06-17  9:46             ` Eli Zaretskii
2005-06-16 18:23 ` Eli Zaretskii
2005-06-16 20:15 ` Jason Molenda
2005-06-16 23:04   ` Nick Roberts
2005-06-16 23:30     ` Jason Molenda
2005-06-17  7:22       ` Nick Roberts
2005-06-17 13:30         ` Daniel Jacobowitz
2005-06-17 19:48         ` Jason Molenda
2005-06-17 22:35         ` Stan Shebs
2005-06-17 22:59           ` Daniel Jacobowitz
2005-06-17 23:31           ` Nick Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox