summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/Makefile.am15
-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
3 files changed, 37 insertions, 3 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 2c10028532..81c873c9bb 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -35,9 +35,18 @@ EXTRA_DIST += $(efreetfiles_DATA)
35 35
36######################################################################## 36########################################################################
37# Eo 37# Eo
38eofilesdir = $(datadir)/eo 38eogdbdir = $(datadir)/eo/gdb
39eofiles_DATA = eo/eo_step.py 39eogdb_SCRIPTS = eo/eo_gdb.py
40EXTRA_DIST += $(eofiles_DATA) 40
41# Borrowed from gobject
42eo/libeo-gdb.py: eo/libeo-gdb.py.in
43 $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/eo/libeo-gdb.py.in > $(builddir)/eo/libeo-gdb.py
44
45install-data-hook: eo/libeo-gdb.py
46 $(MKDIR_P) $(datadir)/gdb/auto-load/$(libdir)
47 $(INSTALL) $(builddir)/eo/libeo-gdb.py $(datadir)/gdb/auto-load/$(libdir)/libeo.so.@VMAJ@.@VMIN@.@VMIC@-gdb.py
48
49EXTRA_DIST += $(gdbscripts_SCRIPTS) eo/libeo-gdb.py.in
41 50
42######################################################################## 51########################################################################
43# Edje 52# Edje
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