26 std::make_shared<MSVCRTCFrameRecognizer>(),
ConstString(
""),
34 if (frame_sp->GetFrameIndex() != 0)
39 static_cast<ProcessWindows *
>(frame_sp->GetThread()->GetProcess().get());
41 if (!exc_code || *exc_code != EXCEPTION_BREAKPOINT)
44 const char *fn_name = frame_sp->GetFunctionName();
47 if (!llvm::StringRef(fn_name).contains(
"failwithmessage"))
54 for (
size_t i = 0; i < vars->GetSize(); ++i) {
64 uint64_t ptr = val->GetValueAsUnsigned(0);
70 frame_sp->GetThread()->GetProcess()->ReadCStringFromMemory(ptr, msg, err);
71 if (err.
Success() && !msg.empty())
A uniqued constant string class.
lldb::RecognizedStackFrameSP RecognizeFrame(lldb::StackFrameSP frame_sp) override
Recognized stack frame for an MSVC _RTC failure.
std::optional< DWORD > GetActiveExceptionCode() const
Returns the exception code of the active (current) debug exception, or std::nullopt if there is no ac...
Target & GetTarget()
Get the target object pointer for this module.
void AddRecognizer(lldb::StackFrameRecognizerSP recognizer, ConstString module, llvm::ArrayRef< ConstString > symbols, Mangled::NamePreference symbol_mangling, bool first_instruction_only=true)
Add a new recognizer that triggers on a given symbol name.
bool Success() const
Test for success condition.
StackFrameRecognizerManager & GetFrameRecognizerManager()
A class that represents a running process on the host machine.
void RegisterMSVCRTCFrameRecognizer(ProcessWindows &process)
Registers the MSVC run-time check failure frame recognizer with the target.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::RecognizedStackFrame > RecognizedStackFrameSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::VariableList > VariableListSP
std::shared_ptr< lldb_private::Variable > VariableSP