diff --git a/doc/debugging_with_gdb.html b/doc/debugging_with_gdb.html index 4573d49661b..19d36f7d97b 100644 --- a/doc/debugging_with_gdb.html +++ b/doc/debugging_with_gdb.html @@ -3,6 +3,13 @@ "Path": "/doc/gdb" }--> + +
The following instructions apply to the standard toolchain @@ -57,7 +64,7 @@ use to inspect a live process or a core dump.
Pass the '-w'
flag to the linker to omit the debug information
-(for example, go build -ldflags "-w" prog.go
).
+(for example, go
build
-ldflags=-w
prog.go
).
@@ -157,7 +164,7 @@ the DWARF code.
If you're interested in what the debugging information looks like, run
-'objdump -W a.out
' and browse through the .debug_*
+objdump
-W
a.out
and browse through the .debug_*
sections.
pkg.(*MyType).Meth
.
In this tutorial we will inspect the binary of the
regexp package's unit tests. To build the binary,
-change to $GOROOT/src/regexp
and run go test -c
.
+change to $GOROOT/src/regexp
and run go
test
-c
.
This should produce an executable file named regexp.test
.
-The message "Loading Go Runtime support"
means that GDB loaded the
+The message "Loading Go Runtime support" means that GDB loaded the
extension from $GOROOT/src/runtime/runtime-gdb.py
.
-The command info locals
lists all variables local to the function and their values, but is a bit
+The command info
locals
lists all variables local to the function and their values, but is a bit
dangerous to use, since it will also try to print uninitialized variables. Uninitialized slices may cause gdb to try
to print arbitrary large arrays.
-That struct hchan<*testing.T>
is the
+That struct
hchan<*testing.T>
is the
runtime-internal representation of a channel. It is currently empty,
or gdb would have pretty-printed its contents.
@@ -45,7 +52,7 @@ of code. The Go runtime provides in the format expected by the
pprof visualization tool.
The profiling data can be collected during testing
-via go test
or endpoints made available from the
+via go
test
or endpoints made available from the
net/http/pprof package. Users need to collect the profiling data and use pprof tools to filter
and visualize the top code paths.
See go tool trace
+
See go
tool
trace
to collect and analyze runtime traces.