FAQ
Reviewers: golang-dev1,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://go.googlecode.com/hg/


Description:
cmd/ld: generate relocated DWARF in hostobj mode

While we're here, downgrade DWARF to version 2.
We're not using any version 3 features, and OS X gdb
only supports version 2.

Please review this at https://codereview.appspot.com/7891044/

Affected files:
M src/cmd/ld/dwarf.c
M src/cmd/ld/dwarf_defs.h
M src/cmd/ld/lib.c
M src/cmd/ld/macho.c


--

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

Search Discussions

  • Minux at Mar 18, 2013 at 7:57 pm

    On Tue, Mar 19, 2013 at 3:38 AM, wrote:
    While we're here, downgrade DWARF to version 2.
    We're not using any version 3 features, and OS X gdb
    only supports version 2.
    wow, cool!
    so we fully support gdb 6.x now?

    does gdb 6.x support python plugins?
    or is it possible to rewrite the plugin in plain gdb script?

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Russ Cox at Mar 18, 2013 at 7:59 pm

    On Mon, Mar 18, 2013 at 3:56 PM, minux wrote:
    On Tue, Mar 19, 2013 at 3:38 AM, wrote:
    While we're here, downgrade DWARF to version 2.
    We're not using any version 3 features, and OS X gdb
    only supports version 2.
    wow, cool!
    so we fully support gdb 6.x now?
    i don't know about that. i do know that i can run

    gdb godoc
    b 'main.main'
    r

    on os x and it works out of the box now.

    does gdb 6.x support python plugins?
    or is it possible to rewrite the plugin in plain gdb script?
    no idea. i rarely use the functionality in the gdb plugin. i just set
    breakpoints and examine memory.

    russ

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Minux at Mar 18, 2013 at 8:15 pm

    On Tue, Mar 19, 2013 at 3:59 AM, Russ Cox wrote:
    On Mon, Mar 18, 2013 at 3:56 PM, minux wrote:
    On Tue, Mar 19, 2013 at 3:38 AM, wrote:
    While we're here, downgrade DWARF to version 2.
    We're not using any version 3 features, and OS X gdb
    only supports version 2.
    wow, cool!
    so we fully support gdb 6.x now?
    i don't know about that. i do know that i can run
    gdb godoc
    b 'main.main'
    r
    on os x and it works out of the box now.
    when i do this on a newly compiled cmd/go, i got:
    (gdb) b 'main.main'
    Die: DW_TAG_unspecified_type (abbrev = 10, offset = 47079)
    has children: FALSE
    attributes:
    DW_AT_name (DW_FORM_string) string: "void"
    Dwarf Error: Cannot find type of die [in module /Users/minux/go/go2.hg/bin/go]

    i'm still using OS X 10.6 with an old version of xcode.
    $ /usr/bin/gdb -v
    GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "x86_64-apple-darwin".

    if the problem is not apparent, it's ok, and i will try to figure it
    out myself (perhaps I
    just need to upgrade xcode)
    no idea. i rarely use the functionality in the gdb plugin. i just set
    breakpoints and examine memory.
    ok, so we probably shouldn't mention gdb 6.x support in the docs.

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Russ Cox at Mar 18, 2013 at 8:30 pm
    The gdb version is not relevant anymore; what matters is the Apple version.
    I tested this morning on Apple version gdb-1820 (on 10.8.2) and gdb-1822
    (on 10.7.5) and both were happy. And no, I don't understand why I have a
    newer gdb on my 10.7 system than on my 10.8 system.

    My guess is that updating your xcode will get you a new enough gdb.

    If you'd like to make things work with your current gdb, it appears that
    the encoding we use for unsafe.Pointer is wrong. We encode it as a
    DW_TAG_pointer_type with an element type referring to
    DW_TAG_unspecified_type, and it's that second type gdb dislikes. It looks
    like plain gcc encodes a typedef of a void* as a DW_TAG_pointer_type
    without an explicit element type. We should probably do the same for
    unsafe.Pointer. I won't do that in this CL, but you're welcome to try it.

    Russ

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Russ Cox at Mar 19, 2013 at 7:37 pm
    Ping (nothing changed, just looking for a review)

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Minux Ma at Mar 18, 2013 at 7:57 pm
    Fixes issue 3436.

    https://codereview.appspot.com/7891044/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Minux Ma at Mar 19, 2013 at 7:59 pm
    lgtm.


    https://codereview.appspot.com/7891044/diff/14001/src/cmd/ld/dwarf.c
    File src/cmd/ld/dwarf.c (right):

    https://codereview.appspot.com/7891044/diff/14001/src/cmd/ld/dwarf.c#newcode2432
    src/cmd/ld/dwarf.c:2432: //msect->nreloc = inforelocsize / 8;
    ?

    https://codereview.appspot.com/7891044/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rsc at Mar 19, 2013 at 8:32 pm
    *** Submitted as
    https://code.google.com/p/go/source/detail?r=95c3a7bdfb03 ***

    cmd/ld: generate relocated DWARF in hostobj mode

    While we're here, downgrade DWARF to version 2.
    We're not using any version 3 features, and OS X gdb
    only supports version 2.

    Fixes issue 3436.

    R=golang-dev, minux.ma
    CC=golang-dev
    https://codereview.appspot.com/7891044


    https://codereview.appspot.com/7891044/

    --

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedMar 18, '13 at 7:38p
activeMar 19, '13 at 8:32p
posts9
users2
websitegolang.org

2 users in discussion

Rsc: 5 posts Minux Ma: 4 posts

People

Translate

site design / logo © 2022 Grokbase