mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 23:57:03 +08:00
* 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 ****
This commit is contained in:
@ -1,3 +1,15 @@
|
|||||||
|
Mon Dec 21 22:24:33 1992 Fred Fish (fnf@cygnus.com)
|
||||||
|
|
||||||
|
* 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 ****
|
||||||
|
|
||||||
Mon Dec 21 18:02:35 1992 Stu Grossman (grossman at cygnus.com)
|
Mon Dec 21 18:02:35 1992 Stu Grossman (grossman at cygnus.com)
|
||||||
|
|
||||||
* tm-hppah.h: #define NEED_TEXT_START_END for target memory
|
* tm-hppah.h: #define NEED_TEXT_START_END for target memory
|
||||||
|
@ -474,7 +474,7 @@ value_array_slice: array_primitive_value '(' lower_element ':' upper_element ')'
|
|||||||
{
|
{
|
||||||
$$ = 0; /* FIXME */
|
$$ = 0; /* FIXME */
|
||||||
}
|
}
|
||||||
| array_primitive_value '(' first_element UP slice_size '('
|
| array_primitive_value '(' first_element UP slice_size ')'
|
||||||
{
|
{
|
||||||
$$ = 0; /* FIXME */
|
$$ = 0; /* FIXME */
|
||||||
}
|
}
|
||||||
|
@ -51,9 +51,6 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
|
|||||||
int recurse;
|
int recurse;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
{
|
{
|
||||||
unsigned len;
|
|
||||||
struct type *elttype;
|
|
||||||
unsigned eltlen;
|
|
||||||
LONGEST val;
|
LONGEST val;
|
||||||
|
|
||||||
switch (TYPE_CODE (type))
|
switch (TYPE_CODE (type))
|
||||||
@ -61,25 +58,13 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
|
|||||||
case TYPE_CODE_ARRAY:
|
case TYPE_CODE_ARRAY:
|
||||||
if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
|
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)
|
if (prettyprint_arrays)
|
||||||
{
|
{
|
||||||
print_spaces_filtered (2 + 2 * recurse, stream);
|
print_spaces_filtered (2 + 2 * recurse, stream);
|
||||||
}
|
}
|
||||||
fprintf_filtered (stream, "[");
|
fprintf_filtered (stream, "[");
|
||||||
/* For an array of chars, print with string syntax. */
|
val_print_array_elements (type, valaddr, address, stream, format,
|
||||||
if (eltlen == 1 && TYPE_CODE (elttype) == TYPE_CODE_INT
|
deref_ref, recurse, pretty, 0);
|
||||||
&& (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);
|
|
||||||
}
|
|
||||||
fprintf_filtered (stream, "]");
|
fprintf_filtered (stream, "]");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user