diff options
author | Fred Fish <fnf@specifix.com> | 1992-12-22 06:32:19 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-12-22 06:32:19 +0000 |
commit | a9b37611e7f9dd8948c486b6ccecf148c27234a1 (patch) | |
tree | 050bab54dc08b8f56340c5f086e8f707eef27987 /gdb/ch-valprint.c | |
parent | 09f3dc6e0685e87c0713a3ed6781ba970b0bf1be (diff) | |
download | gdb-a9b37611e7f9dd8948c486b6ccecf148c27234a1.zip gdb-a9b37611e7f9dd8948c486b6ccecf148c27234a1.tar.gz gdb-a9b37611e7f9dd8948c486b6ccecf148c27234a1.tar.bz2 |
* valprint.c (val_print): Reorganize comment and add note
about dependency on target byte ordering.
**** start-sanitize-chill ****
* ch-exp.y (value_array_slice): Fix typo.
* ch-valprint.c (chill_val_print): Remove C'ism that arrays of
byte sized ints are assumed to be char strings and printed with
string syntax. In chill, arrays of chars and arrays of
bytes/ubytes are distinquishable, and printed appropriately.
**** end-sanitize-chill ****
Diffstat (limited to 'gdb/ch-valprint.c')
-rw-r--r-- | gdb/ch-valprint.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/gdb/ch-valprint.c b/gdb/ch-valprint.c index 8ffa1af..8c80bc4 100644 --- a/gdb/ch-valprint.c +++ b/gdb/ch-valprint.c @@ -51,9 +51,6 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse, int recurse; enum val_prettyprint pretty; { - unsigned len; - struct type *elttype; - unsigned eltlen; LONGEST val; switch (TYPE_CODE (type)) @@ -61,25 +58,13 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse, case TYPE_CODE_ARRAY: if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0) { - elttype = TYPE_TARGET_TYPE (type); - eltlen = TYPE_LENGTH (elttype); - len = TYPE_LENGTH (type) / eltlen; if (prettyprint_arrays) { print_spaces_filtered (2 + 2 * recurse, stream); } fprintf_filtered (stream, "["); - /* For an array of chars, print with string syntax. */ - if (eltlen == 1 && TYPE_CODE (elttype) == TYPE_CODE_INT - && (format == 0 || format == 's') ) - { - LA_PRINT_STRING (stream, valaddr, len, 0); - } - else - { - val_print_array_elements (type, valaddr, address, stream, - format, deref_ref, recurse, pretty, 0); - } + val_print_array_elements (type, valaddr, address, stream, format, + deref_ref, recurse, pretty, 0); fprintf_filtered (stream, "]"); } else |