diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-03-10 18:06:26 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-03-10 18:06:26 +0000 |
commit | 05c56a9d39c46c42fa32adf1604432cede705528 (patch) | |
tree | cea76672659bdb6172513df3dc5c0d9bab88386e /gdb/dwarf2-frame-tailcall.c | |
parent | 9112db09262029f15cc9e8c77fc06b79b8148e8c (diff) | |
download | gdb-05c56a9d39c46c42fa32adf1604432cede705528.zip gdb-05c56a9d39c46c42fa32adf1604432cede705528.tar.gz gdb-05c56a9d39c46c42fa32adf1604432cede705528.tar.bz2 |
gdb/
Fix entry-values if the callee called a noreturn function.
* dwarf2-frame-tailcall.c (dwarf2_tailcall_sniffer_first): Use
get_frame_address_in_block. Add new comment.
gdb/testsuite/
Fix entry-values if the callee called a noreturn function.
* gdb.arch/amd64-tailcall-noret.S: New file.
* gdb.arch/amd64-tailcall-noret.c: New file.
* gdb.arch/amd64-tailcall-noret.exp: New file.
Diffstat (limited to 'gdb/dwarf2-frame-tailcall.c')
-rw-r--r-- | gdb/dwarf2-frame-tailcall.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2-frame-tailcall.c index b5f95c3..b82a051 100644 --- a/gdb/dwarf2-frame-tailcall.c +++ b/gdb/dwarf2-frame-tailcall.c @@ -374,7 +374,9 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame, gdb_assert (*tailcall_cachep == NULL); - this_pc = get_frame_pc (this_frame); + /* PC may be after the function if THIS_FRAME calls noreturn function, + get_frame_address_in_block will decrease it by 1 in such case. */ + this_pc = get_frame_address_in_block (this_frame); /* Catch any unwinding errors. */ TRY_CATCH (except, RETURN_MASK_ERROR) |