aboutsummaryrefslogtreecommitdiffstats
path: root/.gdbinit
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-07 06:54:24 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-07 06:54:24 +0000
commitd556a4759893243b2a0c0322d75d12ac43869ca0 (patch)
treed1b7fc2a4819db706dd4e372bccd30f11200a6be /.gdbinit
parent7e0c93b0c3225ff1ffe306af9e8ae34d3e7f57d3 (diff)
downloadruby-d556a4759893243b2a0c0322d75d12ac43869ca0.tar.gz
* .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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit13
1 files changed, 13 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
+