From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22042 invoked by alias); 19 Aug 2012 16:53:21 -0000 Received: (qmail 22026 invoked by uid 22791); 19 Aug 2012 16:53:19 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_NIX_SPAM,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Aug 2012 16:52:57 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M9000900HDSSZ00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sun, 19 Aug 2012 19:52:42 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M90009Y6HJTI160@a-mtaout22.012.net.il>; Sun, 19 Aug 2012 19:52:41 +0300 (IDT) Date: Sun, 19 Aug 2012 16:53:00 -0000 From: Eli Zaretskii Subject: Re: New warning in GDB 7.5 In-reply-to: <20120819043652.GN2798@adacore.com> To: Joel Brobecker Cc: mark.kettenis@xs4all.nl, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83vcgeddsm.fsf@gnu.org> References: <838vdcdl2q.fsf@gnu.org> <20120818205543.GL2798@adacore.com> <837gsvewyh.fsf@gnu.org> <201208182149.q7ILnLb3017336@glazunov.sibelius.xs4all.nl> <83393jegz3.fsf@gnu.org> <20120819043652.GN2798@adacore.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: 2012-08/txt/msg00527.txt.bz2 > Date: Sat, 18 Aug 2012 21:36:52 -0700 > From: Joel Brobecker > Cc: Mark Kettenis , gdb-patches@sourceware.org > > > I always thought lazy loading of symbols was a feature, not a bug. > > Shouldn't the commands work regardless of whether symbols have been > fully loaded or not, though? That would be nice, but I don't know of any way to do that. If you look at Emacs's src/.gdbinit, you will see at its end that it needs some symbols right at startup, when the program was not yet started. If there are commands to control which symbols are loaded when GDB starts, they might help. Otherwise, I will replace those two "set" commands with something like set $dummy = main + 8 which does the job, and suppresses the warning. > Lazy psymtab-to-symtab conversion should be transparent to the user. But what is its trigger? And will this transparent conversion kick in when .gdbinit does the following? # People get bothered when they see messages about non-existent functions... xgetptr globals.f_Vsystem_type # $ptr is NULL in temacs if ($ptr != 0) set $tem = (struct Lisp_Symbol *) $ptr xgetptr $tem->name set $tem = (struct Lisp_String *) $ptr set $tem = (char *) $tem->data # Don't let abort actually run, as it will make stdio stop working and # therefore the `pr' command above as well. if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd' # The windows-nt build replaces abort with its own function. break w32_abort else break abort end end Here, GDB needs to know what is Lisp_String and Lisp_Symbol, and also the various bit masks used by xgetptr (defined earlier in the file).