summaryrefslogtreecommitdiff
path: root/tutorial/Tutorial.md
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2015-02-18 17:17:33 -0800
committerAndy Zhou <azhou@nicira.com>2015-02-19 13:57:52 -0800
commit8da7cd8c8ff8a2915f42f72ff2be609856b0b52d (patch)
tree07d33a76478cc2a162a314085397aa31ad75311c /tutorial/Tutorial.md
parentbcbb130f154cb017a5714ac97edcdef7b4032212 (diff)
downloadopenvswitch-8da7cd8c8ff8a2915f42f72ff2be609856b0b52d.tar.gz
ovs-sandbox: Add an option to allow running ovs-vswitchd under gdb
It is some times useful to leverage the sandbox facility to experiment and explore the internals of ovs-vswitchd. Since GDB requires console access for user inputs, this patch launch an xterm for GDB, The main terminal continue to run the sub-shell as before. Exiting the sub-shell will also kill the ovs-vswitchd under GDB (but not GDB itself currently) Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tutorial/Tutorial.md')
-rw-r--r--tutorial/Tutorial.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/tutorial/Tutorial.md b/tutorial/Tutorial.md
index d6a963b0f..d9e800475 100644
--- a/tutorial/Tutorial.md
+++ b/tutorial/Tutorial.md
@@ -104,6 +104,27 @@ The sandbox directory contains log files for the Open vSwitch dameons.
You can examine them while you're running in the sandboxed environment
or after you exit.
+Using GDB
+---------
+
+GDB support is not required to go through the tutorial. It is added in case
+user wants to explore the internals of OVS programs.
+
+GDB can already be used to debug any running process, with the usual
+'gdb <program> <process-id>' command.
+
+'ovs-sandbox' also has a '-g' option for launching ovs-vswitchd under GDB.
+This option can be handy for setting break points before ovs-vswitchd runs,
+or for catching early segfaults.
+
+To avoid GDB mangling with the sandbox sub shell terminal, 'ovs-sandbox'
+starts a new xterm to run each GDB session. For systems that do not support
+X windows, GDB support is effectively disabled.
+
+When launching sandbox through the build tree's make file, the '-g' option
+can be passed via the 'SANDBOXFLAGS' environment variable.
+'make sandbox SANDBOXFLAGS=-g' will start the sandbox with ovs-vswitchd
+running under GDB in its own xterm if X is available.
Motivation
----------