PR python/18565 notes that calling frame filters don't work properly for
inlined functions. This happens because Frame.function on an inline
frame will yield the wrong result. This patch changes this code to use
find_frame_funname instead, which handles inline frames properly.
Built and regtested on x86-64 Fedora 24.
2016-08-03 Tom Tromey <tom@tromey.com>
PR python/18565:
* python/py-frame.c (frapy_function): Use find_frame_funname.
2016-08-03 Tom Tromey <tom@tromey.com>
PR python/18565:
* gdb.python/py-frame-inline.exp: Add Frame.function test.
+2016-08-03 Tom Tromey <tom@tromey.com>
+
+ PR python/18565:
+ * python/py-frame.c (frapy_function): Use find_frame_funname.
+
2016-08-03 Tom Tromey <tom@tromey.com>
* stack.c (find_frame_funname): Avoid any possible leak in case
TRY
{
+ char *funname;
+ enum language funlang;
+
FRAPY_REQUIRE_VALID (self, frame);
- sym = find_pc_function (get_frame_address_in_block (frame));
+ find_frame_funname (frame, &funname, &funlang, &sym);
+ xfree (funname);
}
CATCH (except, RETURN_MASK_ALL)
{
+2016-08-03 Tom Tromey <tom@tromey.com>
+
+ PR python/18565:
+ * gdb.python/py-frame-inline.exp: Add Frame.function test.
+
2016-08-01 Yao Qi <yao.qi@linaro.org>
* gdb.threads/process-dies-while-detaching.exp (do_test): Set
gdb_continue_to_breakpoint "Block break here."
gdb_test "python print (gdb.newest_frame())" ".*"
+
+# Regression test to verify that Frame.function works properly for
+# inline frames.
+gdb_test "python print (gdb.newest_frame().function())" "f"