aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-04-16 10:45:21 +0100
committerTom Hacohen <tom@stosb.com>2013-04-16 11:45:34 +0100
commit9ad398be60409d093b3a1f0e579509579e878103 (patch)
tree524732be9ad7ecaa9ef04e69eea17b52338136b1 /data
parentEvas: Fix double fclose() in WebP loader (diff)
downloadefl-9ad398be60409d093b3a1f0e579509579e878103.tar.gz
Eo gdb: eo gdb script is now autoloaded by gdb, added eo_backtrace.
If you install the efl to a different path than the one gdb was installed to either set gdb's data dir, or just symlink the file to the other prefix. You can still use the old method of just loading the module.
Diffstat (limited to 'data')
-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)
########################################################################
# Eo
-eofilesdir = $(datadir)/eo
-eofiles_DATA = eo/eo_step.py
-EXTRA_DIST += $(eofiles_DATA)
+eogdbdir = $(datadir)/eo/gdb
+eogdb_SCRIPTS = eo/eo_gdb.py
+
+# Borrowed from gobject
+eo/libeo-gdb.py: eo/libeo-gdb.py.in
+ $(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/eo/libeo-gdb.py.in > $(builddir)/eo/libeo-gdb.py
+
+install-data-hook: eo/libeo-gdb.py
+ $(MKDIR_P) $(datadir)/gdb/auto-load/$(libdir)
+ $(INSTALL) $(builddir)/eo/libeo-gdb.py $(datadir)/gdb/auto-load/$(libdir)/libeo.so.@VMAJ@.@VMIN@.@VMIC@-gdb.py
+
+EXTRA_DIST += $(gdbscripts_SCRIPTS) eo/libeo-gdb.py.in
########################################################################
# 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 @@
+# Implement eo_break that'll break on a macro/subid/whatever.
+
+import gdb
+
class Eo_step(gdb.Command):
def __init__(self):
gdb.Command.__init__(self, "eo_step", gdb.COMMAND_OBSCURE)
@@ -15,3 +19,17 @@ class Eo_step(gdb.Command):
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()
+
+# Very crude, but works for the meanwhile
+class Eo_backtrace(gdb.Command):
+ def __init__(self):
+ gdb.Command.__init__(self, "eo_backtrace", gdb.COMMAND_OBSCURE)
+
+ def invoke (self, arg, from_tty):
+ btrace = gdb.execute("backtrace", False, to_string=True).split('\n')
+
+ for line in btrace:
+ if line.find("libeo.so") == -1 and line.find("src/lib/eo/") == -1:
+ print line
+
+Eo_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 @@
+import sys
+
+eodir = '@datadir@/eo/gdb'
+if not eodir in sys.path:
+ sys.path.insert(0, eodir)
+
+import eo_gdb