From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26758 invoked by alias); 7 Oct 2003 01:49:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26751 invoked from network); 7 Oct 2003 01:49:42 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 7 Oct 2003 01:49:42 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 1A6gys-0004qr-Hq for ; Mon, 06 Oct 2003 21:49:42 -0400 Date: Tue, 07 Oct 2003 01:49:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFC] lookup problem in blockframe.c:inside_main_func() Message-ID: <20031007014942.GA18589@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20031006233728.GB933@gnat.com> <20031007001543.GA16602@nevyn.them.org> <20031007002422.GF933@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031007002422.GF933@gnat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00147.txt.bz2 On Mon, Oct 06, 2003 at 05:24:22PM -0700, Joel Brobecker wrote: > > [First of all, what path takes you through lookup_symbol to that > > prompt? That shouldn't ever happen, unless it's being generated in > > Ada-specific code...] > > It is generated in ada-specific code. Just FYI, here is our ada-specific > lookup function, which is hooked into the language vector: > > struct symbol * > ada_lookup_symbol ([snip]) > { > [snip] > n_candidates = ada_lookup_symbol_list (ada_mangle (ada_fold_name (name)), > block0, namespace, &candidates); > > if (n_candidates == 0) > return NULL; > else if (n_candidates != 1) > user_select_syms (candidates, n_candidates, 1); <<<----- > [snip] > } > > user_select_syms causes the menu to appear... Oh... I see that Ada already has an interface for selecting a list of symbols. Another bit that doesn't belong anywhere near the language-specific code, if you'll permit some historical ranting. That should be pushed out to the symtab layer. I'll be back to that after I finish something I'm working on in the breakpoint code, so that the list of multiple symbols is actually useful. > > Don't use lookup_symbol? On David's branch there's a minsym function > > for finding the minimal symbol associated with a mangled name. I > > thought it had been merged to mainline but it hasn't. Something to do > > the same for symbols would be reasonable, although rare. > > > Or you could > > just use the minsym version, and then call find_pc_function. > > That's a good idea, I think. Lookup the minsym.... Hmmm, let me explore > this path. Thanks! Follow along with the code immediately above in the same function. Beware, right now that minsym code may find the one which demangles to main; but that should change. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer