diff options
Diffstat (limited to 'tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp')
-rw-r--r-- | tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp b/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp index ef99ac9a4207..4ded517a14c6 100644 --- a/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp +++ b/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp @@ -18,15 +18,16 @@ #include "lldb/API/SBBreakpointLocation.h" // In-house headers: +#include "MICmdData.h" #include "MICmnLLDBDebugSessionInfo.h" #include "MICmnLLDBDebugger.h" -#include "MICmnResources.h" +#include "MICmnLLDBUtilSBValue.h" #include "MICmnMIResultRecord.h" #include "MICmnMIValueConst.h" #include "MICmnMIValueList.h" #include "MICmnMIValueTuple.h" -#include "MICmdData.h" -#include "MICmnLLDBUtilSBValue.h" +#include "MICmnResources.h" +#include "Platform.h" //++ ------------------------------------------------------------------------------------ // Details: CMICmnLLDBDebugSessionInfo constructor. @@ -452,7 +453,12 @@ CMICmnLLDBDebugSessionInfo::MIResponseForVariableInfoInternal(const VariableInfo { CMICmnMIValueTuple miValueTuple; lldb::SBValue value = vwrSBValueList.GetValueAtIndex(i); - const CMICmnMIValueConst miValueConst(value.GetName()); + // If one stops inside try block with, which catch clause type is unnamed + // (e.g std::exception&) then value name will be nullptr as well as value pointer + const char* name = value.GetName(); + if (name == nullptr) + continue; + const CMICmnMIValueConst miValueConst(name); const CMICmnMIValueResult miValueResultName("name", miValueConst); if (vbMarkArgs && vbIsArgs) { @@ -609,7 +615,7 @@ CMICmnLLDBDebugSessionInfo::GetFrameInfo(const lldb::SBFrame &vrFrame, lldb::add { lldb::SBFrame &rFrame = const_cast<lldb::SBFrame &>(vrFrame); - static char pBuffer[MAX_PATH]; + static char pBuffer[PATH_MAX]; const MIuint nBytes = rFrame.GetLineEntry().GetFileSpec().GetPath(&pBuffer[0], sizeof(pBuffer)); MIunused(nBytes); CMIUtilString strResolvedPath(&pBuffer[0]); |