forked from enlightenment/efl
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: 80760devs/devilhorns/wayland_egl
parent
19e600254f
commit
0e913e9415
2 changed files with 21 additions and 1 deletions
@ -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() |
Loading…
Reference in new issue