66 int assign_modify = 0;
122 const struct block *b;
137 case OP_VAR_ENTRY_VALUE:
178 for (tem = 0; tem < nargs; tem++)
209 case OP_OBJC_NSSTRING:
225 case OP_OBJC_MSGCALL:
234 &selector, 1024, NULL))
236 error (
_(
"bad selector"));
243 s = alloca (strlen (selector) + 1);
244 strcpy (s, selector);
245 for (tem = 0; tem < nargs; tem++)
247 nextS = strchr (s,
':');
283 tempstr = alloca (nargs);
310 (
gdb_byte *) tempstr, nargs - 1, NULL, 0, &opts);
316 for (tem = 0; tem < nargs; tem++)
340 if ((
int) prec > (
int) PREC_COMMA)
353 case STRUCTOP_STRUCT:
370 case STRUCTOP_MEMBER:
382 case BINOP_SUBSCRIPT:
389 case UNOP_POSTINCREMENT:
394 case UNOP_POSTDECREMENT:
407 if ((
int) prec > (
int) PREC_PREFIX)
412 if ((
int) prec > (
int) PREC_PREFIX)
418 if ((
int) prec > (
int) PREC_PREFIX)
422 case UNOP_DYNAMIC_CAST:
423 case UNOP_REINTERPRET_CAST:
425 :
"reinterpret_cast", stream);
435 if ((
int) prec > (
int) PREC_PREFIX)
459 if ((
int) prec > (
int) PREC_PREFIX)
463 case UNOP_MEMVAL_TYPE:
464 if ((
int) prec > (
int) PREC_PREFIX)
470 if ((
int) prec > (
int) PREC_PREFIX)
474 case UNOP_MEMVAL_TLS:
476 if ((
int) prec > (
int) PREC_PREFIX)
482 if ((
int) prec > (
int) PREC_PREFIX)
486 case BINOP_ASSIGN_MODIFY:
493 for (tem = 0; op_print_tab[tem].
opcode != OP_NULL; tem++)
494 if (op_print_tab[tem].opcode == opcode)
496 op_str = op_print_tab[tem].
string;
499 if (op_print_tab[tem].opcode != opcode)
502 error (
_(
"Invalid expression"));
518 case MULTI_SUBSCRIPT:
523 for (tem = 0; tem < nargs; tem++)
566 for (tem = 0; op_print_tab[tem].
opcode != OP_NULL; tem++)
567 if (op_print_tab[tem].opcode == opcode)
569 op_str = op_print_tab[tem].
string;
574 if (op_print_tab[tem].opcode != opcode)
578 error (
_(
"Invalid expression"));
582 if ((
int) myprec < (
int) prec)
584 if ((
int) opcode > (
int) BINOP_END)
614 else if (op_str[0] ==
',')
625 if ((
int) myprec < (
int) prec)
636 const struct op_print *op_print_tab;
639 for (tem = 0; op_print_tab[tem].
opcode != OP_NULL; tem++)
640 if (op_print_tab[tem].
opcode == op)
641 return op_print_tab[tem].
string;
670 xsnprintf (buf,
sizeof (buf),
"<unknown %d>", opcode);
676 #include "std-operator.def"
697 fprintf_filtered (stream,
"\n\tLanguage %s, %d elements, %ld bytes each.\n",
701 "Hex Value",
"String Value");
702 for (elt = 0; elt < exp->
nelts; elt++)
711 for (eltscan = (
char *) &exp->
elts[elt],
717 isprint (*eltscan) ? (*eltscan & 0xFF) :
'.');
730 static int indent = 0;
736 for (i = 1; i <= indent; i++)
763 struct ui_file *stream,
int elt)
781 case BINOP_LOGICAL_AND:
782 case BINOP_LOGICAL_OR:
783 case BINOP_BITWISE_AND:
784 case BINOP_BITWISE_IOR:
785 case BINOP_BITWISE_XOR:
795 case BINOP_SUBSCRIPT:
800 case BINOP_ASSIGN_MODIFY:
804 case STRUCTOP_MEMBER:
809 case UNOP_LOGICAL_NOT:
810 case UNOP_COMPLEMENT:
813 case UNOP_PREINCREMENT:
814 case UNOP_POSTINCREMENT:
815 case UNOP_PREDECREMENT:
816 case UNOP_POSTDECREMENT:
859 case OP_VAR_ENTRY_VALUE:
891 for (i = 1; i <= nargs + 1; i++)
906 for (i = 1; i <= upper - lower + 1; i++)
910 case UNOP_DYNAMIC_CAST:
911 case UNOP_REINTERPRET_CAST:
913 case UNOP_MEMVAL_TYPE:
928 case UNOP_MEMVAL_TLS:
957 case STRUCTOP_STRUCT:
1030 case MULTI_SUBSCRIPT:
1031 case OP_F77_UNDETERMINED_ARGLIST:
1050 fputs_filtered (
", after conversion to prefix form:\nExpression: `", stream);
1052 fprintf_filtered (stream,
"'\n\tLanguage %s, %d elements, %ld bytes each.\n",
1057 for (elt = 0; elt < exp->
nelts;)
union exp_element elts[1]
#define SYMBOL_PRINT_NAME(symbol)
void value_print(struct value *val, struct ui_file *stream, const struct value_print_options *options)
void fputs_unfiltered(const char *buf, struct ui_file *file)
char * plongest(LONGEST l)
void dump_raw_expression(struct expression *exp, struct ui_file *stream, char *note)
const struct language_defn * language_defn
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
enum language la_language
void get_no_prettyformat_print_options(struct value_print_options *opts)
#define BYTES_TO_EXP_ELEM(bytes)
int longest_to_int(LONGEST)
struct internalvar * internalvar
int dump_subexp(struct expression *exp, struct ui_file *stream, int elt)
#define BLOCK_FUNCTION(bl)
enum precedence precedence
char * op_name(struct expression *exp, enum exp_opcode opcode)
const struct block * block
const struct exp_descriptor * la_exp_desc
void dump_prefix_expression(struct expression *exp, struct ui_file *stream)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
void print_expression(struct expression *exp, struct ui_file *stream)
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
char * internalvar_name(struct internalvar *var)
int dump_subexp_body_standard(struct expression *exp, struct ui_file *stream, int elt)
struct value * value_from_longest(struct type *type, LONGEST num)
struct value * value_at_lazy(struct type *type, CORE_ADDR addr)
char * op_name_standard(enum exp_opcode opcode)
struct value * value_from_double(struct type *type, DOUBLEST num)
const char * objfile_name(const struct objfile *objfile)
struct type * builtin_char
const struct language_defn * current_language
void print_longest(struct ui_file *stream, int format, int use_c_format, LONGEST val_long)
void gdb_print_host_address(const void *addr, struct ui_file *stream)
void print_subexp_standard(struct expression *exp, int *pos, struct ui_file *stream, enum precedence prec)
void print_subexp(struct expression *exp, int *pos, struct ui_file *stream, enum precedence prec)
int xsnprintf(char *str, size_t size, const char *format,...)
#define TYPE_CODE(thistype)
const struct op_print * la_op_print_tab
void get_user_print_options(struct value_print_options *opts)
int(* dump_subexp_body)(struct expression *, struct ui_file *, int)
char *(* op_name)(enum exp_opcode)
static int dump_subexp_body(struct expression *exp, struct ui_file *, int)
#define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options)
void(* print_subexp)(struct expression *, int *, struct ui_file *, enum precedence)
const char * type_name_no_tag(const struct type *type)
char * op_string(enum exp_opcode op)
int target_read_string(CORE_ADDR memaddr, char **string, int len, int *errnop)
void error(const char *fmt,...)
const ULONGEST const LONGEST len