On Thursday, March 29 2012, Frank Heckenbach wrote:

> p omits trailing 0 when printing a range of chars.
> To reproduce:
>
> # echo 'char foo[5] = { 1, 2, 0, 4, 0 };' > foo.c
> # gcc -c -g foo.c
> # gdb foo.o
> (gdb) p foo[0]@5
> $1 = "\001\002\000\004"

Still reproducible with GDB 16.2.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

Attachment: signature.asc
Description: PGP signature

Reply via email to