Where can I find the format definition of stack trace?

217 views
Skip to first unread message

Jingguo Yao

unread,
Jun 28, 2016, 11:13:19 PM6/28/16
to golang-nuts
following result:

  goroutine 35 [running]:
  runtime/debug.Stack(0x0, 0x0, 0x0)
    /usr/local/go/src/runtime/debug/stack.go:24 +0x80
  runtime/debug.PrintStack()
    /usr/local/go/src/runtime/debug/stack.go:16 +0x18
  github.com/cockroachdb/cockroach/client.(*Txn).send(0xc8201a86e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /home/jing/code/go/src/github.com/cockroachdb/cockroach/client/txn.go:642 +0x9a9
    /home/jing/code/go/src/github.com/cockroachdb/cockroach/client/txn.go:442 +0x294
    /home/jing/code/go/src/github.com/cockroachdb/cockroach/client/txn.go:352 +0x3e
    /home/jing/code/go/src/github.com/cockroachdb/cockroach/client/txn.go:373 +0x2d
  github.com/cockroachdb/cockroach/client.(*Txn).Exec(0xc8201a86e0, 0xc8204b0101, 0x0, 0x0, 0xc8204ba080, 0x0, 0x0)
    /home/jing/code/go/src/github.com/cockroachdb/cockroach/client/txn.go:545 +0x354
    /home/jing/code/go/src/github.com/cockroachdb/cockroach/client/db.go:433 +0x2b2
  testing.tRunner(0xc8202138c0, 0x241ea80)
    /usr/local/go/src/testing/testing.go:473 +0x98
  created by testing.RunTests
    /usr/local/go/src/testing/testing.go:582 +0x892

Take the following stack trace entry as an example. What is the
meaning of +0x2d following the line number? And what is the meanings
of the numbers in Commit(0xc8201a86e0, 0x0, 0x0)?

    /home/jing/code/go/src/github.com/cockroachdb/cockroach/client/txn.go:373 +0x2d

I have checked the documentation for PrintStack. But I can't find a
format definition for stack trace.

Aram Hăvărneanu

unread,
Jun 29, 2016, 8:02:36 AM6/29/16
to Jingguo Yao, golang-nuts
> What is the meaning of +0x2d following the line number?

The address of the assembly instruction relative to the start of the function.

> And what is the meanings of the numbers in
> Commit(0xc8201a86e0, 0x0, 0x0)?

Those are the function arguments.

--
Aram Hăvărneanu

Jingguo Yao

unread,
Jun 29, 2016, 9:28:19 AM6/29/16
to golang-nuts, yaoji...@gmail.com
Aram:

Thanks for your reply. Could you point out where you find the format information?

--
Jingguo

Aram Hăvărneanu

unread,
Jun 29, 2016, 9:34:57 AM6/29/16
to Jingguo Yao, golang-nuts
On Wed, Jun 29, 2016 at 3:28 PM, Jingguo Yao <yaoji...@gmail.com> wrote:
> Could you point out where you find the format information?

As far as I know, it is not formally documented anywhere (and can
change at any time).

--
Aram Hăvărneanu

jingguo yao

unread,
Jun 29, 2016, 9:38:32 AM6/29/16
to Aram Hăvărneanu, golang-nuts
Aram:

Ok, Thanks.
Reply all
Reply to author
Forward
0 new messages