This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/16157] the function get_pc_function_start (CORE_ADDR pc) maybe inaccurate
- From: "guosheng_gao at realsil dot com.cn" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 12 Nov 2013 13:18:17 +0000
- Subject: [Bug gdb/16157] the function get_pc_function_start (CORE_ADDR pc) maybe inaccurate
- Auto-submitted: auto-generated
- References: <bug-16157-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16157
--- Comment #3 from ggs334 <guosheng_gao at realsil dot com.cn> ---
look the code in the function get_pc_function_start(CORE_ADDR pc)
> CORE_ADDR
> get_pc_function_start (CORE_ADDR pc)
> {
> ...........
> ...........
> ...........
> ...........
> ...........
> ...........
> msymbol = lookup_minimal_symbol_by_pc (pc);
> if (msymbol)
> {
> CORE_ADDR fstart = SYMBOL_VALUE_ADDRESS (msymbol);
> if (find_pc_section (fstart))
> return fstart;
> }
> return 0;
>}
the label lop2 and lop3 hava adress values, if the pc value is equal to the
address of lop2 or lop3, the msymbol returned from
lookup_minimal_symbol_by_pc() must be lop2 or lop3, then uses
SYMBOL_VALUE_ADDRESS (msymbol) to get the address, and treats the address as
function start address.
I Think this is the problem, is it accurate?
--
You are receiving this mail because:
You are on the CC list for the bug.