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.
On Tue, Mar 19, 2013 at 3:38 AM, <rsc@golang.org> wrote: > While we're here, downgrade ...
12 years, 1 month ago
(2013-03-18 19:57:04 UTC)
#2
On Tue, Mar 19, 2013 at 3:38 AM, <rsc@golang.org> 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?
On Mon, Mar 18, 2013 at 3:56 PM, minux <minux.ma@gmail.com> wrote: > On Tue, Mar ...
12 years, 1 month ago
(2013-03-18 19:59:55 UTC)
#4
On Mon, Mar 18, 2013 at 3:56 PM, minux <minux.ma@gmail.com> wrote:
> On Tue, Mar 19, 2013 at 3:38 AM, <rsc@golang.org> 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
On Tue, Mar 19, 2013 at 3:59 AM, Russ Cox <rsc@golang.org> wrote: > On Mon, ...
12 years, 1 month ago
(2013-03-18 20:15:49 UTC)
#5
On Tue, Mar 19, 2013 at 3:59 AM, Russ Cox <rsc@golang.org> wrote:
> On Mon, Mar 18, 2013 at 3:56 PM, minux <minux.ma@gmail.com> wrote:
>> On Tue, Mar 19, 2013 at 3:38 AM, <rsc@golang.org> 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.
The gdb version is not relevant anymore; what matters is the Apple version. I tested ...
12 years, 1 month ago
(2013-03-18 20:30:17 UTC)
#6
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
Issue 7891044: code review 7891044: cmd/ld: generate relocated DWARF in hostobj mode
(Closed)
Created 12 years, 1 month ago by rsc
Modified 12 years, 1 month ago
Reviewers:
Base URL:
Comments: 1