"expression" for gcc compiled code

While "variable list" works when debugging my gcc compiled program, I'm not having much luck using "expression". No matter what expression I try, as soon as I refer to any variables, I get something like:

error: couldn't evaluate DWARF expression: DW_OP_APPLE_extern(0) opcode encountered with no decl map.

Simple stuff like "expr 1+1" works, though.

Is evaluating expressions in gcc (as opposed to llvm-gcc or clang), compiled code fundamentally broken, or is this likely to be a simple problem that would be reasonably easy for me to trace down (I'm getting somewhat comfortable running lldb under gdb by now :wink: ?

Matthias

Matthias,

thanks for testing the expression code!

At this point, the expression parser is too rudimentary to have (interesting) compiler-specific bugs :slight_smile: We're retooling it to use LLVM IR and the JIT as opposed to the current, AST-based mechanism which handles C/C++ constructs and types on a case-by-case basis. This will make it much more general. Once that functionality gets in, I would welcome any problem reports you can provide.

So in summary, it's not a simple problem, and evaluating expressions in general is fundamentally broken in various ways. But we're working on it.

Sean