class EvalContextImpl
Defined at line 38 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.h
An implementation of EvalContext that integrates with the DWARF symbol system. It will provide
the values of variables currently in scope.
This object is reference counted since it requires asynchronous operations in some cases. This
means it can outlive the scope in which it was invoked (say if the thread was resumed or the
process was killed).
Generally the creator of this context will be something representing that context in the running
program like a stack frame. This frame should call DisownContext() when it is destroyed to ensure
that evaluation does not use any invalid context.
Public Methods
const std::shared_ptr<Abi> & GetAbi ()
Defined at line 48 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.h
const PrettyTypeManager & GetPrettyTypeManager ()
Defined at line 59 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.h
VectorRegisterFormat GetVectorRegisterFormat ()
Defined at line 60 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.h
bool ShouldPromoteToDerived ()
Defined at line 63 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.h
ExprLanguage GetLanguage ()
EvalContext implementation.
NOTE: Some of these implementations return constant values because the expression library
doesn't have enough context to know what they should be. The ClientEvalContextImpl hooks
some things up to the debugger settings system.
Defined at line 81 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
void FindName (const FindNameOptions & options, const ParsedIdentifier & looking_for, std::vector<FoundName> * results)
Defined at line 83 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
FindNameContext GetFindNameContext ()
Defined at line 88 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
void GetNamedValue (const ParsedIdentifier & name, EvalCallback cb)
Defined at line 97 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
void GetVariableValue (fxl::RefPtr<Value> variable, EvalCallback cb)
Defined at line 150 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
const BuiltinFuncCallback * GetBuiltinFunction (const ParsedIdentifier & name)
Defined at line 199 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
const ProcessSymbols * GetProcessSymbols ()
Defined at line 205 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
fxl::RefPtr<SymbolDataProvider> GetDataProvider ()
Defined at line 211 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
Location GetLocationForAddress (uint64_t address)
Defined at line 213 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
Protected Methods
void EvalContextImpl (std::shared_ptr<Abi> abi, fxl::WeakPtr<const ProcessSymbols> process_symbols, fxl::RefPtr<SymbolDataProvider> data_provider, ExprLanguage language, fxl::RefPtr<CodeBlock> code_block)
All of the input pointers can be null:
- The ProcessSymbols can be a null weak pointer in which case globals will not be resolved.
This can make testing easier and supports evaluating math without a loaded program.
- The SymbolDataProvider can be null in which case anything that requires memory from the
target will fail. Some operations like pure math don't require this.
- The code block can be null in which case nothing using the current scope will work. This
includes local variables, variables on "this", and things relative to the current namespace.
The variant that takes a location will extract the code block from the location if possible.
Defined at line 41 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
void EvalContextImpl (std::shared_ptr<Abi> abi, fxl::WeakPtr<const ProcessSymbols> process_symbols, fxl::RefPtr<SymbolDataProvider> data_provider, const Location & location, std::optional<ExprLanguage> force_language)
Defined at line 52 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
void ~EvalContextImpl ()
Defined at line 79 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.cc
void set_language (ExprLanguage lang)
Defined at line 89 of file ../../src/developer/debug/zxdb/expr/eval_context_impl.h
Friends
class MakeRefCountedHelper
class RefCountedThreadSafe