This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: gdb very slow during 'step into'


"dodji Seketeli" <dodji@seketeli.org> writes:
> I have applied the patch and it doesn't help, unfortunately.

Rats.

> I have tried to add some printf() around the patch to see if I could
> trace some stuff but nothing got printed on stdout. Is that normal ?.
> If yes, how can I add logs to understand what is going on ?

No; ordinary fprintf (stderr, ...) should work in GDB.  You're using
GDB's command line interface, right?  If that function isn't getting
called at all, then that may be part of the problem.  

First, what kind of system are you using?  You've mentioned Debian,
and binutils 2.17, but what architecture is it?

Could you set a breakpoint (or put an fprintf %p) in
set_gdbarch_skip_solib_resolver, and see what function gets passed
there, if anything?  It should be glibc_skip_solib_resolver.

> Here is the content of the dynamic symbol table of my
> /lib/ld-linux.so:
>
> dodji@tintin:~$ objdump -T /lib/ld-linux.so.2  | grep dl
> 0000e6c0 g    DF .text  00000117  GLIBC_PRIVATE _dl_make_stack_executable
> 0000d9c0 g    DF .text  00000058  GLIBC_PRIVATE _dl_deallocate_tls
> 0000d990 g    DF .text  00000022  GLIBC_PRIVATE _dl_get_tls_static_info
> 0000c010 g    DF .text  00000005  GLIBC_PRIVATE _dl_debug_state
> 00015ca0 g    DO .data.rel.ro   00000004  GLIBC_PRIVATE _dl_argv
> 0000df40 g    DF .text  0000020a  GLIBC_PRIVATE _dl_allocate_tls_init
> 0000e480 g    DF .text  000000cb  GLIBC_PRIVATE _dl_tls_setup
> 00006460 g    DF .text  00000195  GLIBC_PRIVATE _dl_rtld_di_serinfo
> 00011b99 g    DO .rodata        0000000e  GLIBC_PRIVATE _dl_out_of_memory
> 0000cec0 g    DF .text  0000022d  GLIBC_2.1   _dl_mcount
> 0000e240 g    DF .text  00000027  GLIBC_PRIVATE _dl_allocate_tls
>
> I don't see any _dl_fixup symbol in there, but maybe that is not relevant.
> Also, nm /lib/ld-linux.so.2 is stripped on my system, so nm is doesn't
> show anything.

Is /lib/ld-linux.so.2 normally installed stripped on your system?  If
GDB can't find the address of the 'fixup' function, then it can't do
anything but single-step through the dynamic linker as it looks up the
symbol, which is where we're guessing you're spending your time.


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