From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11909 invoked by alias); 18 Aug 2012 20:56:03 -0000 Received: (qmail 11899 invoked by uid 22791); 18 Aug 2012 20:56:02 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Aug 2012 20:55:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EF97F1C6413; Sat, 18 Aug 2012 16:55:48 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ST6KPLqtLUk9; Sat, 18 Aug 2012 16:55:48 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B37661C63F2; Sat, 18 Aug 2012 16:55:48 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 5DF8314561A; Sat, 18 Aug 2012 13:55:43 -0700 (PDT) Date: Sat, 18 Aug 2012 20:56:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: New warning in GDB 7.5 Message-ID: <20120818205543.GL2798@adacore.com> References: <838vdcdl2q.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <838vdcdl2q.fsf@gnu.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00519.txt.bz2 > These come from the following 2 lines in src/.gdbinit: > > # Force loading of symbols, enough to give us VALBITS etc. > set main > # With some compilers, we need this to give us struct Lisp_Symbol etc.: > set Fmake_symbol > The comments explain why they are needed. Are these really doing anything? Unless "main" and "Fmake_symbol" were settings, I think the warning is actually correct: these commands have no effect. > Why was the new warning added? what problem(s) does it solve? The warning was added to catch the situation where the wrong assignment operator was used. This is very common when you debug a multi-language application. For instance, when debugging Ada, one might write the following: (gdb) set blabla = 10 But, in Ada mode, the correct assignment operator is ":=", while "=" is the comparison operator. When you keep switching back and forth between Ada and C code, it's very easy to make that mistake. -- Joel