Using gdb on a root process

Dear experts,
I am trying to attach a root process to gdb debugger.

What i did:

  • I opened a root in a terminal
  • in another terminal, i found the id of the root.exe with $pidof root.exe (gives 12345)
    and attached it to the gdb with: $sudo gdb -p 12345.

My problem is that it does not agttach the root.exe process, ending up with this error instead:

0x00007faef4288faa in __GI___select (nfds=1, readfds=0x4cf580, writefds=0x4cf610, exceptfds=exceptfds@entry=0x0, timeout=timeout@entry=0x0) at …/sysdeps/unix/sysv/linux/select.c:41
41 …/sysdeps/unix/sysv/linux/select.c: No such file or directory.

Do you know what can I do in order to attached root.exe successfully, or what am I doing wrong?

That’s fine, I think. Your “root.exe” is waiting for the user’s input in the standard glibc function (and you do not have the source code of this library “installed”, of course).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.