From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1006 invoked by alias); 10 Nov 2005 04:41:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 997 invoked by uid 22791); 10 Nov 2005 04:41:43 -0000 Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 10 Nov 2005 04:41:43 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-70-78.inter.net.il [80.230.70.78]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id CYG02811 (AUTH halo1); Thu, 10 Nov 2005 06:41:35 +0200 (IST) Date: Thu, 10 Nov 2005 11:11:00 -0000 Message-Id: From: Eli Zaretskii To: Andrew STUBBS CC: gdb-patches@sources.redhat.com In-reply-to: <43722DEF.8060300@st.com> (message from Andrew STUBBS on Wed, 09 Nov 2005 17:12:15 +0000) Subject: Re: [SH][PATCH] Disable ABI frame sniffer Reply-to: Eli Zaretskii References: <43722DEF.8060300@st.com> X-SW-Source: 2005-11/txt/msg00127.txt.bz2 > Date: Wed, 09 Nov 2005 17:12:15 +0000 > From: Andrew STUBBS > > It is useful to disable this sniffer because it has an irritating habit > of causing (non-fatal) errors when it runs out of frames. Specifically > it often says 'Previous frame identical to this frame (corrupt stack?)'. > > This message is worrying if you do not know what it means, but it is > normally easily ignored. Unfortunately, the problem is more serious when > used in conjunction with 'thread apply' as the first error kills the > output from the rest of the threads. This command is used by some GUIs > to populate their displays. I think this explanation should be in the manual, because it explains very clearly when this command is useful. > + add_setshow_boolean_cmd ("abi-sniffer", class_obscure, > + &backtrace_abi_sniffer, "\ > +Set whether backtraces should use the ABI where there is no debug info.", "\ > +Show whether backtraces should use the ABI where there is no debug info.", "\ > +Normally there is debug information from which to construct a backtrace\n\ > +but sometimes is is not available (e.g. in assembly code). In this case the\n\ > +ABI sniffer can attempt to construct a backtrace. It is disabled by default\n\ > +because it can cause inconvenient errors. Note that it does not disable the\n\ > +Dwarf debug information sniffer.", These strings should be in _(), to allow for their translation to other languages. See the other examples of using add_setshow_boolean_cmd in GDB's sources. > Index: src/gdb/doc/gdb.texinfo > =================================================================== > --- src.orig/gdb/doc/gdb.texinfo 2005-11-01 11:43:29.000000000 +0000 > +++ src/gdb/doc/gdb.texinfo 2005-11-01 12:56:00.000000000 +0000 > @@ -14790,8 +14790,21 @@ commands: > @item regs > @kindex regs@r{, Super-H} > Show the values of all Super-H registers. > + > +@item set backtrace abi-sniffer > +@kindex set backtrace abi-sniffer > +This command enables or disables the SH ABI-based frame sniffer. This > +`sniffer' attempts to find the frames of a backtrace when there is no > +debug information (specifically CFI) to do the job properly. Sniffing > +frames is problematic so it is often best to switch this @samp{off}. It > +is @samp{on} by default. > + > +@item show backtrace abi-sniffer > +@kindex show backtrace abi-sniffer > +Show whether the abi-sniffer is enabled, or not. This part is fine with me, provided that you fix the following gotchas: . Make sure there are 2 blanks after a period that ends a sentence. . Use ``sniffer'' instead of `sniffer' (two quote characters). . Replace the "Sniffing is problematic..." sentence with text similar to the one you included in your message that explains when this command would be useful. > @end table > > + > @node WinCE Please don't add this gratuitous whitespace.