FAQ
When I'm debugging using gdb, and I try to step into library code, gdb
drops into C code rather than the library. For example:

runtime.convT2I (t=void, inter=void) at
/usr/local/go/src/pkg/runtime/iface.c:188


How do I step through the Go library code?

A bit more information... I've compiled my code like this, to prevent
inlining and registerization:

go build -gcflags "-N -l" server.go


I do the usual gdb startup:

% gdb server
(gdb) b 17
(gdb) run
Breakpoint 1, main.main () at server.go:17
17 e := http.ListenAndServe(":1234", s)
(gdb) s
runtime.convT2I (t=void, inter=void) at
/usr/local/go/src/pkg/runtime/iface.c:188
188 runtime·convT2I(Type *t, InterfaceType *inter, ...)


--
Sonia Hamilton
http://www.snowfrog.net

--

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 8 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 5, '12 at 3:54a
activeOct 5, '12 at 7:39a
posts8
users4
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase