From: Russ Cox
The following instructions apply to the standard toolchain
@@ -57,7 +64,7 @@ use to inspect a live process or a core dump.
Pass the
@@ -157,7 +164,7 @@ the DWARF code.
If you're interested in what the debugging information looks like, run
-'
In this tutorial we will inspect the binary of the
regexp package's unit tests. To build the binary,
-change to
-The message
-The command
-That
@@ -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 spaces in debugging, diagnostics docs
X-Git-Tag: go1.10beta2~26
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6be622c38067a70b31a65e677944b8bb264cca06;p=gostls13.git
doc: remove interior
spaces in debugging, diagnostics docs
Change-Id: I20de6207d386635025dbb603c57219218e9a9af5
Reviewed-on: https://go-review.googlesource.com/87019
Run-TryBot: Russ Cox
'-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
).
objdump -W a.out
' and browse through the .debug_*
+objdump
-W
a.out
and browse through the .debug_*
sections.
pkg.(*MyType).Meth
.
$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
.
"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
.
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.
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.
Introduction
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.