From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27456 invoked by alias); 3 Nov 2010 17:57:20 -0000 Received: (qmail 27448 invoked by uid 22791); 3 Nov 2010 17:57:19 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Nov 2010 17:57:15 +0000 Received: (qmail 29615 invoked from network); 3 Nov 2010 17:57:13 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Nov 2010 17:57:13 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [PATCH] call cp_lookup_symbol_namespace recursively to search symbols in C++ base classes Date: Wed, 03 Nov 2010 17:57:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: "Liu, Lei" References: <4CCF89F0.5090100@windriver.com> <201011030009.47662.pedro@codesourcery.com> <4CD0CF42.8010203@windriver.com> In-Reply-To: <4CD0CF42.8010203@windriver.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201011031757.10712.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2010-11/txt/msg00070.txt.bz2 FYI, I'm still looking at this. I found out that in the case there's global symbol with the same name of the class symbol that we actually want, gdb finds _that_: enum E { X, Y, Z } ee; class A { public: enum E { X, Y, Z }; }; class B : public A { public: void test (E e); }; void B::test(E e) { if (e == X) /* set breakpoint here */ test (Z); } Meaning, when stopped at the breapoint line, we'd get: (gdb) p X $1 = X Instead of the correct: (gdb) p X $1 = A::X Fixing... -- Pedro Alves