case E_NOT:
case E_BNOT:
case E_MIN:
- case E_MUL:
+ case E_DEREF:
case E_SELECT:
case E_PLUS:
+ case E_ADDR:
return 12;
}
return 1;
c = getc(db_in);
} while (c != EOF && class(c) == STSKIP);
if (c == EOF) return c;
+ if (extended_charset && in_ext(c)) {
+ TOK = get_name(c);
+ return TOK;
+ }
switch(class(c)) {
case STSTR:
TOK = (*currlang->get_string)(c);
p_type t1, t2;
long ic1, ic2;
int A_used = 0;
+ int tclass;
+ char *str;
}
: { *ptp = 0; }
[
/* these are used in C for references to a struct, union or
* enum that has not been declared (yet)
*/
- 'x' { tp = new_type(); tp->ty_flags = T_CROSS; }
+ 'x'
[ 's' /* struct */
- { tp->ty_class = T_STRUCT; }
+ { tclass = T_STRUCT; }
| 'u' /* union */
- { tp->ty_class = T_UNION; }
+ { tclass = T_UNION; }
| 'e' /* enum */
- { tp->ty_class = T_ENUM; }
+ { tclass = T_ENUM; }
]
{ AllowName = 1; }
- name(&(tp->ty_tag))
+ name(&str)
+ { sy = Lookfromscope(str2idf(str,0),CurrentScope,TAG);
+ if (sy && sy->sy_type->ty_class == tclass) {
+ tp = sy->sy_type;
+ }
+ else {
+ tp = new_type();
+ tp->ty_flags = T_CROSS;
+ tp->ty_class = tclass;
+ tp->ty_tag = str;
+ sy = NewSymbol(str, CurrentScope, TAG, (struct outname *) 0);
+ }
+ }
|
/* subrange */
/* the integer_const's represent the lower and the upper bound.
free(buf);
return 0;
}
+ if ((*ptp)->ty_class == T_POINTER) {
+ if (! get_bytes(pointer_size, *paddr, (char *) paddr)) {
+ error("could not get value");
+ free(buf);
+ return 0;
+ }
+ *paddr = get_int((char *) paddr, pointer_size, T_UNSIGNED);
+ }
if (! convert(&buf, &size, &tp, int_type, int_size)) {
free(buf);
return 0;
static int catch_sigpipe();
static int stopped();
static int uputm(), ugetm();
+static t_addr curr_stop;
int
init_run()
return 0;
}
do_items();
- if (! restoring) send_cont(1);
+ if (! restoring && ! item_addr_actions(curr_stop)) {
+ send_cont(1);
+ }
+ else if (! restoring) {
+ stopped("stopped", curr_stop);
+ handle_displays();
+ }
return 1;
}
if (s) {
fprintf(db_out, "%s ", s);
- pos = print_position((t_addr) a, 1);
+ pos = print_position(a, 1);
fputs("\n", db_out);
list_position(pos);
}
+ curr_stop = a;
return 1;
}
p_position pos;
if (a == ILL_ADDR) {
- error("could not determine address");
return;
}
pos = get_position_from_addr(a);