aboutsummaryrefslogtreecommitdiffstats
path: root/data/eo/eo_step.py
diff options
context:
space:
mode:
Diffstat (limited to 'data/eo/eo_step.py')
-rw-r--r--data/eo/eo_step.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/data/eo/eo_step.py b/data/eo/eo_step.py
new file mode 100644
index 000000000..54dd99864
--- /dev/null
+++ b/data/eo/eo_step.py
@@ -0,0 +1,17 @@
+class Eo_step(gdb.Command):
+ def __init__(self):
+ gdb.Command.__init__(self, "eo_step", gdb.COMMAND_OBSCURE)
+
+ def invoke (self, arg, from_tty):
+ # While libeo is not reached, we step into
+ while gdb.solib_name(gdb.selected_frame().pc()).find("libeo.so") == -1:
+ # step by one assembly instruction, no print
+ gdb.execute("stepi", False, to_string=True)
+
+ # While we are in libeo or in an unknown function, we step into
+ while (gdb.selected_frame().function() == None) or (gdb.solib_name(gdb.selected_frame().pc()).find("libeo.so") != -1):
+ # step by one assembly instruction, no print
+ gdb.execute("stepi", False, to_string=True)
+
+ print "Stopped at file " + gdb.selected_frame().find_sal().symtab.filename+ " line " + str(gdb.selected_frame().find_sal().line) + " function " + str(gdb.selected_frame().function())
+Eo_step()