summaryrefslogtreecommitdiff
path: root/data/eo/eo_step.py
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2012-12-12 13:16:49 +0000
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2012-12-12 13:16:49 +0000
commit0e913e9415fa334127fd74623be9259080962599 (patch)
treee3626cd4a75b86ffd5516b17f2863dd09237abbf /data/eo/eo_step.py
parent19e600254faf3e7f85dc47929f28acc63d37283e (diff)
eo_step gdb script installation to help debugging of applications by
stepping over Eo. To do it: - Write in ~/.gdbinit "source prefix/share/eo/eo_step.py" (prefix is usually/opt/e17) - in gdb, when arriving to eo_function (eo_do, eo_do_super), execute eo_step. This script will step into the code until it reaches a function that doesn't belong to libeo. Because of a bug in gdb that will be fixed in 7.6, if after having used the script once, you rerun your application and reexecute the script, a segmentation fault can occur. Sorry for the inconvenience. Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com> SVN revision: 80760
Diffstat (limited to '')
-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 0000000000..54dd998648
--- /dev/null
+++ b/data/eo/eo_step.py
@@ -0,0 +1,17 @@
1class Eo_step(gdb.Command):
2 def __init__(self):
3 gdb.Command.__init__(self, "eo_step", gdb.COMMAND_OBSCURE)
4
5 def invoke (self, arg, from_tty):
6 # While libeo is not reached, we step into
7 while gdb.solib_name(gdb.selected_frame().pc()).find("libeo.so") == -1:
8 # step by one assembly instruction, no print
9 gdb.execute("stepi", False, to_string=True)
10
11 # While we are in libeo or in an unknown function, we step into
12 while (gdb.selected_frame().function() == None) or (gdb.solib_name(gdb.selected_frame().pc()).find("libeo.so") != -1):
13 # step by one assembly instruction, no print
14 gdb.execute("stepi", False, to_string=True)
15
16 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())
17Eo_step()