clang confuses kgdb on static symbols

2015-10-20 Thread Andriy Gapon
I see exactly the same behavior both kgdb and kgdb710 (devel/gdb with KGDB option): (kgdb) p/x intr_cpus No symbol "intr_cpus" in current context. (kgdb) p/x 'intr_cpus.0' $1 = 0xf Not sure if clang should try to not produce that '.0' suffix (especially given that there are no other intr_cpus

Re: clang confuses kgdb on static symbols

2015-10-20 Thread John Baldwin
On Tuesday, October 20, 2015 02:38:48 PM Andriy Gapon wrote: > > I see exactly the same behavior both kgdb and kgdb710 (devel/gdb with KGDB > option): > (kgdb) p/x intr_cpus > No symbol "intr_cpus" in current context. > (kgdb) p/x 'intr_cpus.0' > $1 = 0xf > > Not sure if clang should try to not

Re: clang confuses kgdb on static symbols

2015-10-20 Thread Ed Maste
On 20 October 2015 at 13:27, John Baldwin wrote: > > If '-gdwarf-4' works then you can just set that in the DEBUG makeoptions as a > test, otherwise try hacking kern.mk to disable this bit: > > # > # Add -gdwarf-2 when compiling -g. The default starting in clang v3.4 > # and gcc

Re: clang confuses kgdb on static symbols

2015-10-20 Thread Ed Maste
On 20 October 2015 at 16:30, Konstantin Belousov wrote: > > Wouldn't this cause another outburst of 'works by default' discussion > from some other place ? Ok, I'll hold off on this until we make progress on the gdb retirement plan.

Re: clang confuses kgdb on static symbols

2015-10-20 Thread Ed Maste
On 20 October 2015 at 17:18, Warner Losh wrote: > >> On Oct 20, 2015, at 3:07 PM, Ed Maste wrote: >> >> On 20 October 2015 at 16:30, Konstantin Belousov wrote: >>> >>> Wouldn't this cause another outburst of 'works by default' discussion

Re: clang confuses kgdb on static symbols

2015-10-20 Thread Dimitry Andric
On 20 Oct 2015, at 13:38, Andriy Gapon wrote: > > I see exactly the same behavior both kgdb and kgdb710 (devel/gdb with KGDB > option): > (kgdb) p/x intr_cpus > No symbol "intr_cpus" in current context. > (kgdb) p/x 'intr_cpus.0' > $1 = 0xf > > Not sure if clang should try to

Re: clang confuses kgdb on static symbols

2015-10-20 Thread Konstantin Belousov
On Tue, Oct 20, 2015 at 04:07:35PM -0400, Ed Maste wrote: > On 20 October 2015 at 15:55, Konstantin Belousov wrote: > > > > We cannot stop generating dwarf-2 until in tree gdb and kgdb are substituted > > by a working replacement. > > Note that I'm only suggesting removing

Re: clang confuses kgdb on static symbols

2015-10-20 Thread Konstantin Belousov
On Tue, Oct 20, 2015 at 03:44:13PM -0400, Ed Maste wrote: > On 20 October 2015 at 13:27, John Baldwin wrote: > > > > If '-gdwarf-4' works then you can just set that in the DEBUG makeoptions as > > a > > test, otherwise try hacking kern.mk to disable this bit: > > > > # > > #

Re: clang confuses kgdb on static symbols

2015-10-20 Thread Ed Maste
On 20 October 2015 at 15:55, Konstantin Belousov wrote: > > We cannot stop generating dwarf-2 until in tree gdb and kgdb are substituted > by a working replacement. Note that I'm only suggesting removing the baked-in default from Clang, not the setting in kern.mk.

Re: clang confuses kgdb on static symbols

2015-10-20 Thread Warner Losh
> On Oct 20, 2015, at 3:07 PM, Ed Maste wrote: > > On 20 October 2015 at 16:30, Konstantin Belousov wrote: >> >> Wouldn't this cause another outburst of 'works by default' discussion >> from some other place ? > > Ok, I'll hold off on this until we