From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3509 invoked by alias); 20 Jun 2005 05:03:29 -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 3501 invoked by uid 22791); 20 Jun 2005 05:03:24 -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; Mon, 20 Jun 2005 05:03:24 +0000 Received: from farnswood.snap.net.nz (p61-tnt2.snap.net.nz [202.124.108.61]) by viper.snap.net.nz (Postfix) with ESMTP id 495CE56315C; Mon, 20 Jun 2005 17:03:19 +1200 (NZST) Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 606B762A99; Mon, 20 Jun 2005 06:03:06 +0100 (BST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17078.19977.660644.9978@farnswood.snap.net.nz> Date: Mon, 20 Jun 2005 05:03:00 -0000 To: Eli Zaretskii Cc: drow@false.org, gdb-patches@sources.redhat.com Subject: Re: [PATCH] -stack-info-frames In-Reply-To: References: <20050617230130.GB21178@nevyn.them.org> <20050617231425.GA22254@nevyn.them.org> <17075.30993.384316.356236@farnswood.snap.net.nz> <20050618015756.GA30430@nevyn.them.org> <17075.57612.684597.392526@farnswood.snap.net.nz> <20050618155742.GB3663@nevyn.them.org> <17076.42233.730605.834264@farnswood.snap.net.nz> <20050618232032.GA28368@nevyn.them.org> <17076.59646.873454.551250@farnswood.snap.net.nz> <20050619145612.GA8219@nevyn.them.org> <17077.61587.164352.664225@farnswood.snap.net.nz> X-SW-Source: 2005-06/txt/msg00315.txt.bz2 > > > "No arguments required" doesn't make much sense as an error message; it > > > suggests that no arguments are necessary, but not that any arguments > > > are invalid. But I see there are two uses of it already, and none of > > > any other format for functions which take no arguements. So the code > > > parts of the patch are belatedly OK... > > > > Where possible, I just copy what is already there. > > That is not always a good idea. Sometimes it is better to modify old > code/docs, instead of proliferating past blunders in the name of > consistency. Currently: (gdb) -stack-info-frame 4 &"mi_cmd_stack_info_frame: No arguments required\n" ^error,msg="mi_cmd_stack_info_frame: No arguments required" (gdb) (gdb) -stack-select-frame &"mi_cmd_stack_select_frame: Usage: FRAME_SPEC\n" ^error,msg="mi_cmd_stack_select_frame: Usage: FRAME_SPEC" (gdb) The other thing I find inappropriate about these messages is that they print out the name of the procedure which is not of immediate interest. How about changing the format (for all MI commands) to -stack-info-frame 4 &"Usage: -stack-info-frame\n" ^error,msg="Usage: -stack-info-frame" (gdb) (gdb) -stack-select-frame &"Usage: -stack-select-frame FRAME_SPEC\n" ^error,msg="Usage: -stack-select-frame FRAME_SPEC" (gdb) etc. They should only occur when a developer is writing a frontend, not when it is being used. The procedure name is only of interest to someone writing MI code For that person it should be quite easy to find the relevant code and, even if it was not, it should only be printed if a debug flag is set. Nick