This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
question about GDB, ptrace, and /proc...
- From: Joel Brobecker <brobecker at gnat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 10 Jan 2004 09:53:00 +0400
- Subject: question about GDB, ptrace, and /proc...
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