diff options
-rw-r--r-- | lldb/include/lldb/Target/Process.h | 3 | ||||
-rw-r--r-- | lldb/source/API/SBListener.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/StopInfo.cpp | 3 | ||||
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachTask.cpp | 2 | ||||
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp | 4 |
7 files changed, 13 insertions, 9 deletions
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h index 531624c621d..6b84972603e 100644 --- a/lldb/include/lldb/Target/Process.h +++ b/lldb/include/lldb/Target/Process.h @@ -2980,6 +2980,7 @@ public: GetWatchpointSupportInfo (uint32_t &num) { Error error; + num = 0; error.SetErrorString ("Process::GetWatchpointSupportInfo() not supported"); return error; } @@ -2988,6 +2989,8 @@ public: GetWatchpointSupportInfo (uint32_t &num, bool& after) { Error error; + num = 0; + after = true; error.SetErrorString ("Process::GetWatchpointSupportInfo() not supported"); return error; } diff --git a/lldb/source/API/SBListener.cpp b/lldb/source/API/SBListener.cpp index cc36955cf8b..2e67b4c24e8 100644 --- a/lldb/source/API/SBListener.cpp +++ b/lldb/source/API/SBListener.cpp @@ -131,15 +131,13 @@ SBListener::StopListeningForEventClass (SBDebugger &debugger, uint32_t SBListener::StartListeningForEvents (const SBBroadcaster& broadcaster, uint32_t event_mask) { - Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); - uint32_t acquired_event_mask = 0; if (m_opaque_ptr && broadcaster.IsValid()) { acquired_event_mask = m_opaque_ptr->StartListeningForEvents (broadcaster.get(), event_mask); } - log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); + Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); if (log) { StreamString sstr_requested; diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index ab2f8173203..09b4294e240 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -1179,7 +1179,7 @@ ScanFormatDescriptor (const char* var_name_begin, log->Printf("ScanFormatDescriptor] will display value for this VO"); *val_obj_display = ValueObject::eValueObjectRepresentationStyleValue; } - delete format_name; + delete[] format_name; } if (log) log->Printf("ScanFormatDescriptor] final format description outcome: custom_format = %d, val_obj_display = %d", diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index 8405c0a9f2b..82f5b344b9a 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -985,9 +985,13 @@ FileSpec::EnumerateDirectory case eEnumerateDirectoryResultExit: // Exit from the current directory at the current level. // Exit from this directory level and tell parent to // keep enumerating. + if (buf) + free (buf); return eEnumerateDirectoryResultNext; case eEnumerateDirectoryResultQuit: // Stop directory enumerations at any level + if (buf) + free (buf); return eEnumerateDirectoryResultQuit; } } diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp index 05e59915a40..e4bcb95f274 100644 --- a/lldb/source/Target/StopInfo.cpp +++ b/lldb/source/Target/StopInfo.cpp @@ -661,7 +661,8 @@ protected: // re-enable the watchpoint if (process) { - uint32_t num; bool wp_triggers_after; + uint32_t num; + bool wp_triggers_after; if (process->GetWatchpointSupportInfo(num, wp_triggers_after).Success()) { if (!wp_triggers_after) diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.cpp b/lldb/tools/debugserver/source/MacOSX/MachTask.cpp index 00ba290e3aa..f80d4796bad 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachTask.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachTask.cpp @@ -1023,7 +1023,7 @@ MachTask::EnumerateMallocFrames (MachMallocEventId event_id, __mach_stack_logging_frames_for_uniqued_stack(m_task, event_id, &function_addresses_buffer[0], buffer_size, count); *count -= 1; - if (function_addresses_buffer[*count-1] < vm_page_size) + if (function_addresses_buffer[*count-1] < PageSize()) *count -= 1; return (*count > 0); } diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp index c28a5348b6c..17879c39970 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp @@ -206,9 +206,7 @@ MachVMMemory::GetStolenPages(task_t task) if(stolen >= mb128) { stolen = (stolen & ~((128 * 1024 * 1024ULL) - 1)); // rounding down - vm_size_t pagesize = vm_page_size; - pagesize = PageSize (task); - stolenPages = stolen/pagesize; + stolenPages = stolen / PageSize (task); } } } |