summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gdbinit13
-rw-r--r--ChangeLog7
2 files changed, 20 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
index c86081f6ec..6481376d48 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -755,3 +755,16 @@ define rb_ps_thread
set $ps_thread_id = $arg1
print $ps_thread_th = (rb_thread_t*)$ps_thread->data
end
+
+# Details: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
+define trace_machine_instructions
+ set logging on
+ set height 0
+ set width 0
+ display/i $pc
+ while !$exit_code
+ info line *$pc
+ si
+ end
+end
+
diff --git a/ChangeLog b/ChangeLog
index 405a24da5d..a083cd720c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Jun 07 15:53:03 2012 Koichi Sasada <ko1@atdot.net>
+
+ * .gdbinit: add function `trace_machine_instructions' to trace
+ in native machine assemble.
+ See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
+ for more details.
+
Wed Jun 6 21:31:21 2012 Tanaka Akira <akr@fsij.org>
* process.c (proc_exec_cmd) renamed from proc_exec_v.