This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/symtab] Move find_pc_section call to lookup_minimal_symbol_by_pc
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: Elena Zannoni <ezannoni at redhat dot com>, Adam Fedor <fedor at doc dot com>,"gdb-patches at sources dot redhat dot com" <gdb-patches at sources dot redhat dot com>
- Date: Mon, 9 Feb 2004 10:32:12 -0500
- Subject: Re: [rfa/symtab] Move find_pc_section call to lookup_minimal_symbol_by_pc
- References: <4016E401.2050001@gnu.org><16409.26976.292424.689823@localhost.redhat.com><1075433366.29218.7.camel@localhost.localdomain><16417.28535.67901.37314@localhost.redhat.com><40217AE6.9060500@gnu.org><4023E404.2090407@gnu.org>
Andrew Cagney writes:
>
> > Um, I'm not sure what is happening. My GNU/Linux amd64 box appears to pass both times:
>
> I've found the right machine (YelloDog 3.0), the attached appears to
> work on both yellow dog and IRIX (and Fedora Core).
>
> The new patch modifies find_pc_partial_function supply the PC's section
> when available.
>
> Look ok?
>
> The problem was that the symbol lookup was finding a symbol from a
> previous section, instead of no symbol in the current section. That
> leads to this test (using Joe's rewrite):
>
> > + if (ecs->stop_func_name == NULL
> > + && step_over_calls == STEP_OVER_UNDEBUGGABLE)
> > + {
> > + /* We couldn't determine where we stopped, so we just stepped
> > + inside undebuggable code. Since we want to step over this
> > + kind of code, we keep going until the inferior returns from
> > + the current function. */
> > + handle_step_into_function (ecs);
> > + return;
> > + }
>
> not triggering. ->stop_func_name had a non-NULL but bogus symbol name.
So, the complete fix includes Joel's patch?
>
> ok?
sure, let's see what other obscure cases break now. :-)
> PS: I think GDB has a few too many symbol lookup interfaces :-(
yes.
>
> 2004-02-06 Andrew Cagney <cagney@redhat.com>
>
> * blockframe.c (find_pc_partial_function): If find_pc_overlay
> fails, try find_pc_section. Fix PR c++/1267.
> * minsyms.c (lookup_minimal_symbol_by_pc): Use find_pc_section
> instead of find_pc_mapped_section.
> (lookup_minimal_symbol_by_pc_section): If the SECTION is NULL, do
> not default to the section containing PC. Fix PR symtab/1519.
>