diff options
author | Markus Deuling <deuling@de.ibm.com> | 2008-05-23 04:28:05 +0000 |
---|---|---|
committer | Markus Deuling <deuling@de.ibm.com> | 2008-05-23 04:28:05 +0000 |
commit | d44e847372bc71608d46402a65034c8d40ba2e80 (patch) | |
tree | ce5f58b4b28c2cc83afc0a951a07e1a34ec314f5 /gdb/printcmd.c | |
parent | cbc80391d0150f6926d2b18db4bafa7ce23f17a5 (diff) | |
download | gdb-d44e847372bc71608d46402a65034c8d40ba2e80.zip gdb-d44e847372bc71608d46402a65034c8d40ba2e80.tar.gz gdb-d44e847372bc71608d46402a65034c8d40ba2e80.tar.bz2 |
* valprint.c (print_hex_chars, print_octal_chars, print_decimal_chars,
print_binary_chars, print_char_chars): Add byte_order parameter and
replace gdbarch_byte_order.
(print_decimal_chars): Replace START_P, NOT_END_P and NEXT_P by their
expressions and remove them. Remove unused TWO_TO_FOURTH.
(val_print_type_code_int): Introduce gdbarch_byte_order to get at the
endianness. Update call to print_hex_chars.
* valprint.h (print_hex_chars, print_octal_chars, print_decimal_chars,
print_binary_chars, print_char_chars): Add byte_order parameter.
* printcmd.c (print_scalar_formatted): Introduce gdbarch_byte_order to
get at the endianness. Update print_*_char calls to use byte_order.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index ad658b0..b63fbc1 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -322,6 +322,7 @@ print_scalar_formatted (const void *valaddr, struct type *type, { LONGEST val_long = 0; unsigned int len = TYPE_LENGTH (type); + enum bfd_endian byte_order = gdbarch_byte_order (current_gdbarch); /* If we get here with a string format, try again without it. Go all the way back to the language printers, which may call us @@ -340,20 +341,20 @@ print_scalar_formatted (const void *valaddr, struct type *type, switch (format) { case 'o': - print_octal_chars (stream, valaddr, len); + print_octal_chars (stream, valaddr, len, byte_order); return; case 'u': case 'd': - print_decimal_chars (stream, valaddr, len); + print_decimal_chars (stream, valaddr, len, byte_order); return; case 't': - print_binary_chars (stream, valaddr, len); + print_binary_chars (stream, valaddr, len, byte_order); return; case 'x': - print_hex_chars (stream, valaddr, len); + print_hex_chars (stream, valaddr, len, byte_order); return; case 'c': - print_char_chars (stream, valaddr, len); + print_char_chars (stream, valaddr, len, byte_order); return; default: break; |