This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Make "info proc cmdline" show args on GNU/Linux


*** TEST RESULTS FOR COMMIT 26d6cec4a9291f154e549fb6f4318ace6cfaa2a5 ***

Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Branch: master
Commit: 26d6cec4a9291f154e549fb6f4318ace6cfaa2a5

Make "info proc cmdline" show args on GNU/Linux

Currently "info proc cmdline" on GNU/Linux does not show the full command
line, but only argument 0.  And even a warning is shown if there are more.
This was discussed in 2014 already:

  https://sourceware.org/ml/gdb-patches/2014-04/msg00212.html

Follow the advice there and avoid target_fileio_read_stralloc.  Instead,
use target_fileio_read_alloc to read the whole command line and then
replace NUL characters by spaces.  Also add an appropriate test case.
Note that gdbserver already handles this correctly.

gdb/ChangeLog:

	* linux-tdep.c (linux_info_proc): For "info proc cmdline", print
	command line args instead of emitting a warning.

gdb/testsuite/ChangeLog:

	* gdb.base/info-proc.exp: Add test for "info proc cmdline".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]