aboutsummaryrefslogtreecommitdiff
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp6
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h5
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp6
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp11
-rw-r--r--lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp18
-rw-r--r--lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp5
7 files changed, 35 insertions, 18 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index b4422a7..3c4d9a1 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -3672,6 +3672,12 @@ Status ProcessGDBRemote::LaunchAndConnectToDebugserver(
}
}
#endif
+
+ if (!FileSystem::Instance().Exists(debugserver_path))
+ return Status::FromErrorString("could not find '" DEBUGSERVER_BASENAME
+ "'. Please ensure it is properly installed "
+ "and available in your PATH");
+
debugserver_launch_info.SetExecutableFile(debugserver_path,
/*add_exe_file_as_first_arg=*/true);
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
index 7b39d29..27f5d2e 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
@@ -158,8 +158,9 @@ public:
static PyObject *LLDBSwigPython_GetChildAtIndex(PyObject *implementor,
uint32_t idx);
- static int LLDBSwigPython_GetIndexOfChildWithName(PyObject *implementor,
- const char *child_name);
+ static uint32_t
+ LLDBSwigPython_GetIndexOfChildWithName(PyObject *implementor,
+ const char *child_name);
static lldb::ValueObjectSP
LLDBSWIGPython_GetValueObjectSPFromSBValue(void *data);
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 73c5c72..d257a08 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -1939,7 +1939,7 @@ lldb::ValueObjectSP ScriptInterpreterPythonImpl::GetChildAtIndex(
return ret_val;
}
-llvm::Expected<int> ScriptInterpreterPythonImpl::GetIndexOfChildWithName(
+llvm::Expected<uint32_t> ScriptInterpreterPythonImpl::GetIndexOfChildWithName(
const StructuredData::ObjectSP &implementor_sp, const char *child_name) {
if (!implementor_sp)
return llvm::createStringError("Type has no child named '%s'", child_name);
@@ -1951,7 +1951,7 @@ llvm::Expected<int> ScriptInterpreterPythonImpl::GetIndexOfChildWithName(
if (!implementor)
return llvm::createStringError("Type has no child named '%s'", child_name);
- int ret_val = INT32_MAX;
+ uint32_t ret_val = UINT32_MAX;
{
Locker py_lock(this,
@@ -1960,7 +1960,7 @@ llvm::Expected<int> ScriptInterpreterPythonImpl::GetIndexOfChildWithName(
child_name);
}
- if (ret_val == INT32_MAX)
+ if (ret_val == UINT32_MAX)
return llvm::createStringError("Type has no child named '%s'", child_name);
return ret_val;
}
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
index dedac28..00ae59c 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
@@ -122,7 +122,7 @@ public:
GetChildAtIndex(const StructuredData::ObjectSP &implementor,
uint32_t idx) override;
- llvm::Expected<int>
+ llvm::Expected<uint32_t>
GetIndexOfChildWithName(const StructuredData::ObjectSP &implementor,
const char *child_name) override;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 82e9d86..36bc176 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1901,6 +1901,17 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
m_ast.CreateClassTemplateSpecializationDecl(
containing_decl_ctx, GetOwningClangModule(die), class_template_decl,
tag_decl_kind, template_param_infos);
+ if (!class_specialization_decl) {
+ if (log) {
+ dwarf->GetObjectFile()->GetModule()->LogMessage(
+ log,
+ "SymbolFileDWARF({0:p}) - Failed to create specialization for "
+ "clang::ClassTemplateDecl({1}, {2:p}).",
+ this, llvm::StringRef(attrs.name), class_template_decl);
+ }
+ return TypeSP();
+ }
+
clang_type =
m_ast.CreateClassTemplateSpecializationType(class_specialization_decl);
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index 3b936c0..0ccb1804 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -83,8 +83,8 @@ constexpr OptionEnumValueElement g_pdb_reader_enums[] = {
{
ePDBReaderDefault,
"default",
- "Use DIA PDB reader unless LLDB_USE_NATIVE_PDB_READER environment "
- "variable is set",
+ "Use native PDB reader unless LLDB_USE_NATIVE_PDB_READER environment "
+ "is set to 0",
},
{
ePDBReaderDIA,
@@ -109,16 +109,10 @@ enum {
static const bool g_should_use_native_reader_by_default = [] {
llvm::StringRef env_value = ::getenv("LLDB_USE_NATIVE_PDB_READER");
-#if !LLVM_ENABLE_DIA_SDK || !defined(_WIN32)
- // if the environment value is unset, the native reader is requested
- if (env_value.empty())
- return true;
-#endif
-
- return env_value.equals_insensitive("on") ||
- env_value.equals_insensitive("yes") ||
- env_value.equals_insensitive("1") ||
- env_value.equals_insensitive("true");
+ return !env_value.equals_insensitive("off") &&
+ !env_value.equals_insensitive("no") &&
+ !env_value.equals_insensitive("0") &&
+ !env_value.equals_insensitive("false");
}();
class PluginProperties : public Properties {
diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 82dfe7e..6ec054d 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -1693,6 +1693,11 @@ TypeSystemClang::CreateClassTemplateSpecializationDecl(
class_template_specialization_decl->setInstantiationOf(class_template_decl);
class_template_specialization_decl->setTemplateArgs(
TemplateArgumentList::CreateCopy(ast, args));
+ void *insert_pos = nullptr;
+ if (class_template_decl->findSpecialization(args, insert_pos))
+ return nullptr;
+ class_template_decl->AddSpecialization(class_template_specialization_decl,
+ insert_pos);
class_template_specialization_decl->setDeclName(
class_template_decl->getDeclName());