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.

@@ -180,7 +187,7 @@ the form 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.

@@ -206,7 +213,7 @@ Loading Go Runtime support.

-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.

@@ -371,7 +378,7 @@ Stack level 0, frame at 0x7ffff7f9ff88:

-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.

@@ -404,7 +411,7 @@ $3 = struct hchan<*testing.T>

-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.

diff --git a/doc/diagnostics.html b/doc/diagnostics.html index 5f82fadcbda..decd864f364 100644 --- a/doc/diagnostics.html +++ b/doc/diagnostics.html @@ -3,6 +3,13 @@ "Template": true }--> + +

Introduction

@@ -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.

@@ -435,7 +442,7 @@ Use profiling tools instead first to address them.

fine, and then it became serialized. It suggests that there might be lock contention for a shared resource that creates a bottleneck.

-

See go tool trace +

See go tool trace to collect and analyze runtime traces.