Tests for expressions

Joel Brobecker brobecker@adacore.com
Sun Nov 4 17:35:00 GMT 2007


> I was wondering if anyone knew of a test in the test suite which tests
> GDB's evaluation of expressions. I am trying to understand all of the
> cases for the switch statement in the switch statement in
> evaluate_subexp_standard in ./gdb/eval.c and thought that looking at
> how the testsuite uses them would be a good place to start.

Any "print" command will use the expression evaluation routine.
I find it harder to understand the evaluation routine without having
a look at expression.h (for the expression "tree"), and the associated
parsing routine. See c-exp.y, that shows how the expression tree is
built, will show you what data is where in each node depending on the
node kind.

-- 
Joel



More information about the Gdb mailing list