mirror of
https://github.com/openvswitch/ovs
synced 2025-10-21 14:49:41 +00:00
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>
This commit is contained in:
@@ -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
|
||||
----------
|
||||
|
Reference in New Issue
Block a user