From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19572 invoked by alias); 17 Apr 2009 10:05:32 -0000 Received: (qmail 19518 invoked by uid 22791); 17 Apr 2009 10:05:27 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout3.012.net.il (HELO mtaout3.012.net.il) (84.95.2.7) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Apr 2009 10:05:21 +0000 Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KI800600PBGW000@i_mtaout3.012.net.il> for gdb-patches@sourceware.org; Fri, 17 Apr 2009 13:05:15 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.126.183.184]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KI800IUQPCQV510@i_mtaout3.012.net.il>; Fri, 17 Apr 2009 13:05:15 +0300 (IDT) Date: Fri, 17 Apr 2009 10:05:00 -0000 From: Eli Zaretskii Subject: Re: [RFA] print error message if (auto) disassembly failed In-reply-to: <83prfbk50b.fsf@gnu.org> To: gdb-patches@sourceware.org Cc: brobecker@adacore.com, tromey@redhat.com, teawater@gmail.com Reply-to: Eli Zaretskii Message-id: <83myafk338.fsf@gnu.org> References: <20090416173918.GP7557@adacore.com> <20090416235944.GP7585@adacore.com> <83prfbk50b.fsf@gnu.org> 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: 2009-04/txt/msg00416.txt.bz2 > Date: Fri, 17 Apr 2009 12:23:48 +0300 > From: Eli Zaretskii > Cc: tromey@redhat.com, teawater@gmail.com, gdb-patches@sourceware.org > > > Date: Thu, 16 Apr 2009 16:59:44 -0700 > > From: Joel Brobecker > > Cc: gdb-patches@sourceware.org > > > > > The default is "auto", which means: > > > > > > If AUTO (which is the default), or there's no line info to determine > > > the source line of the next instruction, display disassembly of next > > > instruction instead. */ > > > > > > But I agree with you that this is the wrong default. > > > I think the default should be "off". > > > > Would anyone object to changing the default to "off"? > > My vote is to set it to "off", since this is additional functionality > that evidently not everyone likes. Btw, the documentation of "auto" is misleading: it makes it sound like it should _always_ display the disassembly of the next instruction. But in fact, it only does so when you step over code that doesn't have line info information or whose source file is unavailable. So how about the following patch? (If it is accepted, I will fix the manual as well.) 2009-04-17 Eli Zaretskii * stack.c (_initialize_stack) : Doc fix. --- gdb/stack.c~ 2009-04-02 04:05:29.000000000 +0300 +++ gdb/stack.c 2009-04-17 13:00:05.940500000 +0300 @@ -2145,13 +2145,16 @@ add_setshow_auto_boolean_cmd ("disassemble-next-line", class_stack, &disassemble_next_line, _("\ -Set whether to disassemble next source line when execution stops."), _("\ -Show whether to disassemble next source line when execution stops."), _("\ -If ON, GDB will display disassembly of the next source line when\n\ -execution of the program being debugged stops.\n\ -If AUTO (which is the default), or there's no line info to determine\n\ -the source line of the next instruction, display disassembly of next\n\ -instruction instead."), +Set whether to disassemble next source line or insn when execution stops."), _("\ +Show whether to disassemble next source line or insn when execution stops."), _("\ +If ON, GDB will display disassembly of the next source line, in addition\n\ +to displaying the source line itself. If the next source line cannot\n\ +be displayed (e.g., source is unavailable or there's no line info), GDB\n\ +will display disassembly of next instruction instead of showing the\n\ +source line.\n\ +If AUTO (which is the default), display disassembly of next\n\ +instruction only if the source line cannot be displayed.\n\ +If OFF, never display the disassembly of the next source line."), NULL, show_disassemble_next_line, &setlist, &showlist);