Bug 16219 - Frame.function returns wrong function
Summary: Frame.function returns wrong function
Status: RESOLVED DUPLICATE of bug 18565
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 15:18 UTC by Tom Tromey
Modified: 2016-06-19 22:29 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2013-11-25 15:18:58 UTC
Based on my reading of frapy_function, I think it
returns the wrong function in the presence of inlining.
frapy_function uses find_pc_function to find the
function symbol.  However, find_pc_function calls
find_pc_sect_function, which ends with:

  return block_linkage_function (b);

That is, it skips inlined functions and returns
the enclosing non-inlined function.

That seems wrong to me.
Comment 1 Tom Tromey 2016-06-19 22:29:22 UTC
Closing this one as a dup, as the other bug is where the
action is happening.

*** This bug has been marked as a duplicate of bug 18565 ***