From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25186 invoked by alias); 26 Nov 2003 21:18:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25179 invoked from network); 26 Nov 2003 21:18:06 -0000 Received: from unknown (HELO granger.mail.mindspring.net) (207.69.200.148) by sources.redhat.com with SMTP; 26 Nov 2003 21:18:06 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by granger.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1AP72X-0002Ov-00; Wed, 26 Nov 2003 16:17:37 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id D4E7F4B40B; Wed, 26 Nov 2003 16:17:36 -0500 (EST) To: drow@mvista.com, ian@wasabisystems.com Subject: Re: C++/Java regressions Cc: gdb@sources.redhat.com Message-Id: <20031126211736.D4E7F4B40B@berman.michael-chastain.com> Date: Wed, 26 Nov 2003 21:18:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2003-11/txt/msg00265.txt.bz2 ian> Good question. My guess is that it's because lookup_symbol_aux() ian> calls current_language->la_lookup_symbol_nonlocal() before it calls ian> lookup_symbol_aux_psymtabs(). If I force la_lookup_symbol_nonlocal() ian> to return NULL, then lookup_symbol_aux_psymtabs() finds the typedef, ian> and `ptype T5' works more or less correctly. Have a look at http://sources.redhat.com/gdb/bugs/1465 I just mailed in an analysis of a similar bug. It will take some time for gnats to post it. Briefly, the call tree is: lookup_symbol_aux current_language->la_lookup_symbol_nonlocal lookup_symbol_file lookup_symbol_static [1] lookup_symbol_aux_block lookup_symbol_global [2] lookup_possible_namespace_symbol [3] lookup_symbol_aux_symtabs [4] lookup_symbol_aux_psymtabs You are probably getting a hit at [3]. Check the value of "block" in lookup_symbol_file. I bet that you have block=0. That prevents [1] from finding a match in the current static block. [4] is a kludge that looks in ALL static blocks. That's not good. Before [3] came along as part of DavidC's namespace work, [4] was happening all the time. I think the right fix is to pass a correct "block" to local_symbol_aux so that [1] can do its job properly. Michael C