diff options
author | Tom Tromey <tromey@redhat.com> | 2010-07-02 18:02:19 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-07-02 18:02:19 +0000 |
commit | a17ac5b05fa0f5e6cee46e2123a44906cb17b548 (patch) | |
tree | 17142a77f6a14634b1fe41d730666454ae3c2696 /gdb | |
parent | 6e08c6be2f186e6845bbf0d7b735ac3f1443e858 (diff) | |
download | gdb-a17ac5b05fa0f5e6cee46e2123a44906cb17b548.zip gdb-a17ac5b05fa0f5e6cee46e2123a44906cb17b548.tar.gz gdb-a17ac5b05fa0f5e6cee46e2123a44906cb17b548.tar.bz2 |
2010-07-02 Ken Werner <ken.werner@de.ibm.com>
gdb
* c-valprint.c (c_val_print): Fix printing of character vectors.
gdb/testsuite
* gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/c-valprint.c | 3 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/altivec-abi.exp | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 02142ee..95656d6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-07-02 Ken Werner <ken.werner@de.ibm.com> + + * c-valprint.c (c_val_print): Fix printing of character vectors. + 2010-07-02 Jan Kratochvil <jan.kratochvil@redhat.com> * spu-tdep.c (spu_catch_start): Adjust the caller of changed diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index e205705..4e5a95f 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -180,7 +180,8 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, /* Print arrays of textual chars with a string syntax, as long as the entire array is valid. */ - if (c_textual_element_type (unresolved_elttype, options->format) + if (!TYPE_VECTOR (type) + && c_textual_element_type (unresolved_elttype, options->format) && value_bits_valid (original_value, TARGET_CHAR_BIT * embedded_offset, TARGET_CHAR_BIT * TYPE_LENGTH (type))) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 3b17f67..4180de5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2010-07-02 Ken Werner <ken.werner@de.ibm.com> + + * gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors. + 2010-07-01 Pedro Alves <pedro@codesourcery.com> * gdb.base/help.exp: Adjust expected output. diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp index e05b21c..dc9a22c 100644 --- a/gdb/testsuite/gdb.arch/altivec-abi.exp +++ b/gdb/testsuite/gdb.arch/altivec-abi.exp @@ -82,7 +82,7 @@ proc altivec_abi_tests { extra_flags force_abi } { # now all the arguments of vec_fun are initialized - set pattern "vec_func .vshort_f=.111, 222, 333, 444, 555, 666, 777, 888., vushort_f=.100, 200, 300, 400, 500, 600, 700, 800., vint_f=.-10, -20, -30, -40., vuint_f=.1111, 2222, 3333, 4444., vchar_f=.abcdefghilmnopqr., vuchar_f=.ABCDEFGHILMNOPQR., vfloat_f=.1.25, 3.75, 5.5, 1.25., x_f=.1, 2, 3, 4, 5, 6, 7, 8., y_f=.12, 22, 32, 42., a_f=.vector of chars.., b_f=.5.5, 4.5, 3.75, 2.25., c_f=.1.25, 3.5, 5.5, 7.75., intv_on_stack_f=.12, 34, 56, 78.." + set pattern "vec_func .vshort_f=.111, 222, 333, 444, 555, 666, 777, 888., vushort_f=.100, 200, 300, 400, 500, 600, 700, 800., vint_f=.-10, -20, -30, -40., vuint_f=.1111, 2222, 3333, 4444., vchar_f=.97 'a', 98 'b', 99 'c', 100 'd', 101 'e', 102 'f', 103 'g', 104 'h', 105 'i', 108 'l', 109 'm', 110 'n', 111 'o', 112 'p', 113 'q', 114 'r'., vuchar_f=.65 'A', 66 'B', 67 'C', 68 'D', 69 'E', 70 'F', 71 'G', 72 'H', 73 'I', 76 'L', 77 'M', 78 'N', 79 'O', 80 'P', 81 'Q', 82 'R'., vfloat_f=.1.25, 3.75, 5.5, 1.25., x_f=.1, 2, 3, 4, 5, 6, 7, 8., y_f=.12, 22, 32, 42., a_f=.118 'v', 101 'e', 99 'c', 116 't', 111 'o', 114 'r', 32 ' ', 111 'o', 102 'f', 32 ' ', 99 'c', 104 'h', 97 'a', 114 'r', 115 's', 46 '.'., b_f=.5.5, 4.5, 3.75, 2.25., c_f=.1.25, 3.5, 5.5, 7.75., intv_on_stack_f=.12, 34, 56, 78.." set pattern1 $pattern append pattern1 " at.*altivec-abi.c.*vint_res = vec_add.*vint_f, intv_on_stack_f.;" |