/* Print in infix form a struct expression.
Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2003, 2007, 2008 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2003, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GDB.
If necessary, we can temporarily set it to zero, or pass it as an
additional parameter to LA_PRINT_STRING. -fnf */
get_user_print_options (&opts);
- LA_PRINT_STRING (stream, &exp->elts[pc + 2].string, nargs, 1, 0,
- &opts);
+ LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
+ &exp->elts[pc + 2].string, nargs, 0, &opts);
}
return;
(*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
fputs_filtered ("@\"", stream);
get_user_print_options (&opts);
- LA_PRINT_STRING (stream, &exp->elts[pc + 2].string, nargs, 1, 0,
- &opts);
+ LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
+ &exp->elts[pc + 2].string, nargs, 0, &opts);
fputs_filtered ("\"", stream);
}
return;
{
struct value_print_options opts;
get_user_print_options (&opts);
- LA_PRINT_STRING (stream, tempstr, nargs - 1, 1, 0,
- &opts);
+ LA_PRINT_STRING (stream, builtin_type (exp->gdbarch)->builtin_char,
+ tempstr, nargs - 1, 0, &opts);
(*pos) = pc;
}
else
}
}
+/* Print a raw dump of expression EXP to STREAM.
+ NOTE, if non-NULL, is printed as extra explanatory text. */
+
void
dump_raw_expression (struct expression *exp, struct ui_file *stream,
char *note)
fprintf_filtered (stream, "Dump of expression @ ");
gdb_print_host_address (exp, stream);
- fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n",
+ if (note)
+ fprintf_filtered (stream, ", %s:", note);
+ fprintf_filtered (stream, "\n\tLanguage %s, %d elements, %ld bytes each.\n",
exp->language_defn->la_name, exp->nelts,
(long) sizeof (union exp_element));
fprintf_filtered (stream, "\t%5s %20s %16s %s\n", "Index", "Opcode",