[Lldb-commits] [lldb] r137257 - in /lldb/trunk: source/API/SBFrame.cpp tools/driver/Driver.cpp tools/driver/IOChannel.cpp
Johnny Chen
johnny.chen at apple.com
Wed Aug 10 15:06:24 PDT 2011
Author: johnny
Date: Wed Aug 10 17:06:24 2011
New Revision: 137257
URL: http://llvm.org/viewvc/llvm-project?rev=137257&view=rev
Log:
Incremental fixes of issues found by Xcode static analyzer.
Modified:
lldb/trunk/source/API/SBFrame.cpp
lldb/trunk/tools/driver/Driver.cpp
lldb/trunk/tools/driver/IOChannel.cpp
Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=137257&r1=137256&r2=137257&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Wed Aug 10 17:06:24 2011
@@ -739,6 +739,7 @@
LogSP expr_log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
+ ExecutionResults exe_results;
SBValue expr_result;
if (log)
log->Printf ("SBFrame(%p)::EvaluateExpression (expr=\"%s\")...", m_opaque_sp.get(), expr);
@@ -754,7 +755,6 @@
Host::SetCrashDescriptionWithFormat ("SBFrame::EvaluateExpression (expr = \"%s\", fetch_dynamic_value = %u) %s",
expr, fetch_dynamic_value, frame_description.GetString().c_str());
- ExecutionResults exe_results;
const bool unwind_on_error = true;
const bool keep_in_memory = false;
@@ -772,9 +772,10 @@
expr_result.GetSummary());
if (log)
- log->Printf ("SBFrame(%p)::EvaluateExpression (expr=\"%s\") => SBValue(%p)", m_opaque_sp.get(),
+ log->Printf ("SBFrame(%p)::EvaluateExpression (expr=\"%s\") => SBValue(%p) (execution result=%d)", m_opaque_sp.get(),
expr,
- expr_result.get());
+ expr_result.get(),
+ exe_results);
return expr_result;
}
Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=137257&r1=137256&r2=137257&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Wed Aug 10 17:06:24 2011
@@ -554,8 +554,7 @@
else if (file.ResolveExecutableLocation())
{
char path[PATH_MAX];
- int path_len;
- file.GetPath (path, path_len);
+ file.GetPath (path, sizeof(path));
m_option_data.m_args.push_back (path);
}
else
@@ -584,8 +583,7 @@
else if (file.ResolveExecutableLocation())
{
char final_path[PATH_MAX];
- size_t path_len;
- file.GetPath (final_path, path_len);
+ file.GetPath (final_path, sizeof(final_path));
std::string path_str (final_path);
m_option_data.m_source_command_files.push_back (path_str);
}
@@ -1225,7 +1223,6 @@
done = true;
if (event_type & IOChannel::eBroadcastBitThreadDidExit)
iochannel_thread_exited = true;
- break;
}
else
done = HandleIOEvent (event);
Modified: lldb/trunk/tools/driver/IOChannel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/IOChannel.cpp?rev=137257&r1=137256&r2=137257&view=diff
==============================================================================
--- lldb/trunk/tools/driver/IOChannel.cpp (original)
+++ lldb/trunk/tools/driver/IOChannel.cpp Wed Aug 10 17:06:24 2011
@@ -411,7 +411,7 @@
else if (event_type & Driver::eBroadcastBitThreadShouldExit)
{
done = true;
- break;
+ continue;
}
}
else if (event.BroadcasterMatchesRef (interpreter_broadcaster))
@@ -437,7 +437,7 @@
if (event_type & IOChannel::eBroadcastBitThreadShouldExit)
{
done = true;
- break;
+ continue;
}
}
}
More information about the lldb-commits
mailing list