Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Tests for expressions
@ 2007-11-04 17:30 Rob Quill
  2007-11-04 17:35 ` Joel Brobecker
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Quill @ 2007-11-04 17:30 UTC (permalink / raw)
  To: gdb

Hi,

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.

Thanks for your help.

Rob Quill


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tests for expressions
  2007-11-04 17:30 Tests for expressions Rob Quill
@ 2007-11-04 17:35 ` Joel Brobecker
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Brobecker @ 2007-11-04 17:35 UTC (permalink / raw)
  To: Rob Quill; +Cc: gdb

> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-04 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-04 17:30 Tests for expressions Rob Quill
2007-11-04 17:35 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox