diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:28:47 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:28:47 +0000 |
commit | b806fb9a9bd4e0e47382c411d6e9321d1283445b (patch) | |
tree | 0b11c8ae8819ea9025164c82b62d0e109ebb35a4 /gdb/expprint.c | |
parent | 3e3b026fee8cd62ac6c2cfc7f86cec972d8f5676 (diff) | |
download | gdb-b806fb9a9bd4e0e47382c411d6e9321d1283445b.zip gdb-b806fb9a9bd4e0e47382c411d6e9321d1283445b.tar.gz gdb-b806fb9a9bd4e0e47382c411d6e9321d1283445b.tar.bz2 |
* expprint.c (print_subexp_standard): Compare against builtin type
associated with exp->gdbarch instead of builtin_type_char.
* f-valprint.c (f_val_print): Use extract_unsigned_integer to
extract values of arbitrary logical type. Handle arbitrary
complex types.
* printcmd.c (float_type_from_length): New function.
(print_scalar_formatted, printf_command): Use it.
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r-- | gdb/expprint.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c index fb95944..079f2a9 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -237,7 +237,8 @@ print_subexp_standard (struct expression *exp, int *pos, nargs++; tem = 0; if (exp->elts[pc + 4].opcode == OP_LONG - && exp->elts[pc + 5].type == builtin_type_char + && exp->elts[pc + 5].type + == builtin_type (exp->gdbarch)->builtin_char && exp->language_defn->la_language == language_c) { /* Attempt to print C character arrays using string syntax. @@ -252,7 +253,8 @@ print_subexp_standard (struct expression *exp, int *pos, while (tem < nargs) { if (exp->elts[pc].opcode != OP_LONG - || exp->elts[pc + 1].type != builtin_type_char) + || exp->elts[pc + 1].type + != builtin_type (exp->gdbarch)->builtin_char) { /* Not a simple array of char, use regular array printing. */ tem = 0; |