Subject: Re: gdb on Netbsd 2.0
To: None <netbsd-help@netbsd.org>
From: Stuart Brooks <stuartb@cat.co.za>
List: netbsd-help
Date: 04/05/2005 08:15:20
> > > I was wondering if anyone has had any hassles with gdb on netbsd
2.
> > >
> >
> > I can't change the rtc offset anymore (kern.rtc_offset) via gdb!
> > On <2.0 I could do:
> > gdb --write /netbsd
> > (gdb) set rtc_offset=-60
> > (gdb) quit
> >
> > Now I get "Memory fault (core dumped)" on "quit".
> >
> > -Alex
> Same thing happened to me after installing NetBSD 2.0 and trying to
set
> kern.rtc_offset using gdb: core dump on quit. Tried once more, with
the
> same result. However, despite the core dump it turned out that the
> desired change to kern.rtc_offset had registered. Don't know why gdb
is
> doing this, but it seems that something is not quite right.
I received the following from the gdb mailing list which might be of
interest:
> Stuart Brooks wrote:
> I am experiencing problems when interrogating a core file - as soon as
I
> try to access a global variable in a statically linked library or view
> the internals of a class/struct declared in a static lib gdb either
says
> <unknown type>, gives garbage or segmentation faults. Details of my
> system are:
>
> OS: Netbsd 2.0
> gdb: 5.3nb1
> compiler: g++ 3.3
Nathan J. Williams wrote:
I'm assuming this is i386? You're going to be in some pain with C++ on
this combination; netbsd/i386 2.0 sets gcc to use the stabs debugging
format by default instead of dwarf-2, because of a bug in 3.3's dwarf
generation (netbsd PR #25094; equivalent to GCC bug #16788) [I'm not
at all sure that this is the right tradeoff for that bug].