FAQ
Hej,

if I enable core dump generation in my shell with *ulimit* and run a
compiled go program (with GOTRACEBACK=crash set) that has some goroutines
in which one of them causes a program crash; how can I inspect the state of
the goroutines with GDB afterwards? If I fire up GDB with the core dump
there are some threads created one which corresponds to the goroutine that
crashed and the others seems to be garbage collection-related. Running
"info goroutines" works but "goroutine x bt" complains with "You can't do
that without a process to debug.".

How can I see the backtrace from goroutines etc. from a core dump?

Example program that I've played around with, panicking at row 28:
http://play.golang.org/p/3l3VLcJIcJ

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Aram Hăvărneanu at Feb 11, 2014 at 4:03 pm
    This describes the procedure for mdb, the Solaris debugger:
    http://www.joyent.com/blog/mdb-support-for-go
    You can do the same thing in gdb, follow the same procedure.

    --
    Aram Hăvărneanu

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Erik Westrup at Feb 12, 2014 at 12:58 pm

    On Tuesday, February 11, 2014 5:02:44 PM UTC+1, Aram Hăvărneanu wrote:
    This describes the procedure for mdb, the Solaris debugger:
    http://www.joyent.com/blog/mdb-support-for-go
    You can do the same thing in gdb, follow the same procedure.
    Oh okay. That sure look tedious.

    Why is it that the Python GDB script works on a running process and can
    display call stacks, but not on a core dump?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 11, '14 at 3:43p
activeFeb 12, '14 at 12:58p
posts3
users2
websitegolang.org

2 users in discussion

Erik Westrup: 2 posts Aram Hăvărneanu: 1 post

People

Translate

site design / logo © 2022 Grokbase