forked from Imagelibrary/binutils-gdb
gdb/
Support @entry in input expressions. * c-exp.y (ENTRY, unknown_cpp_name): New. (exp: UNKNOWN_CPP_NAME): Change to `exp: unknown_cpp_name'. (unknown_cpp_name: UNKNOWN_CPP_NAME, unknown_cpp_name: ENTRY) (variable: name_not_typename '@' ENTRY, name: ENTRY) (name_not_typename: ENTRY): New. (yylex): Recognize ENTRY. * eval.c (evaluate_subexp_standard): Support also OP_VAR_ENTRY_VALUE. * expprint.c (print_subexp_standard, dump_subexp_body_standard): Likewise. * parse.c (operator_length_standard): Likewise. * std-operator.def: New operator OP_VAR_ENTRY_VALUE. gdb/doc/ Support @entry in input expressions. * gdb.texinfo (Variables): Describe @entry names suffix. (Print Settings): Add anchor for `set print entry-values'. gdb/testsuite/ Support @entry in input expressions. * gdb.arch/amd64-entry-value.exp (entry: p i@entry, entry: p j@entry) (entry_stack: p s1@entry, entry_stack: p s2@entry) (entry_stack: p d9@entry, entry_stack: p da@entry, tailcall: p i@entry) (tailcall: p j@entry): New tests. * gdb.cp/koenig.cc (A::entry): New function. (main): Call it. * gdb.cp/koenig.exp (p entry (c)): New test.
This commit is contained in:
@@ -135,6 +135,16 @@ print_subexp_standard (struct expression *exp, int *pos,
|
||||
}
|
||||
return;
|
||||
|
||||
case OP_VAR_ENTRY_VALUE:
|
||||
{
|
||||
struct block *b;
|
||||
|
||||
(*pos) += 2;
|
||||
fprintf_filtered (stream, "%s@entry",
|
||||
SYMBOL_PRINT_NAME (exp->elts[pc + 1].symbol));
|
||||
}
|
||||
return;
|
||||
|
||||
case OP_LAST:
|
||||
(*pos) += 2;
|
||||
fprintf_filtered (stream, "$%d",
|
||||
@@ -853,6 +863,13 @@ dump_subexp_body_standard (struct expression *exp,
|
||||
SYMBOL_PRINT_NAME (exp->elts[elt + 1].symbol));
|
||||
elt += 3;
|
||||
break;
|
||||
case OP_VAR_ENTRY_VALUE:
|
||||
fprintf_filtered (stream, "Entry value of symbol @");
|
||||
gdb_print_host_address (exp->elts[elt].symbol, stream);
|
||||
fprintf_filtered (stream, " (%s)",
|
||||
SYMBOL_PRINT_NAME (exp->elts[elt].symbol));
|
||||
elt += 2;
|
||||
break;
|
||||
case OP_LAST:
|
||||
fprintf_filtered (stream, "History element %ld",
|
||||
(long) exp->elts[elt].longconst);
|
||||
|
||||
Reference in New Issue
Block a user