From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5253 invoked by alias); 4 Apr 2013 10:15:56 -0000 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 Received: (qmail 5239 invoked by uid 89); 4 Apr 2013 10:15:56 -0000 X-Spam-SWARE-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 04 Apr 2013 10:15:44 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r34AFYKA011688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Apr 2013 06:15:34 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r34AFWCn018767; Thu, 4 Apr 2013 06:15:33 -0400 Message-ID: <515D52C3.7090404@redhat.com> Date: Thu, 04 Apr 2013 10:15:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: John Martin CC: gdb@sourceware.org Subject: Re: GDB and GDB/MI different reponses.... References: <515D495A.2040207@redhat.com> <515D425E.90001@larraioz.com> In-Reply-To: <515D425E.90001@larraioz.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00008.txt.bz2 On 04/04/2013 10:05 AM, John Martin wrote: > Perhaps it isn't enough information. > > I have fixed the problem but I don't understand how to do it. > > If I execute the follow command: > "gdb --interpreter=mi --readnow" then I have several anonimous structs. > > But if I call gdb without "--readnow" argument, then GDB/MI return me correct structs types. Okay, then MI seems to be a red herring. You should see the same (--readnow vs no --readnow) with the CLI? > What is "--readnow"? >From gdb --help: --readnow Fully read symbol files on first access. Reading debug info is a slow process, and without that switch (the default), GDB will read in debug info lazily, as necessary. It is not advisable to use --readnow. It's mostly useful for debugging/testing gdb's debug info read speed. In principle, that switch should not cause user visible behavior change. But if you have more than one variable with the same name in your program, reading in all debug info preemptively could change which variable happens to find first (this is the kind of thing I was referring to as "phase of the moon", btw). I think we have bug reports open around this. -- Pedro Alves