summaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:28:47 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:28:47 +0000
commitbd904e8f1c2fbaead2eee9892b8310c64bba25e1 (patch)
treed864c8bd960c57db2b06636394c50a7a4dc3a509 /gdb/expprint.c
parent42f2791e19516e66843bdee1454560c9d2d312bf (diff)
downloadgdb-bd904e8f1c2fbaead2eee9892b8310c64bba25e1.tar.gz
* 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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index fb95944fc00..079f2a9509e 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;