This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Print vector registers in natural format, not hex
- From: Klee Dienes <klee at apple dot com>
- To: Elena Zannoni <ezannoni at redhat dot com>
- Cc: Daniel Jacobowitz <drow at mvista dot com>, gdb-patches at sources dot redhat dot com
- Date: Mon, 4 Nov 2002 23:02:03 -0500
- Subject: Re: [PATCH] Print vector registers in natural format, not hex
I think it's definitely a misfeature. It's would be different if GDB
were skipping all the trailing nulls, and not just the final null ...
but either way, I think it's the wrong behavior. An array is an array,
not a string, and printing:
$1 = "abcd\000\000\000\000\000"
instead of
$1 = "abcd\000\000\000\000\000\000"
for 'char buf[10] = "hello"'
just seems much more confusing than useful.
On Friday, October 18, 2002, at 07:20 PM, Elena Zannoni wrote:
And you haven't noticed this comment in the testfile, I take it :-) I
discovered this while writing the vector support, but didn't fix it. I
don't know that it actually needs to be fixed. It's a feature, not a
bug, one could argue.
# Note: in LE case, the char array is printed WITHOUT the last
character.
# Gdb treats the terminating null char in the array like the
terminating
# null char in a string and doesn't print it. This is not a failure,
but
# the way gdb works.
Elena