This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How do I stop breaking on _init()?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]