question about GDB, ptrace, and /proc...

Joel Brobecker brobecker@gnat.com
Sat Jan 10 05:53:00 GMT 2004


Hello,

while reading some linux-specific code such as linux-nat.c for instance,
I was a bit surprised to see some calls to functions which seem to use
/proc. For instance, there is a call to child_pid_to_exec_file() inside
linux_handle_extended_wait() in linux-nat.c which causes GDB to read
into the /proc filesystem.

I was surprised, because I thought the linux ports were using ptrace,
meaning using ptrace exclusively. Does GDB also need /proc, or is /proc
only optional? Or does GDB support both interfaces on Linux?

-- 
Joel



More information about the Gdb-patches mailing list