This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/11076] Printing character arrays
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 10 Dec 2009 17:13:06 -0000
- Subject: [Bug gdb/11076] Printing character arrays
- References: <20091210103920.11076.sabrown256@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From ppluzhnikov at google dot com 2009-12-10 17:13 -------
This works just fine for me:
int main()
{
char a[100] = "foo bar baz";
return 0;
}
gcc -g t.c -o t
gdb-7.0/build/gdb/gdb ./t
GNU gdb (GDB) 7.0
...
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/t...done.
(gdb) list
1 int main()
2 {
3 char a[100] = "foo bar baz";
4 return 0;
5 }
(gdb) break 4
Breakpoint 1 at 0x400546: file t.c, line 4.
(gdb) run
Breakpoint 1, main () at t.c:4
4 return 0;
(gdb) print a
$1 = "foo bar baz", '\000' <repeats 88 times>
Please provide a complete test case, as well as complete log of your GDB session
(as I have done above).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://sourceware.org/bugzilla/show_bug.cgi?id=11076
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.