This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tests for expressions


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]