diff options
authorTom Hacohen <>2016-09-22 13:16:18 +0100
committerTom Hacohen <>2016-09-22 13:59:46 +0100
commitb242f50626c57212d2b6525d8bddc8f0595971f4 (patch)
parent903dbde84a45c5376f2d4ac88ac74bacc1a1bf2f (diff)
Eo: introducing
This has been in the making for a very long time. Thanks to Marcel for reminding me to do it. What is it? This is a tool to help application developers debug their apps with everything Eo. Eo is strict, but not as strict as it can be. Many strict tests and debug are very expensive to implement, and we have so many hot-paths that even basic "ifs" to check if debugging is enabled will add significant overhead to normal running applications. This is why I created this library. All the expensive tests and bookkeeping should be wrapped around with "#ifdef EO_DEBUG". With this change, is compiled twice, once normally, and once with this define set (as This means that normal eo code will not be affected, but if you decide to debug your application, all you need to do is: LD_PRELOAD=/path/to/ ./app Or use the convenient wrapper: eo_debug ./app Which will load the debug heavy version. What's currently there: at the moment, EO_DEBUG enables xref and data_xref and stricter tests when fetching object data. In the future, I also plan introducing "zombie objects", which essentially mean that objects are never really deleted, so you can query them long after they are gone to get more information on what they were. So if for example you have an object id that you want to query after the object has been deleted, you can. I also plan on having a way to disable/enable certain debug mode features via env vars, and maybe make the test suite link against this one instead of the normal one, and possibly add more internal hooks for the test suite to better inspect internal state? P.S: The amount of errors spewed out when running it on elementary_test makes me wish I wrote this earlier. :( @feature
3 files changed, 23 insertions, 1 deletions
diff --git a/ b/
index d0b9962823..61d3c9d7f9 100644
--- a/
+++ b/
@@ -5760,6 +5760,7 @@ src/lib/eina/eina_config.h
5760src/lib/ecore_x/ecore_x_version.h 5760src/lib/ecore_x/ecore_x_version.h
5761src/lib/efl/Efl_Config.h 5761src/lib/efl/Efl_Config.h
5762src/lib/elementary/Elementary.h 5762src/lib/elementary/Elementary.h
5763elm_intro.h 5764elm_intro.h
5764spec/efl.spec 5765spec/efl.spec
5765pc/evil.pc 5766pc/evil.pc
diff --git a/src/ b/src/
index 80460ef791..eefa6119f8 100644
--- a/src/
+++ b/src/
@@ -14,7 +14,8 @@ BUILT_SOURCES += \
14 $(eo_eolian_c) \ 14 $(eo_eolian_c) \
15 $(eo_eolian_h) 15 $(eo_eolian_h)
16 16
17lib_LTLIBRARIES += lib/eo/ 17lib_LTLIBRARIES += lib/eo/ \
18 lib/eo/
18 19
19installed_eomainheadersdir = $(includedir)/eo-@VMAJ@ 20installed_eomainheadersdir = $(includedir)/eo-@VMAJ@
20dist_installed_eomainheaders_DATA = lib/eo/Eo.h lib/eo/efl_future.h 21dist_installed_eomainheaders_DATA = lib/eo/Eo.h lib/eo/efl_future.h
@@ -38,6 +39,17 @@ lib_eo_libeo_la_LIBADD = @EO_LIBS@
39lib_eo_libeo_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ 40lib_eo_libeo_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
40 41
42### The Eo debug build
43lib_eo_libeo_dbg_la_SOURCES = $(lib_eo_libeo_la_SOURCES)
44lib_eo_libeo_dbg_la_CPPFLAGS = $(lib_eo_libeo_la_CPPFLAGS) -DEO_DEBUG
45lib_eo_libeo_dbg_la_LIBADD = $(lib_eo_libeo_la_LIBADD)
46lib_eo_libeo_dbg_la_DEPENDENCIES = $(lib_eo_libeo_la_DEPENDENCIES)
47lib_eo_libeo_dbg_la_LDFLAGS = $(lib_eo_libeo_la_LDFLAGS)
49bin_SCRIPTS += scripts/eo/eo_debug
41eoeolianfilesdir = $(datadir)/eolian/include/eo-@VMAJ@ 53eoeolianfilesdir = $(datadir)/eolian/include/eo-@VMAJ@
42eoeolianfiles_DATA = \ 54eoeolianfiles_DATA = \
43 $(eo_eolian_files) \ 55 $(eo_eolian_files) \
diff --git a/src/scripts/eo/ b/src/scripts/eo/
new file mode 100644
index 0000000000..a289efa6ad
--- /dev/null
+++ b/src/scripts/eo/
@@ -0,0 +1,9 @@
4if [ $# -lt 1 ]
6 echo "Usage: $0 <executable> [executable parameters]"
8 LD_PRELOAD="@libdir@/" "$@"