FAQ
I'm poking around the Go (my version of Go is 1.2) runtime support for GDB,
running GDB 7.7 compiled from source on darwin64. Following the
instructions at http://golang.org/doc/gdb, I get the following:

*Here's the relevant bits from the startup message:*

GNU gdb (GDB) 7.7

This GDB was configured as "x86_64-apple-darwin13.1.0".

Reading symbols from regexp.test...done.

Loading Go Runtime support.


*... from now on, some of my output differs from what the tutorial
describes. For example:*


*The output from running `l`:*

182 regexp/_test/_testmain.go: No such file or directory.


*The output from running `l regexp.go:1`*

file: "/usr/local/go/src/pkg/regexp/regexp.go", line number: 1

file: "/usr/local/go/src/pkg/regexp/syntax/regexp.go", line number: 1


*`info goroutines`*

   1 waiting runtime.park *<- note the extra goroutine, but probably
nothing relevant*

* 2 syscall runtime.notetsleepg

* 18 running testing.tRunner


*Now for the main problem, `goroutine 1 bt`*

#0 0x0000000000017ff6 in runtime.park (

     unlockf=<error reading variable: Attempt to dereference a generic
pointer.>,

     lock=<error reading variable: Attempt to dereference a generic
pointer.>,

     reason=<error reading variable: Attempt to dereference a generic
pointer.>)

     at /usr/local/go/src/pkg/runtime/proc.c:1342

#1 0x00000000000062ab in runtime.chanrecv (

     c=<error reading variable: Attempt to dereference a generic pointer.>,

     ep=<error reading variable: Attempt to dereference a generic pointer.>,

     selected=<error reading variable: Attempt to dereference a generic
pointer.>,

     received=<error reading variable: Attempt to dereference a generic
pointer.>)

     at /usr/local/go/src/pkg/runtime/chan.c:354

#2 0x00000000000063d8 in runtime.chanrecv1 (

     t=<error reading variable: Attempt to dereference a generic pointer.>,

     c=<error reading variable: Attempt to dereference a generic pointer.>)

     at /usr/local/go/src/pkg/runtime/chan.c:446

#3 0x000000000004b225 in testing.RunTests (matchString=

     {void (struct string, struct string, bool *, error *)} 0x22104c2e70,

     tests= []testing.InternalTest = {...}, ok=true) at
/usr/local/go/src/pkg/testing/testing.go:472

#4 0x000000000004a024 in testing.Main (matchString=

     {void (struct string, struct string, bool *, error *)} 0x22104c2ef0,

     tests= []testing.InternalTest = {...}, benchmarks=
[]testing.InternalBenchmark = {...},

     examples= []testing.InternalExample = {...}) at
/usr/local/go/src/pkg/testing/testing.go:403

#5 0x00000000000021cc in main.main () at regexp/_test/_testmain.go:193

Python Exception <class 'gdb.error'> Attempt to assign to an unmodifiable
value.:

Error occurred in Python command: Attempt to assign to an unmodifiable
value.


*What am I missing here? Can anyone else reproduce this behavior by
following the GDB tutorial linked above? Thanks!*

(As an aside, I tried using GDB 7.6 which at the `goroutine 1 bt` step
causes GDB to immediately gobble all available RAM.)

--
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/d/optout.

Search Discussions

  • Konstantin Khomoutov at Mar 27, 2014 at 3:45 pm

    On Thu, 27 Mar 2014 07:43:11 -0700 (PDT) plnordahl@gmail.com wrote:

    I'm poking around the Go (my version of Go is 1.2) runtime support
    for GDB, running GDB 7.7 compiled from source on darwin64. Following
    the instructions at http://golang.org/doc/gdb, I get the following: [...]
    *What am I missing here? Can anyone else reproduce this behavior by
    following the GDB tutorial linked above? Thanks!*

    (As an aside, I tried using GDB 7.6 which at the `goroutine 1 bt`
    step causes GDB to immediately gobble all available RAM.)
    I'm afraid GDB support might be officially flaky [1], [2], [3].

    1. https://groups.google.com/d/topic/golang-dev/UiVP6F-9-yg/discussion
    2. https://code.google.com/p/go/issues/detail?id=7471
    3. https://code.google.com/p/go/issues/list?q=label:GDB

    --
    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/d/optout.
  • Plnordahl at Mar 27, 2014 at 3:51 pm
    Good to know, I didn't pick up from the tutorial that GDB was not well
    supported.

    Thanks!
    On Thursday, March 27, 2014 8:45:04 AM UTC-7, Konstantin Khomoutov wrote:

    On Thu, 27 Mar 2014 07:43:11 -0700 (PDT)
    plno...@gmail.com <javascript:> wrote:
    I'm poking around the Go (my version of Go is 1.2) runtime support
    for GDB, running GDB 7.7 compiled from source on darwin64. Following
    the instructions at http://golang.org/doc/gdb, I get the following: [...]
    *What am I missing here? Can anyone else reproduce this behavior by
    following the GDB tutorial linked above? Thanks!*

    (As an aside, I tried using GDB 7.6 which at the `goroutine 1 bt`
    step causes GDB to immediately gobble all available RAM.)
    I'm afraid GDB support might be officially flaky [1], [2], [3].

    1. https://groups.google.com/d/topic/golang-dev/UiVP6F-9-yg/discussion
    2. https://code.google.com/p/go/issues/detail?id=7471
    3. https://code.google.com/p/go/issues/list?q=label:GDB
    --
    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/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 27, '14 at 2:43p
activeMar 27, '14 at 3:51p
posts3
users2
websitegolang.org

2 users in discussion

Plnordahl: 2 posts Konstantin Khomoutov: 1 post

People

Translate

site design / logo © 2022 Grokbase