When I use gdb to debug a program, I want to look the file descriptor information about the debugging progress. I use "info file", "info proc" commands, but these command outputs don't include file descriptor information. So Is there any command output file descriptor information when using gdb? Thanks in advance!
Asked
Active
Viewed 1,439 times
1 Answers
4
Is there any command output file descriptor information when using gdb?
This is OS-dependenent.
On Linux, ls -l /proc/$pid/fd/
is often helpful.
GDB itself doesn't track the inferior process's file descriptors.

Employed Russian
- 199,314
- 34
- 295
- 362
-
Yes, I know some commands(such as lsof) can get file descriptor information. Your answer" GDB itself doesn't track the inferior process's file descriptors." is useful to me. Thanks! – Nan Xiao May 10 '13 at 06:34