From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25939 invoked by alias); 18 Jun 2005 03:16:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25929 invoked by uid 22791); 18 Jun 2005 03:16:07 -0000 Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 18 Jun 2005 03:16:07 +0000 Received: from farnswood.snap.net.nz (p193-tnt1.snap.net.nz [202.124.110.193]) by viper.snap.net.nz (Postfix) with ESMTP id 069775419C9; Sat, 18 Jun 2005 15:16:03 +1200 (NZST) Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 0C7CC62A99; Sat, 18 Jun 2005 04:17:06 +0100 (BST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17075.37426.63034.298309@farnswood.snap.net.nz> Date: Sat, 18 Jun 2005 03:16:00 -0000 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] -stack-info-frames In-Reply-To: <20050618015756.GA30430@nevyn.them.org> References: <17075.21529.964955.923197@farnswood.snap.net.nz> <20050617230130.GB21178@nevyn.them.org> <20050617231425.GA22254@nevyn.them.org> <17075.30993.384316.356236@farnswood.snap.net.nz> <20050618015756.GA30430@nevyn.them.org> X-SW-Source: 2005-06/txt/msg00274.txt.bz2 > > How about the rest of the patch: > > > > (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth): > > Don't test for stack. > > (mi_cmd_stack_select_frame): Do not allow an argument. > > Don't test for stack. > > OK (except the changelog is wrong - it's Require an argument, not Do > not allow, right?). Yes. Committed. > A nice followup if you're feeling inspired would be to remove the traces > of -stack-info-frame from both gdb/mi/ and the manual, since it really > does not sound useful at this point. OK. I've committed this as obvious (?). > Not sure what we could add to the docs. This is what's there: > If invoked without arguments, this command prints a backtrace for the > whole stack. If given two integer arguments, it shows the frames whose > levels are between the two arguments (inclusive). If the two arguments > are equal, it shows the single frame at the corresponding level. I guess that just proves I didn't read the manual properly. Nick 2005-06-18 Nick Roberts * mi/mi-cmds.c (mi_cmds): Remove entry for -stack-info-frame. * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames) (mi_cmd_stack_info_depth): Don't test for stack. (mi_cmd_stack_select_frame): Make the argument mandatory. Don't test for stack. * gdb.texinfo (GDB/MI Stack Manipulation): Remove reference to -stack-info-frame. *** /home/nick/src/gdb/mi/mi-cmds.c.~1.16~ 2005-06-18 14:58:00.000000000 +1200 --- /home/nick/src/gdb/mi/mi-cmds.c 2005-06-18 14:44:50.000000000 +1200 *************** *** 107,113 **** { "signal-list-handle-actions", { NULL, 0 }, NULL, NULL }, { "signal-list-signal-types", { NULL, 0 }, NULL, NULL }, { "stack-info-depth", { NULL, 0 }, 0, mi_cmd_stack_info_depth}, - { "stack-info-frame", { NULL, 0 }, NULL, NULL }, { "stack-list-arguments", { NULL, 0 }, 0, mi_cmd_stack_list_args}, { "stack-list-exception-handlers", { NULL, 0 }, NULL, NULL }, { "stack-list-frames", { NULL, 0 }, 0, mi_cmd_stack_list_frames}, --- 107,112 ---- *** /home/nick/src/gdb/mi/mi-cmd-stack.c.~1.25~ 2005-06-18 14:57:26.000000000 +1200 --- /home/nick/src/gdb/mi/mi-cmd-stack.c 2005-06-18 14:31:45.000000000 +1200 *************** *** 47,55 **** struct cleanup *cleanup_stack; struct frame_info *fi; - if (!target_has_stack) - error (_("mi_cmd_stack_list_frames: No stack.")); - if (argc > 2 || argc == 1) error (_("mi_cmd_stack_list_frames: Usage: [FRAME_LOW FRAME_HIGH]")); --- 47,52 ---- *************** *** 104,112 **** int i; struct frame_info *fi; - if (!target_has_stack) - error (_("mi_cmd_stack_info_depth: No stack.")); - if (argc > 1) error (_("mi_cmd_stack_info_depth: Usage: [MAX_DEPTH]")); --- 101,106 ---- *************** *** 329,344 **** 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]")); ! ! /* with no args, don't change frame */ ! if (argc == 0) ! select_frame_command (0, 1 /* not used */ ); ! else ! select_frame_command (argv[0], 1 /* not used */ ); return MI_CMD_DONE; } --- 323,331 ---- enum mi_cmd_result mi_cmd_stack_select_frame (char *command, char **argv, int argc) { ! if (argc == 0 || argc > 1) ! error (_("mi_cmd_stack_select_frame: Usage: FRAME_SPEC")); ! select_frame_command (argv[0], 1 /* not used */ ); return MI_CMD_DONE; } *** /home/nick/src/gdb/doc/gdb.texinfo.~1.261~ 2005-06-18 15:04:56.000000000 +1200 --- /home/nick/src/gdb/doc/gdb.texinfo 2005-06-18 14:44:18.000000000 +1200 *************** *** 19187,19212 **** @node GDB/MI Stack Manipulation @section @sc{gdb/mi} Stack Manipulation Commands - - @subheading The @code{-stack-info-frame} Command - @findex -stack-info-frame - - @subsubheading Synopsis - - @smallexample - -stack-info-frame - @end smallexample - - Get info on the current frame. - - @subsubheading @value{GDBN} Command - - The corresponding @value{GDBN} command is @samp{info frame} or @samp{frame} - (without arguments). - - @subsubheading Example - N.A. - @subheading The @code{-stack-info-depth} Command @findex -stack-info-depth --- 19187,19192 ----