summaryrefslogtreecommitdiff
path: root/data/eo
diff options
context:
space:
mode:
Diffstat (limited to 'data/eo')
-rw-r--r--data/eo/eo_gdb.py (renamed from data/eo/eo_step.py)18
-rw-r--r--data/eo/libeo-gdb.py.in7
2 files changed, 25 insertions, 0 deletions
diff --git a/data/eo/eo_step.py b/data/eo/eo_gdb.py
index 54dd998648..1fe8be6fbf 100644
--- a/data/eo/eo_step.py
+++ b/data/eo/eo_gdb.py
@@ -1,3 +1,7 @@
1# Implement eo_break that'll break on a macro/subid/whatever.
2
3import gdb
4
1class Eo_step(gdb.Command): 5class Eo_step(gdb.Command):
2 def __init__(self): 6 def __init__(self):
3 gdb.Command.__init__(self, "eo_step", gdb.COMMAND_OBSCURE) 7 gdb.Command.__init__(self, "eo_step", gdb.COMMAND_OBSCURE)
@@ -15,3 +19,17 @@ class Eo_step(gdb.Command):
15 19
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()) 20 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() 21Eo_step()
22
23# Very crude, but works for the meanwhile
24class Eo_backtrace(gdb.Command):
25 def __init__(self):
26 gdb.Command.__init__(self, "eo_backtrace", gdb.COMMAND_OBSCURE)
27
28 def invoke (self, arg, from_tty):
29 btrace = gdb.execute("backtrace", False, to_string=True).split('\n')
30
31 for line in btrace:
32 if line.find("libeo.so") == -1 and line.find("src/lib/eo/") == -1:
33 print line
34
35Eo_backtrace()
diff --git a/data/eo/libeo-gdb.py.in b/data/eo/libeo-gdb.py.in
new file mode 100644
index 0000000000..de1c3d02f8
--- /dev/null
+++ b/data/eo/libeo-gdb.py.in
@@ -0,0 +1,7 @@
1import sys
2
3eodir = '@datadir@/eo/gdb'
4if not eodir in sys.path:
5 sys.path.insert(0, eodir)
6
7import eo_gdb