From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14263 invoked by alias); 26 Apr 2010 17:45:50 -0000 Received: (qmail 13935 invoked by uid 22791); 26 Apr 2010 17:45:45 -0000 X-SWARE-Spam-Status: No, hits=1.8 required=5.0 tests=BAYES_00,RCVD_IN_JMF_BL,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Apr 2010 17:45:40 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L1H00M00VUL9N00@a-mtaout20.012.net.il> for gdb@sourceware.org; Mon, 26 Apr 2010 20:45:24 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.125.239]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L1H00KOIVZNYX40@a-mtaout20.012.net.il>; Mon, 26 Apr 2010 20:45:24 +0300 (IDT) Date: Mon, 26 Apr 2010 17:45:00 -0000 From: Eli Zaretskii Subject: Re: "set foo" In-reply-to: To: tromey@redhat.com Cc: brobecker@adacore.com, gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83aasqyuo5.fsf@gnu.org> References: <8339yk1skw.fsf@gnu.org> <20100424212118.GW13204@adacore.com> <83y6gbzm4e.fsf@gnu.org> <20100425144347.GA2744@adacore.com> <83sk6jzhzv.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00146.txt.bz2 > From: Tom Tromey > Cc: Joel Brobecker , gdb@sourceware.org > Date: Mon, 26 Apr 2010 10:23:25 -0600 > > >>>>> "Eli" == Eli Zaretskii writes: > > Eli> The specific use-case is that GDB does not recognize a certain struct; > Eli> for example, "ptype struct foo_t" says "No struct type named foo_t". > Eli> But if I type "set foo", where `foo' is a function whose code uses > Eli> that struct, GDB magically recognizes the struct afterwards. > > FWIW, this sounds like a gdb bug to me. Could be a GCC bug as well, no? > I looked at emacs/src/.gdbinit and it seems to me that the types and > variables in question are global (in the sense of, not local to a > function). So, they should be found without this trick. So you are saying that global types and variables are always loaded by GDB automatically, not lazily?