3 ms·
The Delphi compiler used the constant expression folder to evaluate debugger expressions; it had hooks for converting symbol references into values, and for per
by barrkel 9y ago
The Delphi compiler used the constant expression folder to evaluate debugger expressions; it had hooks for converting symbol references into values, and for performing method calls, but a good chunk of the evaluation was interpreted that way. I thought it was a nifty reuse.
(Obviously, the expression is parsed, typed and bound using the compiler front end using the same symbols as the compiled code, so that bit is easy.)
- DannyBee 9y agoYeah, that works nicely if you can do it. GDB unfortunately reimplements a hacked up C/C++ frontend. (For some other languages, it doesn't have to because they have dynamic expression evaluation interfaces as part of their runtimes)