diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2007-01-26 20:54:16 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2007-01-26 20:54:16 +0000 |
commit | e1f48eadc1c23ae7e146a60f5a5c9bb04fafc298 (patch) | |
tree | 8f1aaa754ee9cdda2cffce53cbd7afb2e975d7ed | |
parent | 3a60f64edda5bf2b464ad841704c225893a1cd73 (diff) | |
download | gdb-e1f48eadc1c23ae7e146a60f5a5c9bb04fafc298.zip gdb-e1f48eadc1c23ae7e146a60f5a5c9bb04fafc298.tar.gz gdb-e1f48eadc1c23ae7e146a60f5a5c9bb04fafc298.tar.bz2 |
* c-valprint.c (c_val_print): Require strings to be of no-signed CHARs.
* NEWS: Describe CHAR array vs. string identifcation rules.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/NEWS | 3 | ||||
-rw-r--r-- | gdb/c-valprint.c | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 49c1a89..7eef22b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-01-26 Jan Kratochvil <jan.kratochvil@redhat.com> + + * c-valprint.c (c_val_print): Require strings to be of no-signed CHARs. + * NEWS: Describe CHAR array vs. string identifcation rules. + 2007-01-25 Paul Brook <paul@codesourcery.com> * arm-tdep.c (arm_get_next_pc): Fix bitfield off-by-one error. @@ -15,6 +15,9 @@ frequency signals (e.g. SIGALRM) via the QPassSignals packet. target's overall architecture. GDB can read a description from a local file or over the remote serial protocol. +* Arrays of explicitly SIGNED or UNSIGNED CHARs are now printed as arrays + of numbers. + * New commands set mem inaccessible-by-default diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index efd531e..2ec9058 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -96,7 +96,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, } /* For an array of chars, print with string syntax. */ if (eltlen == 1 && - ((TYPE_CODE (elttype) == TYPE_CODE_INT) + ((TYPE_CODE (elttype) == TYPE_CODE_INT && TYPE_NOSIGN (elttype)) || ((current_language->la_language == language_m2) && (TYPE_CODE (elttype) == TYPE_CODE_CHAR))) && (format == 0 || format == 's')) |