From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20630 invoked by alias); 25 Jun 2009 15:59:16 -0000 Received: (qmail 20622 invoked by uid 22791); 25 Jun 2009 15:59:15 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_75,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Jun 2009 15:59:08 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5PFx7pd020242 for ; Thu, 25 Jun 2009 11:59:07 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5PFx6OO008951; Thu, 25 Jun 2009 11:59:06 -0400 Received: from opsy.redhat.com (vpn-13-18.rdu.redhat.com [10.11.13.18]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5PFx5t2028920; Thu, 25 Jun 2009 11:59:05 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id DA4673785DB; Thu, 25 Jun 2009 09:59:04 -0600 (MDT) To: Sami Wagiaalla Cc: GDB Patches Subject: Re: [PATCH 2/2] namespace support References: <4A16BBC7.3080608@redhat.com> <4A428FA7.2040004@redhat.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Thu, 25 Jun 2009 15:59:00 -0000 In-Reply-To: <4A428FA7.2040004@redhat.com> (Sami Wagiaalla's message of "Wed\, 24 Jun 2009 16\:42\:15 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-06/txt/msg00671.txt.bz2 >>>>> "Sami" == Sami Wagiaalla writes: Sami> I have added a test case. Thanks. Tom> I suppose these arguments ought to be renamed, now that you have Tom> renamed the struct fields... Sami> Agreed. Is it cool if I add this to the struct field rename patch. Sure, just remember to post the updated patch. Sami> + int outer_len = (previous_component == 0 ? 0 : previous_component - 2); Sami> + int inner_len = next_component; Sami> + char *outer = alloca (outer_len + 1); Sami> + char *inner = alloca (inner_len + 1); Sami> + Sami> + strncpy(outer, name, outer_len); Sami> + strncpy(inner, name, inner_len); Missing spaces before the open parens. Also, I think you should just use memcpy here. Sami> +int main(){ Sami> + using namespace A::B; Sami> + return C::x; Sami> +} Sami> \ No newline at end of file Add a newline... Sami> +gdb_test "print C::x" "= 5" Sami> \ No newline at end of file ... and here too. Ok with those changes. Thanks. Tom