aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichal Ludvig <mludvig@suse.cz>2003-03-07 15:07:51 +0000
committerMichal Ludvig <mludvig@suse.cz>2003-03-07 15:07:51 +0000
commit166f4c7b909c96dcb24ddb7cc1129dfa0820b97e (patch)
tree7a2e282870ee8eabbd283793ff05019b920c2db4 /gdb
parent6d686a84d6402b6a34670f7c34a0112928661482 (diff)
downloadgdb-166f4c7b909c96dcb24ddb7cc1129dfa0820b97e.zip
gdb-166f4c7b909c96dcb24ddb7cc1129dfa0820b97e.tar.gz
gdb-166f4c7b909c96dcb24ddb7cc1129dfa0820b97e.tar.bz2
2002-03-07 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_save_dummy_frame_tos) (x86_64_unwind_dummy_id): New functions. (x86_64_init_abi): Register these two new functions.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/x86-64-tdep.c24
2 files changed, 30 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e249c59..0456098c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-07 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_save_dummy_frame_tos)
+ (x86_64_unwind_dummy_id): New functions.
+ (x86_64_init_abi): Register these two new functions.
+
2003-03-07 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_function_has_prologue): New function.
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 162d532..5fece43 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -924,6 +924,26 @@ x86_64_breakpoint_from_pc (CORE_ADDR *pc, int *lenptr)
return breakpoint;
}
+static void
+x86_64_save_dummy_frame_tos (CORE_ADDR sp)
+{
+ /* We must add the size of the return address that is already
+ put on the stack. */
+ generic_save_dummy_frame_tos (sp +
+ TYPE_LENGTH (builtin_type_void_func_ptr));
+}
+
+static struct frame_id
+x86_64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *frame)
+{
+ struct frame_id id;
+
+ id.pc = frame_pc_unwind (frame);
+ frame_unwind_unsigned_register (frame, SP_REGNUM, &id.base);
+
+ return id;
+}
+
void
x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -1034,6 +1054,10 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
since all supported x86-64 targets are ELF, but that might change
in the future. */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+
+ /* Dummy frame helper functions. */
+ set_gdbarch_save_dummy_frame_tos (gdbarch, x86_64_save_dummy_frame_tos);
+ set_gdbarch_unwind_dummy_id (gdbarch, x86_64_unwind_dummy_id);
}
void