From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31993 invoked by alias); 6 Apr 2007 13:53:00 -0000 Received: (qmail 31985 invoked by uid 22791); 6 Apr 2007 13:52:59 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 06 Apr 2007 14:52:56 +0100 Received: from HOME-C4E4A596F7 (IGLD-84-229-113-79.inter.net.il [84.229.113.79]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id HNT20905 (AUTH halo1); Fri, 6 Apr 2007 16:52:54 +0300 (IDT) Date: Fri, 06 Apr 2007 13:53:00 -0000 Message-Id: From: Eli Zaretskii To: Christopher Layne CC: gdb-patches@sources.redhat.com In-reply-to: <20070406110435.GC27568@ns1.anodized.com> (message from Christopher Layne on Fri, 6 Apr 2007 04:04:35 -0700) Subject: Re: [PATCH] Add support to control auto-display behavior Reply-to: Eli Zaretskii References: <20070406110435.GC27568@ns1.anodized.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00032.txt.bz2 > Date: Fri, 6 Apr 2007 04:04:35 -0700 > From: Christopher Layne > > This patch is to allow setting how auto-displays are affected when memory is > not accessible. It's very common to, when single-stepping, or stepping over, > initially setup some auto-displays and then begin stepping. I don't see > any reason why, in the event an object is not accessible, the auto-display > should be disabled. Thanks. I agree that it's a good idea to have an option to control this, unless we agree that what you want as an option should be how GDB behaves in all cases. I have a few comments for your patch. > * printcmd.c (exceptions.h): Include. A minor formatting issue: exceptions.h should not be in parentheses, since it's not a function or macro. Instead, use this: * printcmd.c: Include exceptions.h. > +@cindex display options > +@cindex display settings It is better to have this as a single index entry, because they both begin with the same string and both point to the same place in the manual. So having two of them is mostly redundant. How about this instead: @cindex display, optional settings > +@value{GDBN} provides the following ways to control how auto-displays are > +handled. This sentence is better ended with a colon, don't you think? > +@cindex disable/permit auto-displays on memory access error When users look for such features in the manual, they don't think of "disable" as the first word, I think. They think about "auto-display". So I would change this index entry to say this instead: @cindex auto-display, and memory access errors > +@value{GDBN} automatically disables any auto-display which encounters a > +memory access error during display. The default is @code{on}. ^ Two spaces after a period, please. > +@item set display strict off > +Do not disable any auto-display which encounters a memory access error, > +but instead print a general error message rather than displaying a > +non-accessible value. How can one display a non-accessible value? I'd rephrase the whole section as follows: +@table @code +@kindex set display +@item set display strict +@itemx set display strict on +@cindex disable/permit auto-displays on memory access error +When auto-displays is set to @samp{strict}, @value{GDBN} +automatically disables any auto-display that encounters a memory +access error during display. This is the default behavior. + +@item set display strict off +When strict display is turned off, @value{GDBN} prints an error +message, but does not disable an auto-display that encounters a memory +access error. Btw, is it a good idea to call this ``strict'' display? I wouldn't characterize the current behavior as ``strict''. How about "set display disable-on-error on/off" instead? > + add_setshow_boolean_cmd ("strict", class_vars, > + &display_strict, _("\ > +Set disabling of display on memory access error."), _("\ > +Show disabling of display on memory access error."), I'd prefer more help text here to explain in more detail what happens under each setting.