Hi Stewart, I've just tested this on Ubuntu Quantal's current alpha (on 64bit) and it seems to work; if you can recreate it please reopen, otherwise it looks like it got fixed somewhere in the last 2.5 years:
.so[7fb307302000+1b2000] dg@major:~$ gcc -g -Wall foo.c -o foo foo.c: In function ‘main’: foo.c:3:9: warning: unused variable ‘a’ [-Wunused-variable] dg@major:~$ gdb foo GNU gdb (Linaro GDB) 7.4-2012.06-ubuntu Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://bugs.launchpad.net/gdb-linaro/>... Reading symbols from /home/dg/foo...done. (gdb) b 4 Breakpoint 1 at 0x400586: file foo.c, line 4. (gdb) r Starting program: /home/dg/foo Breakpoint 1, main () at foo.c:4 4 return 0; (gdb) p a $1 = "foo bar baz", '\000' <repeats 88 times> (gdb) q ** Changed in: gdb (Ubuntu) Status: New => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/495176 Title: gdb prints character arrays improperly To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/495176/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
