Package: gdb
Version: 7.12-6+b1
Severity: normal
Dear Maintainer,
gdb incorrectly parses /proc/pid/cmdline, stopping at the first NUL byte
encountered with a warning.
* Steps to reproduce:
$ gdb --args /bin/ls -l
Reading symbols from /bin/ls...(no debugging symbols found)...done.
(gdb) b _start
Function "_start" not defined.
Breakpoint 1 (_start) pending.
(gdb) r
Starting program: /bin/ls -l
Breakpoint 1, 0x77dd9090 in _start () from
/lib64/ld-linux-x86-64.so.2
(gdb) info proc
process 5618
warning: target file /proc/5618/cmdline contained unexpected null characters
cmdline = '/bin/ls'
cwd = '/homes/parras'
exe = '/bin/ls'
This happens for all command lines with arguments.
The bug has already been fixed quite some time ago:
https://sourceware.org/ml/gdb-patches/2014-04/msg00204.html
Not sure why the Debian version still has it...
-- System Information:
Debian Release: buster/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.15.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8),
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages gdb depends on:
ii libbabeltrace-ctf1 1.5.5-1
ii libbabeltrace1 1.5.5-1
ii libc6 2.27-3
ii libexpat1 2.2.5-3
ii liblzma55.2.2-1.3
ii libncurses5 6.1-1
ii libpython3.63.6.5-3
ii libreadline77.0-3
ii libtinfo5 6.1-1
ii zlib1g 1:1.2.8.dfsg-5
Versions of packages gdb recommends:
ii libc6-dbg [libc-dbg] 2.27-3
Versions of packages gdb suggests:
pn gdb-doc
pn gdbserver
-- no debconf information
<>