From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9454 invoked by alias); 3 Jan 2013 03:46:18 -0000 Received: (qmail 9445 invoked by uid 22791); 3 Jan 2013 03:46:15 -0000 X-SWARE-Spam-Status: No, hits=-2.0 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; Thu, 03 Jan 2013 03:46:11 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AD5012E273; Wed, 2 Jan 2013 22:46:09 -0500 (EST) 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 w3AraFR8Ux5a; Wed, 2 Jan 2013 22:46:09 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 736DD2E26C; Wed, 2 Jan 2013 22:46:08 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id BBFDBC23B0; Thu, 3 Jan 2013 07:46:02 +0400 (RET) Date: Thu, 03 Jan 2013 03:46:00 -0000 From: Joel Brobecker To: Luis Machado Cc: Andreas Schwab , Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix mi "-var-create" regression Message-ID: <20130103034602.GA3863@adacore.com> References: <20121014171805.GB3050@adacore.com> <507BFF97.2000900@codesourcery.com> <87y5j4ziof.fsf@fleche.redhat.com> <508DB53E.30507@codesourcery.com> <20121129210737.GM3581@adacore.com> <50B81642.9020705@codesourcery.com> <20121207024813.GD31477@adacore.com> <50C159A3.4020507@codesourcery.com> <50DAEE08.8010200@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50DAEE08.8010200@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2013-01/txt/msg00032.txt.bz2 > This patch addresses the problem Andreas saw by creating a variable > of type (void *). This way we are guaranteed to have the type we > need to reproduce the problem. I don't see a problem with that. But can you add a comment explaining why you are casting the register to void *? Thanks! > diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog > index 4620c2e..9ffd991 100644 > --- a/gdb/testsuite/ChangeLog > +++ b/gdb/testsuite/ChangeLog > @@ -1,3 +1,8 @@ > +2012-12-26 Luis Machado > + > + * gdb.mi/mi-var-create-rtti.exp: Create a variable of > + type void *. > + > 2012-12-25 Jan Kratochvil > > * gdb.mi/mi-fullname-deleted.exp: New file. > diff --git a/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp b/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp > index 16d8551..d6697de 100644 > --- a/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp > +++ b/gdb/testsuite/gdb.mi/mi-var-create-rtti.exp > @@ -46,7 +46,7 @@ if ![mi_run_to_main] { > mi_gdb_test "-gdb-set print object on" ".*" > > # Test creating a variable for $sp > -mi_gdb_test "-var-create sp1 * \$sp" \ > +mi_gdb_test "-var-create sp1 * ((void*)\$sp)" \ > "\\^done,name=\"sp1\",numchild=\"0\",value=\"$hex\",type=\"void \\*\",has_more=\"0\"" \ > "-var-create sp1 * \$sp" > gdb_exit -- Joel