From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15914 invoked by alias); 27 Oct 2010 08:09:27 -0000 Received: (qmail 15900 invoked by uid 22791); 27 Oct 2010 08:09:25 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-qy0-f176.google.com (HELO mail-qy0-f176.google.com) (209.85.216.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Oct 2010 08:09:15 +0000 Received: by qyk4 with SMTP id 4so468902qyk.0 for ; Wed, 27 Oct 2010 01:09:13 -0700 (PDT) Received: by 10.224.200.129 with SMTP id ew1mr2239993qab.75.1288166953583; Wed, 27 Oct 2010 01:09:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.191.131 with HTTP; Wed, 27 Oct 2010 01:08:53 -0700 (PDT) In-Reply-To: <89AE14E37D740B4796DC14566DF6325ECB7F3CD215@SJEXCHCCR02.corp.ad.broadcom.com> References: <89AE14E37D740B4796DC14566DF6325ECB7F3CD215@SJEXCHCCR02.corp.ad.broadcom.com> From: Eran Ifrah Date: Wed, 27 Oct 2010 08:09:00 -0000 Message-ID: Subject: Re: GDB/MI - var-update/create BUG To: Andrew Burgess Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 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-10/txt/msg00105.txt.bz2 On Wed, Oct 27, 2010 at 9:50 AM, Andrew Burgess wrote: >> On 26 October 2010 23:02, Behalf Of Eran Ifrah wrote: >> >> Here is the debug session for the above code: >> >> ( starting from first line of main() ) >> (gdb) >> -var-create - * mystr._M_dataplus._M_p >> ^done,name="var1",numchild="1",value="0x28ff28 \"h\\377(\"",type="char >> *",thread-id="1",has_more="0" > > Using "*" ties the creation of the variable to the current frame. Changing to use "@" will create a floating variable that will use the current _active_ frame. This seems to produce the result you are looking for. > Thank you! this was exactly what I was overlooked. I was using the wrong docs link: http://www.delorie.com/gnu/docs/gdb/gdb_235.html While I should have looked at: http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html#GDB_002fMI-Variable-Objects > Thanks, > Andrew > > -- Eran Ifrah Cross platform, open source C++ IDE: http://www.codelite.org