[PATCH 2/5] Add a new 'info proc files' subcommand of 'info proc'.

Simon Marchi simon.marchi@ericsson.com
Sat Sep 8 22:31:00 GMT 2018


On 2018-09-08 07:49 AM, Eli Zaretskii wrote:
>> From: John Baldwin <jhb@FreeBSD.org>
>> Date: Fri,  7 Sep 2018 17:36:56 -0700
>>
>> This command displays a list of open file descriptors.
> 
> Thanks.
> 
>> +  add_cmd ("files", class_info, info_proc_cmd_files, _("\
>> +List of open files."),
> 
> IMO, this doc strings is too terse.  I suggest to expand it telling
> that the command shows the files open by the process being debugged.

The info proc commands accept a pid, which allows you to refer to any
process, not only those debugged by GDB.  Other info proc commands use
use the generic form "of the process"

  info proc cmdline -- List command line arguments of the process

I think that's sufficient, especially that users are likely to see it
in the context of "help info proc", which describes what argument you
can pass:

(gdb) help info proc
Show /proc process information about any running process.
Specify any process id, or use the program being debugged by default.

List of info proc subcommands:

info proc all -- List all available /proc info
info proc cmdline -- List command line arguments of the process
info proc cwd -- List current working directory of the process
info proc exe -- List absolute filename for executable of the process
info proc mappings -- List of mapped memory regions
info proc stat -- List process info from /proc/PID/stat
info proc status -- List process info from /proc/PID/status

Simon



More information about the Gdb-patches mailing list