Fixed some linux buildbot warnings.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179892 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectWatchpointCommand.cpp b/source/Commands/CommandObjectWatchpointCommand.cpp
index ac86025..0be21f1 100644
--- a/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -830,7 +830,6 @@
"A set of commands for adding, removing and examining bits of code to be executed when the watchpoint is hit (watchpoint 'commmands').",
"command <sub-command> [<sub-command-options>] <watchpoint-id>")
{
- bool status;
CommandObjectSP add_command_object (new CommandObjectWatchpointCommandAdd (interpreter));
CommandObjectSP delete_command_object (new CommandObjectWatchpointCommandDelete (interpreter));
CommandObjectSP list_command_object (new CommandObjectWatchpointCommandList (interpreter));
@@ -839,9 +838,9 @@
delete_command_object->SetCommandName ("watchpoint command delete");
list_command_object->SetCommandName ("watchpoint command list");
- status = LoadSubCommand ("add", add_command_object);
- status = LoadSubCommand ("delete", delete_command_object);
- status = LoadSubCommand ("list", list_command_object);
+ LoadSubCommand ("add", add_command_object);
+ LoadSubCommand ("delete", delete_command_object);
+ LoadSubCommand ("list", list_command_object);
}
CommandObjectWatchpointCommand::~CommandObjectWatchpointCommand ()
diff --git a/source/Core/PluginManager.cpp b/source/Core/PluginManager.cpp
index bc1af98..4498182 100644
--- a/source/Core/PluginManager.cpp
+++ b/source/Core/PluginManager.cpp
@@ -35,11 +35,15 @@
ePluginGetInstanceAtIndex
};
+
+typedef bool (*PluginInitCallback) (void);
+typedef void (*PluginTermCallback) (void);
+
struct PluginInfo
{
void *plugin_handle;
- void *plugin_init_callback;
- void *plugin_term_callback;
+ PluginInitCallback plugin_init_callback;
+ PluginTermCallback plugin_term_callback;
};
typedef std::map<FileSpec, PluginInfo> PluginTerminateMap;
@@ -111,17 +115,17 @@
if (plugin_info.plugin_handle)
{
bool success = false;
- plugin_info.plugin_init_callback = Host::DynamicLibraryGetSymbol (plugin_info.plugin_handle, "LLDBPluginInitialize", error);
+ plugin_info.plugin_init_callback = (PluginInitCallback)Host::DynamicLibraryGetSymbol (plugin_info.plugin_handle, "LLDBPluginInitialize", error);
if (plugin_info.plugin_init_callback)
{
// Call the plug-in "bool LLDBPluginInitialize(void)" function
- success = ((bool (*)(void))plugin_info.plugin_init_callback)();
+ success = plugin_info.plugin_init_callback();
}
if (success)
{
// It is ok for the "LLDBPluginTerminate" symbol to be NULL
- plugin_info.plugin_term_callback = Host::DynamicLibraryGetSymbol (plugin_info.plugin_handle, "LLDBPluginTerminate", error);
+ plugin_info.plugin_term_callback = (PluginTermCallback)Host::DynamicLibraryGetSymbol (plugin_info.plugin_handle, "LLDBPluginTerminate", error);
}
else
{
@@ -209,7 +213,7 @@
if (pos->second.plugin_handle)
{
if (pos->second.plugin_term_callback)
- ((void (*)(void))pos->second.plugin_term_callback)();
+ pos->second.plugin_term_callback();
Host::DynamicLibraryClose (pos->second.plugin_handle);
}
}
diff --git a/source/DataFormatters/CXXFormatterFunctions.cpp b/source/DataFormatters/CXXFormatterFunctions.cpp
index 4f3c6d8..f74b4de 100644
--- a/source/DataFormatters/CXXFormatterFunctions.cpp
+++ b/source/DataFormatters/CXXFormatterFunctions.cpp
@@ -576,7 +576,7 @@
if (!runtime)
return false;
- ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj.GetValueAsUnsigned(0)));
+ ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptorFromISA(valobj.GetValueAsUnsigned(0)));
if (!descriptor.get() || !descriptor->IsValid())
return false;
diff --git a/source/Expression/ClangUserExpression.cpp b/source/Expression/ClangUserExpression.cpp
index 6928d16..7357ea0 100644
--- a/source/Expression/ClangUserExpression.cpp
+++ b/source/Expression/ClangUserExpression.cpp
@@ -765,7 +765,7 @@
return eExecutionSetupError;
}
- lldb::addr_t function_stack_pointer = NULL;
+ lldb::addr_t function_stack_pointer = 0;
if (m_can_interpret)
{
diff --git a/source/Host/common/Mutex.cpp b/source/Host/common/Mutex.cpp
index fb666c5..069502b 100644
--- a/source/Host/common/Mutex.cpp
+++ b/source/Host/common/Mutex.cpp
@@ -238,8 +238,7 @@
//----------------------------------------------------------------------
Mutex::~Mutex()
{
- int err;
- err = ::pthread_mutex_destroy (&m_mutex);
+ int err = ::pthread_mutex_destroy (&m_mutex);
#if ENABLE_MUTEX_ERROR_CHECKING
if (err == 0)
error_check_mutex (&m_mutex, eMutexActionDestroyed);
diff --git a/source/Interpreter/OptionValueProperties.cpp b/source/Interpreter/OptionValueProperties.cpp
index 83068fc..0df3782 100644
--- a/source/Interpreter/OptionValueProperties.cpp
+++ b/source/Interpreter/OptionValueProperties.cpp
@@ -26,11 +26,15 @@
OptionValueProperties::OptionValueProperties (const ConstString &name) :
- m_name (name)
+ OptionValue (),
+ m_name (name),
+ m_properties (),
+ m_name_to_index ()
{
}
OptionValueProperties::OptionValueProperties (const OptionValueProperties &global_properties) :
+ OptionValue (global_properties),
m_name (global_properties.m_name),
m_properties (global_properties.m_properties),
m_name_to_index (global_properties.m_name_to_index)
diff --git a/source/Interpreter/Options.cpp b/source/Interpreter/Options.cpp
index 8318c4d..98e153c 100644
--- a/source/Interpreter/Options.cpp
+++ b/source/Interpreter/Options.cpp
@@ -522,8 +522,7 @@
std::set<int> options;
std::set<int>::const_iterator options_pos, options_end;
- bool first;
- for (i = 0, first = true; i < num_options; ++i)
+ for (i = 0; i < num_options; ++i)
{
if (opt_defs[i].usage_mask & opt_set_mask && isprint8(opt_defs[i].short_option))
{
diff --git a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 185f1dd..3f5d038 100644
--- a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -848,7 +848,7 @@
if (!Read_objc_class(process, objc_class))
return ObjCLanguageRuntime::ClassDescriptorSP();
- return m_runtime.ObjCLanguageRuntime::GetClassDescriptor(objc_class->m_superclass);
+ return m_runtime.ObjCLanguageRuntime::GetClassDescriptorFromISA(objc_class->m_superclass);
}
virtual bool
@@ -1642,7 +1642,7 @@
ObjCISA isa = process->ReadPointerFromMemory(isa_pointer, error);
if (isa != LLDB_INVALID_ADDRESS)
{
- objc_class_sp = ObjCLanguageRuntime::GetClassDescriptor (isa);
+ objc_class_sp = ObjCLanguageRuntime::GetClassDescriptorFromISA (isa);
if (isa && !objc_class_sp)
{
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
@@ -2325,7 +2325,7 @@
if (class_and_ivar.first.size() && class_and_ivar.second.size())
{
const ConstString class_name_cs(class_and_ivar.first);
- ClassDescriptorSP descriptor = ObjCLanguageRuntime::GetClassDescriptor(class_name_cs);
+ ClassDescriptorSP descriptor = ObjCLanguageRuntime::GetClassDescriptorFromClassName(class_name_cs);
if (descriptor)
{
diff --git a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
index e58552b..5a5fb46 100644
--- a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
+++ b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp
@@ -182,7 +182,7 @@
clang::ASTContext *ast_ctx = m_ast_ctx.getASTContext();
- ObjCLanguageRuntime::ClassDescriptorSP descriptor = m_runtime.GetClassDescriptor(isa);
+ ObjCLanguageRuntime::ClassDescriptorSP descriptor = m_runtime.GetClassDescriptorFromISA(isa);
if (!descriptor)
return NULL;
@@ -513,7 +513,7 @@
interface_decl->setHasExternalVisibleStorage(false);
interface_decl->setHasExternalLexicalStorage(false);
- ObjCLanguageRuntime::ClassDescriptorSP descriptor = m_runtime.GetClassDescriptor(objc_isa);
+ ObjCLanguageRuntime::ClassDescriptorSP descriptor = m_runtime.GetClassDescriptorFromISA(objc_isa);
if (!descriptor)
return false;
diff --git a/source/Symbol/Type.cpp b/source/Symbol/Type.cpp
index e886f15..1795a0d 100644
--- a/source/Symbol/Type.cpp
+++ b/source/Symbol/Type.cpp
@@ -59,6 +59,7 @@
clang_type_t clang_type,
ResolveState clang_type_resolve_state
) :
+ std::enable_shared_from_this<Type> (),
UserID (uid),
m_name (name),
m_symbol_file (symbol_file),
@@ -75,6 +76,7 @@
}
Type::Type () :
+ std::enable_shared_from_this<Type> (),
UserID (0),
m_name ("<INVALID TYPE>"),
m_symbol_file (NULL),
@@ -92,6 +94,7 @@
Type::Type (const Type &rhs) :
+ std::enable_shared_from_this<Type> (rhs),
UserID (rhs),
m_name (rhs.m_name),
m_symbol_file (rhs.m_symbol_file),
diff --git a/source/Target/ObjCLanguageRuntime.cpp b/source/Target/ObjCLanguageRuntime.cpp
index 7e66856..1aeb725 100644
--- a/source/Target/ObjCLanguageRuntime.cpp
+++ b/source/Target/ObjCLanguageRuntime.cpp
@@ -496,7 +496,7 @@
ObjCLanguageRuntime::ObjCISA
ObjCLanguageRuntime::GetParentClass(ObjCLanguageRuntime::ObjCISA isa)
{
- ClassDescriptorSP objc_class_sp (GetClassDescriptor(isa));
+ ClassDescriptorSP objc_class_sp (GetClassDescriptorFromISA(isa));
if (objc_class_sp)
{
ClassDescriptorSP objc_super_class_sp (objc_class_sp->GetSuperclass());
@@ -516,7 +516,7 @@
}
ObjCLanguageRuntime::ClassDescriptorSP
-ObjCLanguageRuntime::GetClassDescriptor (const ConstString &class_name)
+ObjCLanguageRuntime::GetClassDescriptorFromClassName (const ConstString &class_name)
{
ISAToDescriptorIterator pos = GetDescriptorIterator (class_name);
if (pos != m_isa_to_descriptor.end())
@@ -545,7 +545,7 @@
Error error;
ObjCISA isa = process->ReadPointerFromMemory(isa_pointer, error);
if (isa != LLDB_INVALID_ADDRESS)
- objc_class_sp = GetClassDescriptor (isa);
+ objc_class_sp = GetClassDescriptorFromISA (isa);
}
}
}
@@ -570,7 +570,7 @@
ObjCLanguageRuntime::ClassDescriptorSP
-ObjCLanguageRuntime::GetClassDescriptor (ObjCISA isa)
+ObjCLanguageRuntime::GetClassDescriptorFromISA (ObjCISA isa)
{
if (isa)
{
@@ -587,7 +587,7 @@
{
if (isa)
{
- ClassDescriptorSP objc_class_sp = GetClassDescriptor (isa);
+ ClassDescriptorSP objc_class_sp = GetClassDescriptorFromISA (isa);
if (objc_class_sp && objc_class_sp->IsValid())
{
if (!objc_class_sp->IsKVO())
diff --git a/source/Target/Process.cpp b/source/Target/Process.cpp
index b9abee6..149c225 100644
--- a/source/Target/Process.cpp
+++ b/source/Target/Process.cpp
@@ -4747,7 +4747,7 @@
one_thread_timeout.OffsetWithMicroSeconds(default_one_thread_timeout_usec);
else
{
- uint64_t computed_timeout = computed_timeout = timeout_usec / 2;
+ uint64_t computed_timeout = timeout_usec / 2;
if (computed_timeout > default_one_thread_timeout_usec)
computed_timeout = default_one_thread_timeout_usec;
one_thread_timeout.OffsetWithMicroSeconds(computed_timeout);
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index 8d3e19e..f07cfdd 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -296,11 +296,14 @@
{
filter_sp = GetSearchFilterForModuleList (containingModules);
}
+ if (skip_prologue == eLazyBoolCalculate)
+ skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo;
+
BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine (NULL,
file,
line_no,
check_inlines,
- skip_prologue == eLazyBoolCalculate ? GetSkipPrologue() : skip_prologue));
+ skip_prologue));
return CreateBreakpoint (filter_sp, resolver_sp, internal);
}
@@ -343,12 +346,15 @@
if (func_name)
{
SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, containingSourceFiles));
-
+
+ if (skip_prologue == eLazyBoolCalculate)
+ skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo;
+
BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL,
func_name,
func_name_type_mask,
Breakpoint::Exact,
- skip_prologue == eLazyBoolCalculate ? GetSkipPrologue() : skip_prologue));
+ skip_prologue));
bp_sp = CreateBreakpoint (filter_sp, resolver_sp, internal);
}
return bp_sp;
@@ -367,11 +373,14 @@
if (num_names > 0)
{
SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, containingSourceFiles));
-
- BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL,
+
+ if (skip_prologue == eLazyBoolCalculate)
+ skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo;
+
+ BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL,
func_names,
func_name_type_mask,
- skip_prologue == eLazyBoolCalculate ? GetSkipPrologue() : skip_prologue));
+ skip_prologue));
bp_sp = CreateBreakpoint (filter_sp, resolver_sp, internal);
}
return bp_sp;
@@ -391,11 +400,14 @@
{
SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, containingSourceFiles));
- BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL,
+ if (skip_prologue == eLazyBoolCalculate)
+ skip_prologue = GetSkipPrologue() ? eLazyBoolYes : eLazyBoolNo;
+
+ BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL,
func_names,
num_names,
func_name_type_mask,
- skip_prologue == eLazyBoolCalculate ? GetSkipPrologue() : skip_prologue));
+ skip_prologue));
bp_sp = CreateBreakpoint (filter_sp, resolver_sp, internal);
}
return bp_sp;