aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-09-19 17:59:01 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-10-09 14:08:29 +0200
commitf0ae5e64c8b2948b6d95c6db96bed55fc17d9936 (patch)
tree535ab1fcb81189706d963467cd8d6b6f57d5e157
parent70fe993324e901254c3e42225f9e5f5d111b1b14 (diff)
Add documentation on debugging features
Change-Id: I8c524bb290097524f5ad9d70fe93f19824f1faa7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--docs/SUMMARY.md1
-rw-r--r--docs/afb-daemon-debugging.md36
2 files changed, 37 insertions, 0 deletions
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
index 9fed80c7..44b06f8d 100644
--- a/docs/SUMMARY.md
+++ b/docs/SUMMARY.md
@@ -11,3 +11,4 @@
* [Annexes](annexes.md)
* [Installing the binder on a desktop](afb-desktop-package.md)
* [Options of afb-daemon](afb-daemon-options.md)
+ * [Debugging afb-daemon](afb-daemon-debugging.md)
diff --git a/docs/afb-daemon-debugging.md b/docs/afb-daemon-debugging.md
new file mode 100644
index 00000000..dd5fd64b
--- /dev/null
+++ b/docs/afb-daemon-debugging.md
@@ -0,0 +1,36 @@
+# Debugging afb-daemon and its bindings
+
+When compiled with the symbol AGL_DEVEL defined, the ***binder***
+understand the 2 configuration variables:
+
+ - AFB_DEBUG_BREAK: to emit interrupts
+ - AFB_DEBUG_WAIT: to wait interrupts
+
+To use these variables, assign it the list of break or wait points
+to reach.
+
+Example:
+
+```bash
+$ AFB_DEBUG_BREAK=main-entry AFB_DEBUG_WAIT=start-load,start-exec afb-daemon ....
+```
+
+This tells to ***afb-daemon*** to break at the point **main-entry** and to
+wait at the points **start-load** and **start-exec**.
+
+The items of the list can be separated using comma, space, tab or new-line.
+
+The break/wait points are, in the order of their occurence:
+
+- main-entry: before decode arguments
+- main-args: before daemon setup
+- main-start: before starting jobs
+- start-entry: before initialisation of sessions and hooks
+- start-load: before load and pre-init of bindings
+- start-start: before init of bindings
+- start-http: before start of http server
+- start-call: before execution of requests of the command line (option --call)
+- start-exec: before execution of child preocees
+
+Note also that a call to 'personality' is inserted just after
+the point start-start.