From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19630 invoked by alias); 24 Apr 2010 20:52:37 -0000 Received: (qmail 19616 invoked by uid 22791); 24 Apr 2010 20:52:35 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Apr 2010 20:52:32 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L1E00500FBD1Z00@a-mtaout23.012.net.il> for gdb@sourceware.org; Sat, 24 Apr 2010 23:52:28 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.124.71.78]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L1E00314FBF8F80@a-mtaout23.012.net.il> for gdb@sourceware.org; Sat, 24 Apr 2010 23:52:28 +0300 (IDT) Date: Sat, 24 Apr 2010 20:52:00 -0000 From: Eli Zaretskii Subject: "set foo" To: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <8339yk1skw.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/msg00125.txt.bz2 I had a problem today whereby GDB did not recognize a certain struct when processing a .gdbinit file. Trying to understand what's going on, I noticed that after stepping through the program for a while, the struct became known at some point. I assume that this is because of delayed reading of the symbol tables, but my question is about something else. I noticed that the .gdbinit file supplied with Emacs has this line at its beginning: set main A comment there says that this is so some variables from the binary are available when .gdbinit is processed. I understand that this command somehow manages to force GDB to read the relevant portions of the symbol tables, but what I don't understand is what is the semantics of saying "set foo" in GDB where foo is some function. What does this command do, exactly? TIA