[Lldb-commits] [PATCH] D102624: [lldb] Optimize expressions
Vedant Kumar via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon May 17 08:53:23 PDT 2021
vsk added inline comments.
================
Comment at: lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp:409
+ // static MyClass *__lldb_expr_result_ptr = &c; // Points to stack.
+ // __lldb_expr_result_ptr(__lldb_expr_result_ptr);
+ // } // End of expression function.
----------------
Why is it safe for lldb to take the address of "c"? After evaluation completes, is the state of the stack preserved?
================
Comment at: lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp:409
+ // static MyClass *__lldb_expr_result_ptr = &c; // Points to stack.
+ // __lldb_expr_result_ptr(__lldb_expr_result_ptr);
+ // } // End of expression function.
----------------
vsk wrote:
> Why is it safe for lldb to take the address of "c"? After evaluation completes, is the state of the stack preserved?
Would marking `__lldb_expr_result_ptr` volatile make the call to `__lldb_use_expr_result` redundant?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102624/new/
https://reviews.llvm.org/D102624
More information about the lldb-commits
mailing list