This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: How do I stop breaking on _init()?
- To: Peter Haight <peterh at sapros dot com>
- Subject: Re: How do I stop breaking on _init()?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 27 Jul 2000 17:28:47 +1000
- CC: gdb at sources dot redhat dot com
- References: <200007270614.XAA24852@wartch.sapros.com>
Peter Haight wrote:
>
> I'm running mozilla under the debugger on FreeBSD 4.0 and when I'm stepping
> through stuff it will frequently break with a message like this:
?What did the code at this point look like?
> (gdb) n
> 0x29b08ffc in _init ()
> from /usr/home/peterh/ext/mozilla/dist/bin/components/libdirectory.so
>
> If I do any sort of steping command like n or s at this point things get
> royally messed up. What I usually do is 'fin' which will take me back to the
> point where I hit 'n' and I can hit 'n' again. Sometimes I'll have to repeat
> this two or three times before I get over the line.
It sounds like problems in the shared library code.
> Is there someway I can get it to stop doing this?
A workaround (and a generally useful command to know) is ``until'':
(gdb) until LINENUM
which can be used to skip several lines (and hopefully the _init's).
> I'm using v4.18.
I suspect that you're running a 4.18 + FreeBSD local changes. Pure 4.18
doesn't build in FBSD 4.0.
The second thing to consider is downloading a GDB snapshot (see
http://sources.redhat.com/gdb#download ). Which does include FreeBSD
support 5.0.
Andrew