1 /* Print in infix form a struct expression.
3 Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
4 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
26 #include "expression.h"
29 #include "parser-defs.h"
30 #include "user-regs.h" /* For user_reg_map_regnum_to_name. */
32 #include "gdb_string.h"
39 /* Prototypes for local functions */
41 static void print_subexp (struct expression *, int *, struct ui_file *,
45 print_expression (struct expression *exp, struct ui_file *stream)
48 print_subexp (exp, &pc, stream, PREC_NULL);
51 /* Print the subexpression of EXP that starts in position POS, on STREAM.
52 PREC is the precedence of the surrounding operator;
53 if the precedence of the main operator of this subexpression is less,
54 parentheses are needed here. */
57 print_subexp (struct expression *exp, int *pos,
58 struct ui_file *stream, enum precedence prec)
61 const struct op_print *op_print_tab;
65 int assign_modify = 0;
66 enum exp_opcode opcode;
67 enum precedence myprec = PREC_NULL;
68 /* Set to 1 for a right-associative operator. */
73 op_print_tab = exp->language_defn->la_op_print_tab;
75 opcode = exp->elts[pc].opcode;
83 fputs_filtered (type_name_no_tag (exp->elts[pc + 1].type), stream);
84 fputs_filtered ("::", stream);
85 nargs = longest_to_int (exp->elts[pc + 2].longconst);
86 (*pos) += 4 + BYTES_TO_EXP_ELEM (nargs + 1);
87 fputs_filtered (&exp->elts[pc + 3].string, stream);
92 value_print (value_from_longest (exp->elts[pc + 1].type,
93 exp->elts[pc + 2].longconst),
94 stream, 0, Val_no_prettyprint);
99 value_print (value_from_double (exp->elts[pc + 1].type,
100 exp->elts[pc + 2].doubleconst),
101 stream, 0, Val_no_prettyprint);
108 b = exp->elts[pc + 1].block;
110 && BLOCK_FUNCTION (b) != NULL
111 && SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)) != NULL)
113 fputs_filtered (SYMBOL_PRINT_NAME (BLOCK_FUNCTION (b)), stream);
114 fputs_filtered ("::", stream);
116 fputs_filtered (SYMBOL_PRINT_NAME (exp->elts[pc + 2].symbol), stream);
122 fprintf_filtered (stream, "$%d",
123 longest_to_int (exp->elts[pc + 1].longconst));
128 int regnum = longest_to_int (exp->elts[pc + 1].longconst);
129 const char *name = user_reg_map_regnum_to_name (current_gdbarch,
132 fprintf_filtered (stream, "$%s", name);
138 fprintf_filtered (stream, "%s",
139 longest_to_int (exp->elts[pc + 1].longconst)
145 fprintf_filtered (stream, "$%s",
146 internalvar_name (exp->elts[pc + 1].internalvar));
151 nargs = longest_to_int (exp->elts[pc + 1].longconst);
152 print_subexp (exp, pos, stream, PREC_SUFFIX);
153 fputs_filtered (" (", stream);
154 for (tem = 0; tem < nargs; tem++)
157 fputs_filtered (", ", stream);
158 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
160 fputs_filtered (")", stream);
165 nargs = longest_to_int (exp->elts[pc + 1].longconst);
166 (*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
167 fputs_filtered (&exp->elts[pc + 2].string, stream);
171 nargs = longest_to_int (exp->elts[pc + 1].longconst);
172 (*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
173 /* LA_PRINT_STRING will print using the current repeat count threshold.
174 If necessary, we can temporarily set it to zero, or pass it as an
175 additional parameter to LA_PRINT_STRING. -fnf */
176 LA_PRINT_STRING (stream, &exp->elts[pc + 2].string, nargs, 1, 0);
180 nargs = longest_to_int (exp->elts[pc + 1].longconst);
182 += 3 + BYTES_TO_EXP_ELEM ((nargs + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT);
183 fprintf_unfiltered (stream, "B'<unimplemented>'");
186 case OP_OBJC_NSSTRING: /* Objective-C Foundation Class NSString constant. */
187 nargs = longest_to_int (exp->elts[pc + 1].longconst);
188 (*pos) += 3 + BYTES_TO_EXP_ELEM (nargs + 1);
189 fputs_filtered ("@\"", stream);
190 LA_PRINT_STRING (stream, &exp->elts[pc + 2].string, nargs, 1, 0);
191 fputs_filtered ("\"", stream);
194 case OP_OBJC_MSGCALL:
195 { /* Objective C message (method) call. */
198 nargs = longest_to_int (exp->elts[pc + 2].longconst);
199 fprintf_unfiltered (stream, "[");
200 print_subexp (exp, pos, stream, PREC_SUFFIX);
201 if (0 == target_read_string (exp->elts[pc + 1].longconst,
202 &selector, 1024, NULL))
204 error ("bad selector");
210 s = alloca (strlen (selector) + 1);
211 strcpy (s, selector);
212 for (tem = 0; tem < nargs; tem++)
214 nextS = strchr (s, ':');
216 fprintf_unfiltered (stream, " %s: ", s);
218 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
223 fprintf_unfiltered (stream, " %s", selector);
225 fprintf_unfiltered (stream, "]");
226 /* "selector" was malloc'd by target_read_string. Free it. */
233 nargs = longest_to_int (exp->elts[pc + 2].longconst);
234 nargs -= longest_to_int (exp->elts[pc + 1].longconst);
237 if (exp->elts[pc + 4].opcode == OP_LONG
238 && exp->elts[pc + 5].type == builtin_type_char
239 && exp->language_defn->la_language == language_c)
241 /* Attempt to print C character arrays using string syntax.
242 Walk through the args, picking up one character from each
243 of the OP_LONG expression elements. If any array element
244 does not match our expection of what we should find for
245 a simple string, revert back to array printing. Note that
246 the last expression element is an explicit null terminator
247 byte, which doesn't get printed. */
248 tempstr = alloca (nargs);
252 if (exp->elts[pc].opcode != OP_LONG
253 || exp->elts[pc + 1].type != builtin_type_char)
255 /* Not a simple array of char, use regular array printing. */
262 longest_to_int (exp->elts[pc + 2].longconst);
269 LA_PRINT_STRING (stream, tempstr, nargs - 1, 1, 0);
274 fputs_filtered (" {", stream);
275 for (tem = 0; tem < nargs; tem++)
279 fputs_filtered (", ", stream);
281 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
283 fputs_filtered ("}", stream);
288 tem = longest_to_int (exp->elts[pc + 1].longconst);
289 (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
290 /* Gcc support both these syntaxes. Unsure which is preferred. */
292 fputs_filtered (&exp->elts[pc + 2].string, stream);
293 fputs_filtered (": ", stream);
295 fputs_filtered (".", stream);
296 fputs_filtered (&exp->elts[pc + 2].string, stream);
297 fputs_filtered ("=", stream);
299 print_subexp (exp, pos, stream, PREC_SUFFIX);
303 if ((int) prec > (int) PREC_COMMA)
304 fputs_filtered ("(", stream);
305 /* Print the subexpressions, forcing parentheses
306 around any binary operations within them.
307 This is more parentheses than are strictly necessary,
308 but it looks clearer. */
309 print_subexp (exp, pos, stream, PREC_HYPER);
310 fputs_filtered (" ? ", stream);
311 print_subexp (exp, pos, stream, PREC_HYPER);
312 fputs_filtered (" : ", stream);
313 print_subexp (exp, pos, stream, PREC_HYPER);
314 if ((int) prec > (int) PREC_COMMA)
315 fputs_filtered (")", stream);
319 case TERNOP_SLICE_COUNT:
320 print_subexp (exp, pos, stream, PREC_SUFFIX);
321 fputs_filtered ("(", stream);
322 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
323 fputs_filtered (opcode == TERNOP_SLICE ? " : " : " UP ", stream);
324 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
325 fputs_filtered (")", stream);
328 case STRUCTOP_STRUCT:
329 tem = longest_to_int (exp->elts[pc + 1].longconst);
330 (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
331 print_subexp (exp, pos, stream, PREC_SUFFIX);
332 fputs_filtered (".", stream);
333 fputs_filtered (&exp->elts[pc + 2].string, stream);
336 /* Will not occur for Modula-2 */
338 tem = longest_to_int (exp->elts[pc + 1].longconst);
339 (*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
340 print_subexp (exp, pos, stream, PREC_SUFFIX);
341 fputs_filtered ("->", stream);
342 fputs_filtered (&exp->elts[pc + 2].string, stream);
345 case BINOP_SUBSCRIPT:
346 print_subexp (exp, pos, stream, PREC_SUFFIX);
347 fputs_filtered ("[", stream);
348 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
349 fputs_filtered ("]", stream);
352 case UNOP_POSTINCREMENT:
353 print_subexp (exp, pos, stream, PREC_SUFFIX);
354 fputs_filtered ("++", stream);
357 case UNOP_POSTDECREMENT:
358 print_subexp (exp, pos, stream, PREC_SUFFIX);
359 fputs_filtered ("--", stream);
364 if ((int) prec > (int) PREC_PREFIX)
365 fputs_filtered ("(", stream);
366 fputs_filtered ("(", stream);
367 type_print (exp->elts[pc + 1].type, "", stream, 0);
368 fputs_filtered (") ", stream);
369 print_subexp (exp, pos, stream, PREC_PREFIX);
370 if ((int) prec > (int) PREC_PREFIX)
371 fputs_filtered (")", stream);
376 if ((int) prec > (int) PREC_PREFIX)
377 fputs_filtered ("(", stream);
378 if (TYPE_CODE (exp->elts[pc + 1].type) == TYPE_CODE_FUNC &&
379 exp->elts[pc + 3].opcode == OP_LONG)
381 /* We have a minimal symbol fn, probably. It's encoded
382 as a UNOP_MEMVAL (function-type) of an OP_LONG (int, address).
383 Swallow the OP_LONG (including both its opcodes); ignore
384 its type; print the value in the type of the MEMVAL. */
386 val = value_at_lazy (exp->elts[pc + 1].type,
387 (CORE_ADDR) exp->elts[pc + 5].longconst,
389 value_print (val, stream, 0, Val_no_prettyprint);
393 fputs_filtered ("{", stream);
394 type_print (exp->elts[pc + 1].type, "", stream, 0);
395 fputs_filtered ("} ", stream);
396 print_subexp (exp, pos, stream, PREC_PREFIX);
398 if ((int) prec > (int) PREC_PREFIX)
399 fputs_filtered (")", stream);
402 case BINOP_ASSIGN_MODIFY:
403 opcode = exp->elts[pc + 1].opcode;
405 myprec = PREC_ASSIGN;
409 for (tem = 0; op_print_tab[tem].opcode != OP_NULL; tem++)
410 if (op_print_tab[tem].opcode == opcode)
412 op_str = op_print_tab[tem].string;
415 if (op_print_tab[tem].opcode != opcode)
416 /* Not found; don't try to keep going because we don't know how
417 to interpret further elements. */
418 error ("Invalid expression");
425 fputs_filtered ("this", stream);
428 /* Objective-C ops */
432 fputs_filtered ("self", stream); /* The ObjC equivalent of "this". */
437 case MULTI_SUBSCRIPT:
439 nargs = longest_to_int (exp->elts[pc + 1].longconst);
440 print_subexp (exp, pos, stream, PREC_SUFFIX);
441 fprintf_unfiltered (stream, " [");
442 for (tem = 0; tem < nargs; tem++)
445 fprintf_unfiltered (stream, ", ");
446 print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
448 fprintf_unfiltered (stream, "]");
453 fprintf_unfiltered (stream, "VAL(");
454 type_print (exp->elts[pc + 1].type, "", stream, 0);
455 fprintf_unfiltered (stream, ",");
456 print_subexp (exp, pos, stream, PREC_PREFIX);
457 fprintf_unfiltered (stream, ")");
462 error ("print_subexp: Not implemented.");
468 for (tem = 0; op_print_tab[tem].opcode != OP_NULL; tem++)
469 if (op_print_tab[tem].opcode == opcode)
471 op_str = op_print_tab[tem].string;
472 myprec = op_print_tab[tem].precedence;
473 assoc = op_print_tab[tem].right_assoc;
476 if (op_print_tab[tem].opcode != opcode)
477 /* Not found; don't try to keep going because we don't know how
478 to interpret further elements. For example, this happens
479 if opcode is OP_TYPE. */
480 error ("Invalid expression");
483 /* Note that PREC_BUILTIN will always emit parentheses. */
484 if ((int) myprec < (int) prec)
485 fputs_filtered ("(", stream);
486 if ((int) opcode > (int) BINOP_END)
490 /* Unary postfix operator. */
491 print_subexp (exp, pos, stream, PREC_SUFFIX);
492 fputs_filtered (op_str, stream);
496 /* Unary prefix operator. */
497 fputs_filtered (op_str, stream);
498 if (myprec == PREC_BUILTIN_FUNCTION)
499 fputs_filtered ("(", stream);
500 print_subexp (exp, pos, stream, PREC_PREFIX);
501 if (myprec == PREC_BUILTIN_FUNCTION)
502 fputs_filtered (")", stream);
507 /* Binary operator. */
508 /* Print left operand.
509 If operator is right-associative,
510 increment precedence for this operand. */
511 print_subexp (exp, pos, stream,
512 (enum precedence) ((int) myprec + assoc));
513 /* Print the operator itself. */
515 fprintf_filtered (stream, " %s= ", op_str);
516 else if (op_str[0] == ',')
517 fprintf_filtered (stream, "%s ", op_str);
519 fprintf_filtered (stream, " %s ", op_str);
520 /* Print right operand.
521 If operator is left-associative,
522 increment precedence for this operand. */
523 print_subexp (exp, pos, stream,
524 (enum precedence) ((int) myprec + !assoc));
527 if ((int) myprec < (int) prec)
528 fputs_filtered (")", stream);
531 /* Return the operator corresponding to opcode OP as
532 a string. NULL indicates that the opcode was not found in the
533 current language table. */
535 op_string (enum exp_opcode op)
538 const struct op_print *op_print_tab;
540 op_print_tab = current_language->la_op_print_tab;
541 for (tem = 0; op_print_tab[tem].opcode != OP_NULL; tem++)
542 if (op_print_tab[tem].opcode == op)
543 return op_print_tab[tem].string;
547 /* Support for dumping the raw data from expressions in a human readable
550 static char *op_name (int opcode);
561 sprintf (buf, "<unknown %d>", opcode);
582 case BINOP_LOGICAL_AND:
583 return "BINOP_LOGICAL_AND";
584 case BINOP_LOGICAL_OR:
585 return "BINOP_LOGICAL_OR";
586 case BINOP_BITWISE_AND:
587 return "BINOP_BITWISE_AND";
588 case BINOP_BITWISE_IOR:
589 return "BINOP_BITWISE_IOR";
590 case BINOP_BITWISE_XOR:
591 return "BINOP_BITWISE_XOR";
593 return "BINOP_EQUAL";
595 return "BINOP_NOTEQUAL";
605 return "BINOP_REPEAT";
607 return "BINOP_ASSIGN";
609 return "BINOP_COMMA";
610 case BINOP_SUBSCRIPT:
611 return "BINOP_SUBSCRIPT";
612 case MULTI_SUBSCRIPT:
613 return "MULTI_SUBSCRIPT";
620 case STRUCTOP_MEMBER:
621 return "STRUCTOP_MEMBER";
623 return "STRUCTOP_MPTR";
625 return "BINOP_INTDIV";
626 case BINOP_ASSIGN_MODIFY:
627 return "BINOP_ASSIGN_MODIFY";
635 return "BINOP_CONCAT";
637 return "BINOP_RANGE";
641 return "TERNOP_COND";
643 return "TERNOP_SLICE";
644 case TERNOP_SLICE_COUNT:
645 return "TERNOP_SLICE_COUNT";
651 return "OP_VAR_VALUE";
655 return "OP_REGISTER";
657 return "OP_INTERNALVAR";
663 return "OP_BITSTRING";
669 return "UNOP_MEMVAL";
672 case UNOP_LOGICAL_NOT:
673 return "UNOP_LOGICAL_NOT";
674 case UNOP_COMPLEMENT:
675 return "UNOP_COMPLEMENT";
680 case UNOP_PREINCREMENT:
681 return "UNOP_PREINCREMENT";
682 case UNOP_POSTINCREMENT:
683 return "UNOP_POSTINCREMENT";
684 case UNOP_PREDECREMENT:
685 return "UNOP_PREDECREMENT";
686 case UNOP_POSTDECREMENT:
687 return "UNOP_POSTDECREMENT";
689 return "UNOP_SIZEOF";
695 return "UNOP_LENGTH";
721 return "OP_M2_STRING";
722 case STRUCTOP_STRUCT:
723 return "STRUCTOP_STRUCT";
725 return "STRUCTOP_PTR";
729 return "OP_OBJC_SELF";
740 dump_prefix_expression (struct expression *exp, struct ui_file *stream,
748 fprintf_filtered (stream, "Dump of expression @ ");
749 gdb_print_host_address (exp, stream);
750 fprintf_filtered (stream, ", %s:\nExpression: `", note);
751 if (exp->elts[0].opcode != OP_TYPE)
752 print_expression (exp, stream);
754 fprintf_filtered (stream, "Type printing not yet supported....");
755 fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n",
756 exp->language_defn->la_name, exp->nelts,
757 (long) sizeof (union exp_element));
758 fprintf_filtered (stream, "\t%5s %20s %16s %s\n", "Index", "Opcode",
759 "Hex Value", "String Value");
760 for (elt = 0; elt < exp->nelts; elt++)
762 fprintf_filtered (stream, "\t%5d ", elt);
763 opcode_name = op_name (exp->elts[elt].opcode);
765 fprintf_filtered (stream, "%20s ", opcode_name);
766 print_longest (stream, 'd', 0, exp->elts[elt].longconst);
767 fprintf_filtered (stream, " ");
769 for (eltscan = (char *) &exp->elts[elt],
770 eltsize = sizeof (union exp_element);
774 fprintf_filtered (stream, "%c",
775 isprint (*eltscan) ? (*eltscan & 0xFF) : '.');
777 fprintf_filtered (stream, "\n");
781 static int dump_subexp (struct expression *exp, struct ui_file *stream,
785 dump_subexp (struct expression *exp, struct ui_file *stream, int elt)
787 static int indent = 0;
790 fprintf_filtered (stream, "\n");
791 fprintf_filtered (stream, "\t%5d ", elt);
793 for (i = 1; i <= indent; i++)
794 fprintf_filtered (stream, " ");
797 fprintf_filtered (stream, "%-20s ", op_name (exp->elts[elt].opcode));
799 switch (exp->elts[elt++].opcode)
803 case TERNOP_SLICE_COUNT:
804 elt = dump_subexp (exp, stream, elt);
813 case BINOP_LOGICAL_AND:
814 case BINOP_LOGICAL_OR:
815 case BINOP_BITWISE_AND:
816 case BINOP_BITWISE_IOR:
817 case BINOP_BITWISE_XOR:
827 case BINOP_SUBSCRIPT:
832 case BINOP_ASSIGN_MODIFY:
840 elt = dump_subexp (exp, stream, elt);
842 case UNOP_LOGICAL_NOT:
843 case UNOP_COMPLEMENT:
846 case UNOP_PREINCREMENT:
847 case UNOP_POSTINCREMENT:
848 case UNOP_PREDECREMENT:
849 case UNOP_POSTDECREMENT:
868 elt = dump_subexp (exp, stream, elt);
871 fprintf_filtered (stream, "Type @");
872 gdb_print_host_address (exp->elts[elt].type, stream);
873 fprintf_filtered (stream, " (");
874 type_print (exp->elts[elt].type, NULL, stream, 0);
875 fprintf_filtered (stream, "), value %ld (0x%lx)",
876 (long) exp->elts[elt + 1].longconst,
877 (long) exp->elts[elt + 1].longconst);
881 fprintf_filtered (stream, "Type @");
882 gdb_print_host_address (exp->elts[elt].type, stream);
883 fprintf_filtered (stream, " (");
884 type_print (exp->elts[elt].type, NULL, stream, 0);
885 fprintf_filtered (stream, "), value %g",
886 (double) exp->elts[elt + 1].doubleconst);
890 fprintf_filtered (stream, "Block @");
891 gdb_print_host_address (exp->elts[elt].block, stream);
892 fprintf_filtered (stream, ", symbol @");
893 gdb_print_host_address (exp->elts[elt + 1].symbol, stream);
894 fprintf_filtered (stream, " (%s)",
895 DEPRECATED_SYMBOL_NAME (exp->elts[elt + 1].symbol));
899 fprintf_filtered (stream, "History element %ld",
900 (long) exp->elts[elt].longconst);
904 fprintf_filtered (stream, "Register %ld",
905 (long) exp->elts[elt].longconst);
909 fprintf_filtered (stream, "Internal var @");
910 gdb_print_host_address (exp->elts[elt].internalvar, stream);
911 fprintf_filtered (stream, " (%s)",
912 exp->elts[elt].internalvar->name);
919 nargs = longest_to_int (exp->elts[elt].longconst);
921 fprintf_filtered (stream, "Number of args: %d", nargs);
924 for (i = 1; i <= nargs + 1; i++)
925 elt = dump_subexp (exp, stream, elt);
933 lower = longest_to_int (exp->elts[elt].longconst);
934 upper = longest_to_int (exp->elts[elt + 1].longconst);
936 fprintf_filtered (stream, "Bounds [%d:%d]", lower, upper);
939 for (i = 1; i <= upper - lower + 1; i++)
940 elt = dump_subexp (exp, stream, elt);
945 fprintf_filtered (stream, "Type @");
946 gdb_print_host_address (exp->elts[elt].type, stream);
947 fprintf_filtered (stream, " (");
948 type_print (exp->elts[elt].type, NULL, stream, 0);
949 fprintf_filtered (stream, ")");
950 elt = dump_subexp (exp, stream, elt + 2);
953 fprintf_filtered (stream, "Type @");
954 gdb_print_host_address (exp->elts[elt].type, stream);
955 fprintf_filtered (stream, " (");
956 type_print (exp->elts[elt].type, NULL, stream, 0);
957 fprintf_filtered (stream, ")");
960 case STRUCTOP_STRUCT:
966 len = longest_to_int (exp->elts[elt].longconst);
967 elem_name = &exp->elts[elt + 1].string;
969 fprintf_filtered (stream, "Element name: `%.*s'", len, elem_name);
970 elt = dump_subexp (exp, stream, elt + 3 + BYTES_TO_EXP_ELEM (len + 1));
978 fprintf_filtered (stream, "Type @");
979 gdb_print_host_address (exp->elts[elt].type, stream);
980 fprintf_filtered (stream, " (");
981 type_print (exp->elts[elt].type, NULL, stream, 0);
982 fprintf_filtered (stream, ") ");
984 len = longest_to_int (exp->elts[elt + 1].longconst);
985 elem_name = &exp->elts[elt + 2].string;
987 fprintf_filtered (stream, "Field name: `%.*s'", len, elem_name);
988 elt += 4 + BYTES_TO_EXP_ELEM (len + 1);
993 case STRUCTOP_MEMBER:
995 case MULTI_SUBSCRIPT:
996 case OP_F77_UNDETERMINED_ARGLIST:
1006 fprintf_filtered (stream, "Unknown format");
1015 dump_postfix_expression (struct expression *exp, struct ui_file *stream,
1020 fprintf_filtered (stream, "Dump of expression @ ");
1021 gdb_print_host_address (exp, stream);
1022 fprintf_filtered (stream, ", %s:\nExpression: `", note);
1023 if (exp->elts[0].opcode != OP_TYPE)
1024 print_expression (exp, stream);
1026 fputs_filtered ("Type printing not yet supported....", stream);
1027 fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n",
1028 exp->language_defn->la_name, exp->nelts,
1029 (long) sizeof (union exp_element));
1030 fputs_filtered ("\n", stream);
1032 for (elt = 0; elt < exp->nelts;)
1033 elt = dump_subexp (exp, stream, elt);
1034 fputs_filtered ("\n", stream);