Enable (bool value,
uint32_t position)
{
- Mutex::Locker(m_mutex);
+ Mutex::Locker locker(m_mutex);
m_enabled = value;
m_enabled_position = position;
if (m_change_listener)
Add (KeyType name,
const ValueSP& entry)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
m_map[name] = entry;
if (listener)
listener->Changed();
bool
Delete (KeyType name)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.find(name);
if (iter == m_map.end())
return false;
Enable (KeyType category_name,
Position pos = Default)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
ValueSP category;
if (!Get(category_name,category))
return false;
bool
Disable (KeyType category_name)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
ValueSP category;
if (!Get(category_name,category))
return false;
Enable (ValueSP category,
Position pos = Default)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
if (category.get())
{
Position pos_w = pos;
bool
Disable (ValueSP category)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
if (category.get())
{
m_active_categories.remove_if(delete_matching_categories(category));
void
Clear ()
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
m_map.clear();
m_active_categories.clear();
if (listener)
Get (KeyType name,
ValueSP& entry)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.find(name);
if (iter == m_map.end())
return false;
Get (uint32_t pos,
ValueSP& entry)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.begin();
MapIterator end = m_map.end();
while (pos > 0)
else
entry->GetRevision() = 0;
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
m_map[name] = entry;
if (listener)
listener->Changed();
bool
Delete (KeyType name)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.find(name);
if (iter == m_map.end())
return false;
void
Clear ()
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
m_map.clear();
if (listener)
listener->Changed();
Get(KeyType name,
ValueSP& entry)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.find(name);
if (iter == m_map.end())
return false;
{
if (callback)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator pos, end = m_map.end();
for (pos = m_map.begin(); pos != end; pos++)
{
ValueSP
GetValueAtIndex (uint32_t index)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.begin();
MapIterator end = m_map.end();
while (index > 0)
KeyType
GetKeyAtIndex (uint32_t index)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator iter = m_map.begin();
MapIterator end = m_map.end();
while (index > 0)
bool
HasChildAtIndex (uint32_t idx)
{
- Mutex::Locker(m_mutex);
+ Mutex::Locker locker(m_mutex);
ChildrenIterator iter = m_children.find(idx);
ChildrenIterator end = m_children.end();
return (iter != end);
ValueObject*
GetChildAtIndex (uint32_t idx)
{
- Mutex::Locker(m_mutex);
+ Mutex::Locker locker(m_mutex);
ChildrenIterator iter = m_children.find(idx);
ChildrenIterator end = m_children.end();
if (iter == end)
SetChildAtIndex (uint32_t idx, ValueObject* valobj)
{
ChildrenPair pair(idx,valobj); // we do not need to be mutex-protected to make a pair
- Mutex::Locker(m_mutex);
+ Mutex::Locker locker(m_mutex);
m_children.insert(pair);
}
Clear()
{
m_children_count = 0;
- Mutex::Locker(m_mutex);
+ Mutex::Locker locker(m_mutex);
m_children.clear();
}
if (m_opaque_sp)
{
FileSpec file_spec (filename, true);
- TargetSP target_sp;
const bool add_dependent_modules = true;
Error error (m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
file_spec,
{
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
sb_error.SetError(process_sp->GetWatchpointSupportInfo (num));
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetNumSupportedHardwareWatchpoints () => %u",
process_sp.get(), num);
if (context.module_sp)
{
size_t num_names = m_func_names.size();
- for (int i = 0; i < num_names; i++)
+ for (int j = 0; j < num_names; j++)
{
- uint32_t num_functions = context.module_sp->FindFunctions (m_func_names[i],
+ uint32_t num_functions = context.module_sp->FindFunctions (m_func_names[j],
NULL,
m_func_name_type_mask,
include_symbols,
if (num_functions == 0 && !filter_by_cu)
{
if (m_func_name_type_mask & (eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeAuto))
- context.module_sp->FindSymbolsWithNameAndType (m_func_names[i], eSymbolTypeCode, sym_list);
+ context.module_sp->FindSymbolsWithNameAndType (m_func_names[j], eSymbolTypeCode, sym_list);
}
}
}
const size_t num_matches = FindModulesByName (target, arg_cstr, module_list, false);
if (num_matches > 0)
{
- for (size_t i=0; i<num_matches; ++i)
+ for (size_t j=0; j<num_matches; ++j)
{
- Module *module = module_list.GetModulePointerAtIndex(i);
+ Module *module = module_list.GetModulePointerAtIndex(j);
if (module)
{
if (LookupInModule (m_interpreter, module, result, syntax_error))
{
lldb::ConnectionSP connection_sp (m_connection_sp);
- Mutex::Locker (m_write_mutex);
+ Mutex::Locker locker(m_write_mutex);
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
"%p Communication::Write (src = %p, src_len = %llu) connection = %p",
this,
// offset.
//----------------------------------------------------------------------
size_t
-DataBufferMemoryMap::MemoryMapFromFileSpec (const FileSpec* file,
+DataBufferMemoryMap::MemoryMapFromFileSpec (const FileSpec* filespec,
off_t offset,
size_t length,
bool writeable)
{
- if (file != NULL)
+ if (filespec != NULL)
{
char path[PATH_MAX];
- if (file->GetPath(path, sizeof(path)))
+ if (filespec->GetPath(path, sizeof(path)))
{
uint32_t options = File::eOpenOptionRead;
if (writeable)
const char** matching_category,
TypeCategoryImpl::FormatCategoryItems* matching_type)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
MapIterator pos, end = m_map.end();
for (pos = m_map.begin(); pos != end; pos++)
CategoryMap::GetSummaryFormat (ValueObject& valobj,
lldb::DynamicValueType use_dynamic)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
uint32_t reason_why;
ActiveCategoriesIterator begin, end = m_active_categories.end();
CategoryMap::GetSyntheticChildren (ValueObject& valobj,
lldb::DynamicValueType use_dynamic)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
uint32_t reason_why;
{
if (callback)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
// loop through enabled categories in respective order
{
TypeCategoryImplSP
CategoryMap::GetAtIndex (uint32_t index)
{
- Mutex::Locker(m_map_mutex);
+ Mutex::Locker locker(m_map_mutex);
if (index < m_map.size())
{
StreamString &
StreamCallback::FindStreamForThread(lldb::tid_t cur_tid)
{
- Mutex::Locker (m_collection_mutex);
+ Mutex::Locker locker(m_collection_mutex);
collection::iterator iter = m_accumulated_data.find (cur_tid);
if (iter == m_accumulated_data.end())
{
context);
if (!user_type.GetOpaqueQualType())
- {
- lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
-
+ {
if (log)
log->Printf("ClangExpressionDeclMap::BuildCastVariable - Couldn't export the type for a constant cast result");
{
// Sort and then erase in reverse so indexes are always valid
std::sort(remove_indexes.begin(), remove_indexes.end());
- for (int i=num_remove_indexes-1; i<num_remove_indexes; ++i)
+ for (int j=num_remove_indexes-1; j<num_remove_indexes; ++j)
{
- m_current_value.Remove (i);
+ m_current_value.Remove (j);
}
}
}
{
// Sort and then erase in reverse so indexes are always valid
std::sort(remove_indexes.begin(), remove_indexes.end());
- for (int i=num_remove_indexes-1; i<num_remove_indexes; ++i)
+ for (int j=num_remove_indexes-1; j<num_remove_indexes; ++j)
{
- m_path_mappings.Remove (i, m_notify_changes);
+ m_path_mappings.Remove (j, m_notify_changes);
}
}
}
AppleObjCRuntimeV2::RunFunctionToFindClassName(addr_t object_addr, Thread *thread, char *name_dst, size_t max_name_len)
{
// Since we are going to run code we have to make sure only one thread at a time gets to try this.
- Mutex::Locker (m_get_class_name_args_mutex);
+ Mutex::Locker locker(m_get_class_name_args_mutex);
StreamString errors;
if (state != eStateStopped)
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
log->Printf("Process::Destroy() Halt failed to stop, state is: %s", StateAsCString(state));
// If we really couldn't stop the process then we should just error out here, but if the
}
else
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
log->Printf("Process::Destroy() Halt got error: %s", error.AsCString());
return error;
{
m_should_stop = true;
m_should_stop_is_valid = true;
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
+ LogSP log_process(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
- if (log)
- log->Printf ("Process::%s could not find breakpoint site id: %lld...", __FUNCTION__, m_value);
+ if (log_process)
+ log_process->Printf ("Process::%s could not find breakpoint site id: %lld...", __FUNCTION__, m_value);
}
if (log)
log->Printf ("Process::%s returning from action with m_should_stop: %d.", __FUNCTION__, m_should_stop);
}
else
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
+ LogSP log_process(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
- if (log)
- log->Printf ("Process::%s could not find watchpoint id: %lld...", __FUNCTION__, m_value);
+ if (log_process)
+ log_process->Printf ("Process::%s could not find watchpoint id: %lld...", __FUNCTION__, m_value);
}
if (log)
log->Printf ("Process::%s returning from action with m_should_stop: %d.", __FUNCTION__, m_should_stop);