Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: gdb/nacl-tdep.c

Issue 10897005: Implement dummy_id for NaCl architecture because we need to sandbox frame pointer. (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/nacl-tdep.c
diff --git a/gdb/nacl-tdep.c b/gdb/nacl-tdep.c
index 9a408ddbfcb534f2b1a730b980c86be6daf521b3..f33af438dcbbac6701553a6b09c5d2754c47e16a 100644
--- a/gdb/nacl-tdep.c
+++ b/gdb/nacl-tdep.c
@@ -162,6 +162,17 @@ amd64_nacl_software_single_step (struct frame_info *frame)
return 0;
}
+static struct frame_id
+amd64_nacl_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
+{
+ CORE_ADDR fp;
+
+ fp = get_frame_register_unsigned (this_frame, AMD64_RBP_REGNUM) + 16;
+ fp = amd64_nacl_addr_bits_remove(gdbarch, fp);
+
+ return frame_id_build (fp, get_frame_pc (this_frame));
+}
+
static void
amd64_nacl_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -199,6 +210,8 @@ amd64_nacl_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_adjust_breakpoint_address (gdbarch,
amd64_nacl_adjust_breakpoint_address);
set_gdbarch_software_single_step (gdbarch, amd64_nacl_software_single_step);
+ /* Recognizing dummy frames. */
+ set_gdbarch_dummy_id(gdbarch, amd64_nacl_dummy_id);
}
/* Provide a prototype to silence -Wmissing-prototypes. */
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698