From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22279 invoked by alias); 1 Nov 2010 19:08:09 -0000 Received: (qmail 22271 invoked by uid 22791); 1 Nov 2010 19:08:09 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Nov 2010 19:08:03 +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.13.8/8.13.8) with ESMTP id oA1J81Yb017332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Nov 2010 15:08:02 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oA1J81le010261; Mon, 1 Nov 2010 15:08:01 -0400 Received: from parfait.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id oA1J7x6f024121; Mon, 1 Nov 2010 15:08:00 -0400 From: Tom Tromey To: "Liu\, Lei" Cc: gdb@sourceware.org Subject: Re: Looking up enum constant symbols from C++ base classes References: <4CCE89F7.10908@windriver.com> Date: Mon, 01 Nov 2010 19:08:00 -0000 In-Reply-To: <4CCE89F7.10908@windriver.com> (Lei Liu's message of "Mon, 01 Nov 2010 17:35:51 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-11/txt/msg00008.txt.bz2 >>>>> ">" == Liu, Lei writes: >> class A { >> public: >> enum E {X,Y,Z}; >> }; >> I tried to plant a conditional breakpoint in line 14 as shown in comment >> but got a error shows 'No symbol "X" in current context'. The symbol >> 'X' is accessible in that scope. It seems that gdb has a problem to look >> up enum constant symbols derived from base classes. Yeah. >> I added some code in cp_lookup_symbol_nonlocal to make gdb look up symbols >> from all base classes. It works fine. Is this a right fix? It might be, but we'd have to see the patch to be sure. Tom