Re: gdb very slow during 'step into'

Jim Blandy
2007-01-02T19:29:58Z

"dodji Seketeli" <dodji@seketeli.org> writes:
> Hello gdb hackers and users,
>
> First of all, I would like to wish a happy new year to you and your families.
> I hope this year will be full of achievements (again) for gdb people.
>
> Now the real meat of my post :-)
>
> I have noticed that gdb was very slow (taking 100% of CPU during
> several tens of seconds) when I step into some functions (with the
> step command, on the cli interface).
>
> I am not sure, but I think it happens when I step into functions that
> are defined in certain shared libraries. Once in the function,
> subsequent steping into functions of the same library are okay. Once
> out of the library, stepping into a function of that library can be
> slow again.

If you set the environment variable LD_BIND_NOW to a non-empty value
before running your program (use GDB's 'set env' command), does that
eliminate the slow steps?