aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-10-20 23:57:23 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-10-20 23:57:23 +0000
commit13294f7d626a01f6b74e9302c599518f5211117e (patch)
treef33a2ca5fc95c4c4d5e63c4a9262ce447a3c6211 /gdb
parent460c1c54b4ea43fc33af593431eab18e30395455 (diff)
downloadgdb-13294f7d626a01f6b74e9302c599518f5211117e.zip
gdb-13294f7d626a01f6b74e9302c599518f5211117e.tar.gz
gdb-13294f7d626a01f6b74e9302c599518f5211117e.tar.bz2
gdb/
* dwarf2-frame-tailcall.c: Include dwarf2-frame.h. (dwarf2_tailcall_prev_register_first): Use dwarf2_frame_cfa. (dwarf2_tailcall_sniffer_first): Remove variable pc_regnum. Replace gdbarch_pc_regnum and frame_unwind_register_unsigned by gdbarch_unwind_pc.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/dwarf2-frame-tailcall.c10
2 files changed, 13 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3170446..dcc28ec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Ulrich Weigand <uweigand@de.ibm.com>
+
+ * dwarf2-frame-tailcall.c: Include dwarf2-frame.h.
+ (dwarf2_tailcall_prev_register_first): Use dwarf2_frame_cfa.
+ (dwarf2_tailcall_sniffer_first): Remove variable pc_regnum. Replace
+ gdbarch_pc_regnum and frame_unwind_register_unsigned by
+ gdbarch_unwind_pc.
+
2011-10-20 Cary Coutant <ccoutant@google.com>
* dwarf2read.c (dw2_get_file_names): Move adjustment for type
diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2-frame-tailcall.c
index 3813115..d2fd9c4 100644
--- a/gdb/dwarf2-frame-tailcall.c
+++ b/gdb/dwarf2-frame-tailcall.c
@@ -29,6 +29,7 @@
#include "gdbtypes.h"
#include "regcache.h"
#include "value.h"
+#include "dwarf2-frame.h"
/* Contains struct tailcall_cache indexed by next_bottom_frame. */
static htab_t cache_htab;
@@ -280,7 +281,7 @@ dwarf2_tailcall_prev_register_first (struct frame_info *this_frame,
if (next_levels == cache->chain_levels - 1)
addr = cache->prev_sp;
else
- addr = get_frame_base (this_frame) - cache->entry_cfa_sp_offset;
+ addr = dwarf2_frame_cfa (this_frame) - cache->entry_cfa_sp_offset;
}
else
return NULL;
@@ -380,15 +381,12 @@ dwarf2_tailcall_sniffer_first (struct frame_info *this_frame,
/* Catch any unwinding errors. */
TRY_CATCH (except, RETURN_MASK_ERROR)
{
- int pc_regnum, sp_regnum;
+ int sp_regnum;
prev_gdbarch = frame_unwind_arch (this_frame);
- pc_regnum = gdbarch_pc_regnum (prev_gdbarch);
- if (pc_regnum == -1)
- break;
/* Simulate frame_unwind_pc without setting this_frame->prev_pc.p. */
- prev_pc = frame_unwind_register_unsigned (this_frame, pc_regnum);
+ prev_pc = gdbarch_unwind_pc (prev_gdbarch, this_frame);
/* call_site_find_chain can throw an exception. */
chain = call_site_find_chain (prev_gdbarch, prev_pc, this_pc);