From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32254 invoked by alias); 4 Apr 2013 09:35:28 -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 32244 invoked by uid 89); 4 Apr 2013 09:35:28 -0000 X-Spam-SWARE-Status: No, score=-8.8 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,TW_EB 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 09:35:26 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r349ZNe5024451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Apr 2013 05:35:24 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r349ZMSx001338; Thu, 4 Apr 2013 05:35:23 -0400 Message-ID: <515D495A.2040207@redhat.com> Date: Thu, 04 Apr 2013 09:35: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: webquinty quinty CC: gdb@sourceware.org Subject: Re: GDB and GDB/MI different reponses.... References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00005.txt.bz2 On 03/21/2013 04:30 PM, webquinty quinty wrote: > Hello, > > As you known, with GDB it is possible to obtain debug information from > executable. > > For example in GDB you can ask about type of var: > > -> whatis var > <- type = unsigned char > > I just finished a frontend to extract debug information from a process > using GDB/MI but the response is different than when I use GDB. > > For example, a struct called 'par' GDB return me type=param_typ but GDB/MI > return me anonimous struct. > > Why? This is the sort of question that is simply impossible to answer definitely without having the binary in question, or even knowing exactly what you have attempted. Please don't make us guess; be proactive. But in principle there should be no difference. I'd guess either you've used different GDBs for the CLI vs MI tests, or, you have more than one 'par' in your program, and depending on current context (what the current function/frame GDB has selected for inspecting) and perhaps phase of the moon, you'll get one answer or the other. -- Pedro Alves