[Lldb-commits] [lldb] r166275 - in /lldb/branches/windows: ./ examples/python/ include/lldb/ include/lldb/API/ include/lldb/Core/ include/lldb/Expression/ include/lldb/Host/ include/lldb/Interpreter/ include/lldb/Symbol/ include/lldb/Target/ lldb.xcodeproj/ scripts/ scripts/Python/ scripts/Python/interface/ source/API/ source/Commands/ source/Core/ source/Expression/ source/Host/common/ source/Interpreter/ source/Plugins/ABI/MacOSX-arm/ source/Plugins/ABI/MacOSX-i386/ source/Plugins/ABI/SysV-x86_64/ source/Plugins/Dyna...
Carlo Kok
ck at remobjects.com
Fri Oct 19 02:07:46 PDT 2012
Author: carlokok
Date: Fri Oct 19 04:07:45 2012
New Revision: 166275
URL: http://llvm.org/viewvc/llvm-project?rev=166275&view=rev
Log:
Merge of lldb/trunk into Windows branch so it compiles with latest llvm/clang.
Added:
lldb/branches/windows/include/lldb/API/SBExpressionOptions.h
- copied unchanged from r166271, lldb/trunk/include/lldb/API/SBExpressionOptions.h
lldb/branches/windows/scripts/Python/interface/SBExpressionOptions.i
- copied unchanged from r166271, lldb/trunk/scripts/Python/interface/SBExpressionOptions.i
lldb/branches/windows/source/API/SBExpressionOptions.cpp
- copied unchanged from r166271, lldb/trunk/source/API/SBExpressionOptions.cpp
lldb/branches/windows/test/expression_command/timeout/
- copied from r166271, lldb/trunk/test/expression_command/timeout/
lldb/branches/windows/test/lang/cpp/bool/
- copied from r166271, lldb/trunk/test/lang/cpp/bool/
Modified:
lldb/branches/windows/ (props changed)
lldb/branches/windows/examples/python/operating_system.py
lldb/branches/windows/include/lldb/API/SBCommandReturnObject.h
lldb/branches/windows/include/lldb/API/SBDefines.h
lldb/branches/windows/include/lldb/API/SBFrame.h
lldb/branches/windows/include/lldb/API/SBValue.h
lldb/branches/windows/include/lldb/Core/FormatNavigator.h
lldb/branches/windows/include/lldb/Core/Stream.h
lldb/branches/windows/include/lldb/Core/ValueObject.h
lldb/branches/windows/include/lldb/Expression/ClangFunction.h
lldb/branches/windows/include/lldb/Expression/ClangUserExpression.h
lldb/branches/windows/include/lldb/Host/FileSpec.h
lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreter.h
lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterNone.h
lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterPython.h
lldb/branches/windows/include/lldb/Symbol/ClangASTContext.h
lldb/branches/windows/include/lldb/Target/ABI.h
lldb/branches/windows/include/lldb/Target/Process.h
lldb/branches/windows/include/lldb/Target/Target.h
lldb/branches/windows/include/lldb/Target/TargetList.h
lldb/branches/windows/include/lldb/Target/Thread.h
lldb/branches/windows/include/lldb/lldb-forward.h
lldb/branches/windows/lldb.xcodeproj/project.pbxproj
lldb/branches/windows/scripts/Python/build-swig-Python.sh
lldb/branches/windows/scripts/Python/interface/SBCommandReturnObject.i
lldb/branches/windows/scripts/Python/interface/SBFrame.i
lldb/branches/windows/scripts/Python/interface/SBValue.i
lldb/branches/windows/scripts/lldb.swig
lldb/branches/windows/source/API/CMakeLists.txt
lldb/branches/windows/source/API/SBCommandReturnObject.cpp
lldb/branches/windows/source/API/SBDebugger.cpp
lldb/branches/windows/source/API/SBFrame.cpp
lldb/branches/windows/source/API/SBValue.cpp
lldb/branches/windows/source/Commands/CommandObjectCommands.cpp
lldb/branches/windows/source/Commands/CommandObjectExpression.cpp
lldb/branches/windows/source/Commands/CommandObjectExpression.h
lldb/branches/windows/source/Commands/CommandObjectPlatform.cpp
lldb/branches/windows/source/Commands/CommandObjectProcess.cpp
lldb/branches/windows/source/Commands/CommandObjectTarget.cpp
lldb/branches/windows/source/Commands/CommandObjectThread.cpp
lldb/branches/windows/source/Commands/CommandObjectWatchpoint.cpp
lldb/branches/windows/source/Core/CXXFormatterFunctions.cpp
lldb/branches/windows/source/Core/Debugger.cpp
lldb/branches/windows/source/Core/Module.cpp
lldb/branches/windows/source/Core/ValueObject.cpp
lldb/branches/windows/source/Core/ValueObjectDynamicValue.cpp
lldb/branches/windows/source/Core/Windows.cpp
lldb/branches/windows/source/Expression/ClangExpressionParser.cpp
lldb/branches/windows/source/Expression/ClangFunction.cpp
lldb/branches/windows/source/Expression/ClangUserExpression.cpp
lldb/branches/windows/source/Host/common/FileSpec.cpp
lldb/branches/windows/source/Host/common/Host.cpp
lldb/branches/windows/source/Interpreter/CommandInterpreter.cpp
lldb/branches/windows/source/Interpreter/ScriptInterpreterNone.cpp
lldb/branches/windows/source/Interpreter/ScriptInterpreterPython.cpp
lldb/branches/windows/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
lldb/branches/windows/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
lldb/branches/windows/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h
lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
lldb/branches/windows/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/branches/windows/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/branches/windows/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/branches/windows/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/branches/windows/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.cpp
lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.h
lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
lldb/branches/windows/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
lldb/branches/windows/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
lldb/branches/windows/source/Plugins/Process/Utility/ThreadMemory.cpp
lldb/branches/windows/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/branches/windows/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
lldb/branches/windows/source/Plugins/Process/mach-core/ThreadMachCore.cpp
lldb/branches/windows/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h
lldb/branches/windows/source/Symbol/ClangASTContext.cpp
lldb/branches/windows/source/Target/Process.cpp
lldb/branches/windows/source/Target/Target.cpp
lldb/branches/windows/source/Target/TargetList.cpp
lldb/branches/windows/source/Target/Thread.cpp
lldb/branches/windows/test/expression_command/test/TestExprs.py
lldb/branches/windows/test/functionalities/command_script/welcome.py
lldb/branches/windows/test/lang/cpp/dynamic-value/pass-to-base.cpp
lldb/branches/windows/test/lldbtest.py
lldb/branches/windows/tools/driver/DriverEvents.cpp
lldb/branches/windows/tools/driver/IOChannel.cpp
lldb/branches/windows/www/build.html
lldb/branches/windows/www/lldb-gdb.html
Propchange: lldb/branches/windows/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 19 04:07:45 2012
@@ -1,2 +1,2 @@
/lldb/branches/apple/python-GIL:156467-162159
-/lldb/trunk:163223-165938
+/lldb/trunk:163223-166271
Modified: lldb/branches/windows/examples/python/operating_system.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/examples/python/operating_system.py?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/examples/python/operating_system.py (original)
+++ lldb/branches/windows/examples/python/operating_system.py Fri Oct 19 04:07:45 2012
@@ -3,7 +3,7 @@
import lldb
import struct
-class PlugIn(object):
+class OperatingSystemPlugIn(object):
"""Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class"""
def __init__(self, process):
Modified: lldb/branches/windows/include/lldb/API/SBCommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/API/SBCommandReturnObject.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/API/SBCommandReturnObject.h (original)
+++ lldb/branches/windows/include/lldb/API/SBCommandReturnObject.h Fri Oct 19 04:07:45 2012
@@ -92,6 +92,12 @@
size_t
Printf(const char* format, ...) LLDB_ATTR(__attribute__ ((format (printf, 2, 3))));
+ const char *
+ GetOutput (bool only_if_no_immediate);
+
+ const char *
+ GetError (bool only_if_no_immediate);
+
protected:
friend class SBCommandInterpreter;
friend class SBOptions;
Modified: lldb/branches/windows/include/lldb/API/SBDefines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/API/SBDefines.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/API/SBDefines.h (original)
+++ lldb/branches/windows/include/lldb/API/SBDefines.h Fri Oct 19 04:07:45 2012
@@ -41,6 +41,7 @@
class SBError;
class SBEvent;
class SBEventList;
+class SBExpressionOptions;
class SBFileSpec;
class SBFileSpecList;
class SBFrame;
Modified: lldb/branches/windows/include/lldb/API/SBFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/API/SBFrame.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/API/SBFrame.h (original)
+++ lldb/branches/windows/include/lldb/API/SBFrame.h Fri Oct 19 04:07:45 2012
@@ -105,6 +105,9 @@
lldb::SBValue
EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic, bool unwind_on_error);
+
+ lldb::SBValue
+ EvaluateExpression (const char *expr, const SBExpressionOptions &options);
/// Gets the lexical block that defines the stack frame. Another way to think
/// of this is it will return the block that contains all of the variables
Modified: lldb/branches/windows/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/API/SBValue.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/API/SBValue.h (original)
+++ lldb/branches/windows/include/lldb/API/SBValue.h Fri Oct 19 04:07:45 2012
@@ -137,6 +137,9 @@
CreateValueFromExpression (const char *name, const char* expression);
lldb::SBValue
+ CreateValueFromExpression (const char *name, const char* expression, SBExpressionOptions &options);
+
+ lldb::SBValue
CreateValueFromAddress (const char* name,
lldb::addr_t address,
lldb::SBType type);
Modified: lldb/branches/windows/include/lldb/Core/FormatNavigator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Core/FormatNavigator.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Core/FormatNavigator.h (original)
+++ lldb/branches/windows/include/lldb/Core/FormatNavigator.h Fri Oct 19 04:07:45 2012
@@ -476,18 +476,18 @@
sstring.Printf("%s:%d",typeName.AsCString(),valobj.GetBitfieldBitSize());
ConstString bitfieldname = ConstString(sstring.GetData());
if (log)
- log->Printf("appended bitfield info, final result is %s", bitfieldname.GetCString());
+ log->Printf("[Get_BitfieldMatch] appended bitfield info, final result is %s", bitfieldname.GetCString());
if (Get(bitfieldname, entry))
{
if (log)
- log->Printf("bitfield direct match found, returning");
+ log->Printf("[Get_BitfieldMatch] bitfield direct match found, returning");
return true;
}
else
{
reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField;
if (log)
- log->Printf("no bitfield direct match");
+ log->Printf("[Get_BitfieldMatch] no bitfield direct match");
return false;
}
}
@@ -501,27 +501,27 @@
if (runtime == NULL)
{
if (log)
- log->Printf("no valid ObjC runtime, skipping dynamic");
+ log->Printf("[Get_ObjC] no valid ObjC runtime, skipping dynamic");
return false;
}
ObjCLanguageRuntime::ClassDescriptorSP objc_class_sp (runtime->GetClassDescriptor(valobj));
if (!objc_class_sp)
{
if (log)
- log->Printf("invalid ISA, skipping dynamic");
+ log->Printf("[Get_ObjC] invalid ISA, skipping dynamic");
return false;
}
ConstString name (objc_class_sp->GetClassName());
if (log)
- log->Printf("dynamic type inferred is %s - looking for direct dynamic match", name.GetCString());
+ log->Printf("[Get_ObjC] dynamic type inferred is %s - looking for direct dynamic match", name.GetCString());
if (Get(name, entry))
{
if (log)
- log->Printf("direct dynamic match found, returning");
+ log->Printf("[Get_ObjC] direct dynamic match found, returning");
return true;
}
if (log)
- log->Printf("no dynamic match");
+ log->Printf("[Get_ObjC] no dynamic match");
return false;
}
@@ -535,7 +535,7 @@
if (type.isNull())
{
if (log)
- log->Printf("type is NULL, returning");
+ log->Printf("[Get] type is NULL, returning");
return false;
}
@@ -544,7 +544,7 @@
if (!typePtr)
{
if (log)
- log->Printf("type is NULL, returning");
+ log->Printf("[Get] type is NULL, returning");
return false;
}
ConstString typeName(ClangASTType::GetTypeNameForQualType(valobj.GetClangAST(), type).c_str());
@@ -556,7 +556,7 @@
}
if (log)
- log->Printf("trying to get %s for VO name %s of type %s",
+ log->Printf("[Get] trying to get %s for VO name %s of type %s",
m_name.c_str(),
valobj.GetName().AsCString(),
typeName.AsCString());
@@ -564,17 +564,17 @@
if (Get(typeName, entry))
{
if (log)
- log->Printf("direct match found, returning");
+ log->Printf("[Get] direct match found, returning");
return true;
}
if (log)
- log->Printf("no direct match");
+ log->Printf("[Get] no direct match");
// strip pointers and references and see if that helps
if (typePtr->isReferenceType())
{
if (log)
- log->Printf("stripping reference");
+ log->Printf("[Get] stripping reference");
if (Get(valobj,type.getNonReferenceType(),entry, use_dynamic, reason) && !entry->SkipsReferences())
{
reason |= lldb_private::eFormatterChoiceCriterionStrippedPointerReference;
@@ -584,7 +584,7 @@
else if (typePtr->isPointerType())
{
if (log)
- log->Printf("stripping pointer");
+ log->Printf("[Get] stripping pointer");
clang::QualType pointee = typePtr->getPointeeType();
if (Get(valobj, pointee, entry, use_dynamic, reason) && !entry->SkipsPointers())
{
@@ -604,7 +604,7 @@
if (use_dynamic != lldb::eNoDynamicValues)
{
if (log)
- log->Printf("allowed to figure out dynamic ObjC type");
+ log->Printf("[Get] allowed to figure out dynamic ObjC type");
if (Get_ObjC(valobj,entry))
{
reason |= lldb_private::eFormatterChoiceCriterionDynamicObjCDiscovery;
@@ -612,7 +612,7 @@
}
}
if (log)
- log->Printf("dynamic disabled or failed - stripping ObjC pointer");
+ log->Printf("[Get] dynamic disabled or failed - stripping ObjC pointer");
clang::QualType pointee = typePtr->getPointeeType();
if (Get(valobj, pointee, entry, use_dynamic, reason) && !entry->SkipsPointers())
{
@@ -626,7 +626,7 @@
if (type_tdef)
{
if (log)
- log->Printf("stripping typedef");
+ log->Printf("[Get] stripping typedef");
if ((Get(valobj, type_tdef->getDecl()->getUnderlyingType(), entry, use_dynamic, reason)) && entry->Cascades())
{
reason |= lldb_private::eFormatterChoiceCriterionNavigatedTypedefs;
Modified: lldb/branches/windows/include/lldb/Core/Stream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Core/Stream.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Core/Stream.h (original)
+++ lldb/branches/windows/include/lldb/Core/Stream.h Fri Oct 19 04:07:45 2012
@@ -179,12 +179,15 @@
int
PutPointer (void *ptr);
+ // Append \a src_len bytes from \a src to the stream as hex characters
+ // (two ascii characters per byte of input data)
int
PutBytesAsRawHex8 (const void *src,
size_t src_len,
lldb::ByteOrder src_byte_order = lldb::eByteOrderInvalid,
lldb::ByteOrder dst_byte_order = lldb::eByteOrderInvalid);
+ // Append \a src_len bytes from \a s to the stream as binary data.
int
PutRawBytes (const void *s,
size_t src_len,
Modified: lldb/branches/windows/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Core/ValueObject.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Core/ValueObject.h (original)
+++ lldb/branches/windows/include/lldb/Core/ValueObject.h Fri Oct 19 04:07:45 2012
@@ -1265,6 +1265,9 @@
DataExtractor &
GetDataExtractor ();
+ void
+ ResetCompleteTypeInfo ();
+
//------------------------------------------------------------------
// Sublasses must implement the functions below.
//------------------------------------------------------------------
Modified: lldb/branches/windows/include/lldb/Expression/ClangFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Expression/ClangFunction.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Expression/ClangFunction.h (original)
+++ lldb/branches/windows/include/lldb/Expression/ClangFunction.h Fri Oct 19 04:07:45 2012
@@ -251,9 +251,10 @@
/// function call, and return the program state to what it was before the
/// execution. If false, we leave the program in the stopped state.
///
- /// @param[in] single_thread_timeout_usec
- /// If stop_others is true, the length of time to wait before
- /// concluding that the system is deadlocked.
+ /// @param[in] timeout_usec
+ /// Timeout value (0 for no timeout). If try_all_threads is true, then we
+ /// will try on one thread for the lesser of .25 sec and half the total timeout.
+ /// then switch to running all threads, otherwise this will be the total timeout.
///
/// @param[in] errors
/// The stream to write errors to.
@@ -272,7 +273,7 @@
bool stop_others,
bool try_all_threads,
bool discard_on_error,
- uint32_t single_thread_timeout_usec,
+ uint32_t timeout_usec,
Stream &errors,
lldb::addr_t* this_arg = 0);
@@ -329,7 +330,7 @@
//------------------------------------------------------------------
/// Run the function this ClangFunction was created with.
///
- /// This simple version will run the function on one thread. If \a single_thread_timeout_usec
+ /// This simple version will run the function on one thread. If \a timeout_usec
/// is not zero, we time out after that timeout. If \a try_all_threads is true, then we will
/// resume with all threads on, otherwise we halt the process, and eExecutionInterrupted will be returned.
///
@@ -339,8 +340,10 @@
/// @param[in] errors
/// Errors will be written here if there are any.
///
- /// @param[in] single_thread_timeout_usec
- /// If \b true, run only this thread, if \b false let all threads run.
+ /// @param[in] timeout_usec
+ /// Timeout value (0 for no timeout). If try_all_threads is true, then we
+ /// will try on one thread for the lesser of .25 sec and half the total timeout.
+ /// then switch to running all threads, otherwise this will be the total timeout.
///
/// @param[in] try_all_threads
/// If \b true, run only this thread, if \b false let all threads run.
@@ -379,8 +382,11 @@
/// @param[in] stop_others
/// If \b true, run only this thread, if \b false let all threads run.
///
- /// @param[in] single_thread_timeout_usec
- /// If \b true, run only this thread, if \b false let all threads run.
+ /// @param[in] timeout_usec
+ /// Timeout value (0 for no timeout). If try_all_threads is true, then we
+ /// will try on one thread for the lesser of .25 sec and half the total timeout.
+ /// then switch to running all threads, otherwise this will be the total timeout.
+ ///
///
/// @param[in] try_all_threads
/// If \b true, run only this thread, if \b false let all threads run.
@@ -396,7 +402,7 @@
lldb::addr_t *args_addr_ptr,
Stream &errors,
bool stop_others,
- uint32_t single_thread_timeout_usec,
+ uint32_t timeout_usec,
bool try_all_threads,
bool discard_on_error,
Value &results);
Modified: lldb/branches/windows/include/lldb/Expression/ClangUserExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Expression/ClangUserExpression.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Expression/ClangUserExpression.h (original)
+++ lldb/branches/windows/include/lldb/Expression/ClangUserExpression.h Fri Oct 19 04:07:45 2012
@@ -132,9 +132,16 @@
/// A pointer to direct at the persistent variable in which the
/// expression's result is stored.
///
- /// @param[in] single_thread_timeout_usec
- /// The amount of time (in usec) that we are willing to wait for this
- /// expression to complete, before assuming that we are blocked and giving up
+ /// @param[in] try_all_threads
+ /// If true, then we will try to run all threads if the function doesn't complete on
+ /// one thread. See timeout_usec for the interaction of this variable and
+ /// the timeout.
+ ///
+ /// @param[in] timeout_usec
+ /// Timeout value (0 for no timeout). If try_all_threads is true, then we
+ /// will try on one thread for the lesser of .25 sec and half the total timeout.
+ /// then switch to running all threads, otherwise this will be the total timeout.
+ ///
///
/// @return
/// A Process::Execution results value.
@@ -145,7 +152,8 @@
bool discard_on_error,
ClangUserExpressionSP &shared_ptr_to_me,
lldb::ClangExpressionVariableSP &result,
- uint32_t single_thread_timeout_usec = 500000);
+ bool try_all_threads = true,
+ uint32_t timeout_usec = 500000);
ThreadPlan *
GetThreadPlanToExecuteJITExpression (Stream &error_stream,
@@ -314,9 +322,15 @@
/// @param[in/out] result_valobj_sp
/// If execution is successful, the result valobj is placed here.
///
- /// @param[in] single_thread_timeout_usec
- /// The amount of time (in usec) that we are willing to wait for this
- /// expression to complete, before assuming that we are blocked and giving up
+ /// @param[in] try_all_threads
+ /// If true, then we will try to run all threads if the function doesn't complete on
+ /// one thread. See timeout_usec for the interaction of this variable and
+ /// the timeout.
+ ///
+ /// @param[in] timeout_usec
+ /// Timeout value (0 for no timeout). If try_all_threads is true, then we
+ /// will try on one thread for the lesser of .25 sec and half the total timeout.
+ /// then switch to running all threads, otherwise this will be the total timeout.
///
/// @result
/// A Process::ExecutionResults value. eExecutionCompleted for success.
@@ -330,7 +344,8 @@
const char *expr_cstr,
const char *expr_prefix,
lldb::ValueObjectSP &result_valobj_sp,
- uint32_t single_thread_timeout_usec = 500000);
+ bool try_all_threads = true,
+ uint32_t timeout_usec = 500000);
static ExecutionResults
EvaluateWithError (ExecutionContext &exe_ctx,
@@ -342,7 +357,8 @@
const char *expr_prefix,
lldb::ValueObjectSP &result_valobj_sp,
Error &error,
- uint32_t single_thread_timeout_usec = 500000);
+ bool try_all_threads = true,
+ uint32_t timeout_usec = 500000);
static const Error::ValueType kNoResult = 0x1001; ///< ValueObject::GetError() returns this if there is no result from the expression.
private:
Modified: lldb/branches/windows/include/lldb/Host/FileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Host/FileSpec.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Host/FileSpec.h (original)
+++ lldb/branches/windows/include/lldb/Host/FileSpec.h Fri Oct 19 04:07:45 2012
@@ -342,6 +342,17 @@
bool
IsSourceImplementationFile () const;
+ //------------------------------------------------------------------
+ /// Returns true if the filespec represents path that is relative
+ /// path to the current working directory.
+ ///
+ /// @return
+ /// \b true if the filespec represents a current working
+ /// directory relative path, \b false otherwise.
+ //------------------------------------------------------------------
+ bool
+ IsRelativeToCurrentWorkingDirectory () const;
+
TimeValue
GetModificationTime () const;
Modified: lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreter.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreter.h (original)
+++ lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreter.h Fri Oct 19 04:07:45 2012
@@ -127,19 +127,28 @@
virtual ~ScriptInterpreter ();
virtual bool
- ExecuteOneLine (const char *command, CommandReturnObject *result, bool enable_io) = 0;
+ ExecuteOneLine (const char *command,
+ CommandReturnObject *result,
+ bool enable_io,
+ bool set_lldb_globals = true) = 0;
virtual void
ExecuteInterpreterLoop () = 0;
virtual bool
- ExecuteOneLineWithReturn (const char *in_string, ScriptReturnType return_type, void *ret_value, bool enable_io)
+ ExecuteOneLineWithReturn (const char *in_string,
+ ScriptReturnType return_type,
+ void *ret_value,
+ bool enable_io,
+ bool set_lldb_globals = true)
{
return true;
}
virtual bool
- ExecuteMultipleLines (const char *in_string, bool enable_io)
+ ExecuteMultipleLines (const char *in_string,
+ bool enable_io,
+ bool set_lldb_globals = true)
{
return true;
}
@@ -308,6 +317,7 @@
virtual bool
LoadScriptingModule (const char* filename,
bool can_reload,
+ bool init_session,
lldb_private::Error& error)
{
error.SetErrorString("loading unimplemented");
Modified: lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterNone.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterNone.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterNone.h (original)
+++ lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterNone.h Fri Oct 19 04:07:45 2012
@@ -23,7 +23,7 @@
~ScriptInterpreterNone ();
bool
- ExecuteOneLine (const char *command, CommandReturnObject *result, bool enable_io);
+ ExecuteOneLine (const char *command, CommandReturnObject *result, bool enable_io, bool set_lldb_globals = true);
void
ExecuteInterpreterLoop ();
Modified: lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterPython.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterPython.h (original)
+++ lldb/branches/windows/include/lldb/Interpreter/ScriptInterpreterPython.h Fri Oct 19 04:07:45 2012
@@ -39,7 +39,10 @@
~ScriptInterpreterPython ();
bool
- ExecuteOneLine (const char *command, CommandReturnObject *result, bool enable_io);
+ ExecuteOneLine (const char *command,
+ CommandReturnObject *result,
+ bool enable_io,
+ bool set_lldb_globals = true);
void
ExecuteInterpreterLoop ();
@@ -48,10 +51,13 @@
ExecuteOneLineWithReturn (const char *in_string,
ScriptInterpreter::ScriptReturnType return_type,
void *ret_value,
- bool enable_io);
+ bool enable_io,
+ bool set_lldb_globals = true);
bool
- ExecuteMultipleLines (const char *in_string, bool enable_io);
+ ExecuteMultipleLines (const char *in_string,
+ bool enable_io,
+ bool set_lldb_globals = true);
bool
ExportFunctionDefinitionToInterpreter (StringList &function_def);
@@ -155,6 +161,7 @@
virtual bool
LoadScriptingModule (const char* filename,
bool can_reload,
+ bool init_session,
lldb_private::Error& error);
virtual lldb::ScriptInterpreterObjectSP
Modified: lldb/branches/windows/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Symbol/ClangASTContext.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/branches/windows/include/lldb/Symbol/ClangASTContext.h Fri Oct 19 04:07:45 2012
@@ -977,7 +977,7 @@
std::auto_ptr<clang::SourceManager> m_source_manager_ap;
std::auto_ptr<clang::DiagnosticsEngine> m_diagnostics_engine_ap;
std::auto_ptr<clang::DiagnosticConsumer> m_diagnostic_consumer_ap;
- std::auto_ptr<clang::TargetOptions> m_target_options_ap;
+ llvm::IntrusiveRefCntPtr<clang::TargetOptions> m_target_options_rp;
std::auto_ptr<clang::TargetInfo> m_target_info_ap;
std::auto_ptr<clang::IdentifierTable> m_identifier_table_ap;
std::auto_ptr<clang::SelectorTable> m_selector_table_ap;
Modified: lldb/branches/windows/include/lldb/Target/ABI.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Target/ABI.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Target/ABI.h (original)
+++ lldb/branches/windows/include/lldb/Target/ABI.h Fri Oct 19 04:07:45 2012
@@ -46,7 +46,6 @@
GetArgumentValues (Thread &thread,
ValueList &values) const = 0;
-public:
lldb::ValueObjectSP
GetReturnValueObject (Thread &thread,
ClangASTType &type,
@@ -72,12 +71,22 @@
virtual bool
RegisterIsVolatile (const RegisterInfo *reg_info) = 0;
+ // Should return true if your ABI uses frames when doing stack backtraces. This
+ // means a frame pointer is used that points to the previous stack frame in some
+ // way or another.
virtual bool
StackUsesFrames () = 0;
+ // Should take a look at a call frame address (CFA) which is just the stack
+ // pointer value upon entry to a function. ABIs usually impose alignment
+ // restrictions (4, 8 or 16 byte aligned), and zero is usually not allowed.
+ // This function should return true if "cfa" is valid call frame address for
+ // the ABI, and false otherwise. This is used by the generic stack frame unwinding
+ // code to help determine when a stack ends.
virtual bool
CallFrameAddressIsValid (lldb::addr_t cfa) = 0;
+ // Validates a possible PC value and returns true if an opcode can be at "pc".
virtual bool
CodeAddressIsValid (lldb::addr_t pc) = 0;
@@ -93,7 +102,15 @@
virtual const RegisterInfo *
GetRegisterInfoArray (uint32_t &count) = 0;
-
+ // Some architectures (e.g. x86) will push the return address on the stack and decrement
+ // the stack pointer when making a function call. This means that every stack frame will
+ // have a unique CFA.
+ // Other architectures (e.g. arm) pass the return address in a register so it is possible
+ // to have a frame on a backtrace that does not push anything on the stack or change the
+ // CFA.
+ virtual bool
+ FunctionCallsChangeCFA () = 0;
+
bool
GetRegisterInfoByName (const ConstString &name, RegisterInfo &info);
Modified: lldb/branches/windows/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Target/Process.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Target/Process.h (original)
+++ lldb/branches/windows/include/lldb/Target/Process.h Fri Oct 19 04:07:45 2012
@@ -71,6 +71,12 @@
void
SetExtraStartupCommands (const Args &args);
+
+ FileSpec
+ GetPythonOSPluginPath () const;
+
+ void
+ SetPythonOSPluginPath (const FileSpec &file);
};
typedef STD_SHARED_PTR(ProcessProperties) ProcessPropertiesSP;
@@ -246,15 +252,28 @@
return m_arguments;
}
+ const char *
+ GetArg0 () const
+ {
+ if (m_arg0.empty())
+ return NULL;
+ return m_arg0.c_str();
+ }
+
+ void
+ SetArg0 (const char *arg)
+ {
+ if (arg && arg[0])
+ m_arg0.clear();
+ else
+ m_arg0 = arg;
+ }
+
void
- SetArguments (const Args& args,
- bool first_arg_is_executable,
- bool first_arg_is_executable_and_argument);
+ SetArguments (const Args& args, bool first_arg_is_executable);
void
- SetArguments (char const **argv,
- bool first_arg_is_executable,
- bool first_arg_is_executable_and_argument);
+ SetArguments (char const **argv, bool first_arg_is_executable);
Args &
GetEnvironmentEntries ()
@@ -270,7 +289,11 @@
protected:
FileSpec m_executable;
- Args m_arguments;
+ std::string m_arg0; // argv[0] if supported. If empty, then use m_executable.
+ // Not all process plug-ins support specifying an argv[0]
+ // that differs from the resolved platform executable
+ // (which is in m_executable)
+ Args m_arguments; // All program arguments except argv[0]
Args m_environment;
uint32_t m_uid;
uint32_t m_gid;
@@ -2369,9 +2392,9 @@
RunThreadPlan (ExecutionContext &exe_ctx,
lldb::ThreadPlanSP &thread_plan_sp,
bool stop_others,
- bool try_all_threads,
+ bool run_others,
bool discard_on_error,
- uint32_t single_thread_timeout_usec,
+ uint32_t timeout_usec,
Stream &errors);
static const char *
Modified: lldb/branches/windows/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Target/Target.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Target/Target.h (original)
+++ lldb/branches/windows/include/lldb/Target/Target.h Fri Oct 19 04:07:45 2012
@@ -83,6 +83,12 @@
InlineStrategy
GetInlineStrategy () const;
+ const char *
+ GetArg0 () const;
+
+ void
+ SetArg0 (const char *arg);
+
bool
GetRunArguments (Args &args) const;
@@ -133,10 +139,131 @@
const char *
GetExpressionPrefixContentsAsCString ();
+
+ bool
+ GetDisableKextLoading () const;
+
+ void
+ SetDisableKextLoading (bool b);
};
typedef STD_SHARED_PTR(TargetProperties) TargetPropertiesSP;
+class EvaluateExpressionOptions
+{
+public:
+ static const uint32_t default_timeout = 500000;
+ EvaluateExpressionOptions() :
+ m_execution_policy(eExecutionPolicyOnlyWhenNeeded),
+ m_coerce_to_id(false),
+ m_unwind_on_error(true),
+ m_keep_in_memory(false),
+ m_run_others(true),
+ m_use_dynamic(lldb::eNoDynamicValues),
+ m_timeout_usec(default_timeout)
+ {}
+
+ ExecutionPolicy
+ GetExecutionPolicy () const
+ {
+ return m_execution_policy;
+ }
+
+ EvaluateExpressionOptions&
+ SetExecutionPolicy (ExecutionPolicy policy = eExecutionPolicyAlways)
+ {
+ m_execution_policy = policy;
+ return *this;
+ }
+
+ bool
+ DoesCoerceToId () const
+ {
+ return m_coerce_to_id;
+ }
+
+ EvaluateExpressionOptions&
+ SetCoerceToId (bool coerce = true)
+ {
+ m_coerce_to_id = coerce;
+ return *this;
+ }
+
+ bool
+ DoesUnwindOnError () const
+ {
+ return m_unwind_on_error;
+ }
+
+ EvaluateExpressionOptions&
+ SetUnwindOnError (bool unwind = false)
+ {
+ m_unwind_on_error = unwind;
+ return *this;
+ }
+
+ bool
+ DoesKeepInMemory () const
+ {
+ return m_keep_in_memory;
+ }
+
+ EvaluateExpressionOptions&
+ SetKeepInMemory (bool keep = true)
+ {
+ m_keep_in_memory = keep;
+ return *this;
+ }
+
+ lldb::DynamicValueType
+ GetUseDynamic () const
+ {
+ return m_use_dynamic;
+ }
+
+ EvaluateExpressionOptions&
+ SetUseDynamic (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget)
+ {
+ m_use_dynamic = dynamic;
+ return *this;
+ }
+
+ uint32_t
+ GetTimeoutUsec () const
+ {
+ return m_timeout_usec;
+ }
+
+ EvaluateExpressionOptions&
+ SetTimeoutUsec (uint32_t timeout = 0)
+ {
+ m_timeout_usec = timeout;
+ return *this;
+ }
+
+ bool
+ GetRunOthers () const
+ {
+ return m_run_others;
+ }
+
+ EvaluateExpressionOptions&
+ SetRunOthers (bool run_others = true)
+ {
+ m_run_others = run_others;
+ return *this;
+ }
+
+private:
+ ExecutionPolicy m_execution_policy;
+ bool m_coerce_to_id;
+ bool m_unwind_on_error;
+ bool m_keep_in_memory;
+ bool m_run_others;
+ lldb::DynamicValueType m_use_dynamic;
+ uint32_t m_timeout_usec;
+};
+
//----------------------------------------------------------------------
// Target
//----------------------------------------------------------------------
@@ -760,104 +887,6 @@
ClangASTImporter *
GetClangASTImporter();
- class EvaluateExpressionOptions
- {
- public:
- EvaluateExpressionOptions() :
- m_execution_policy(eExecutionPolicyOnlyWhenNeeded),
- m_coerce_to_id(false),
- m_unwind_on_error(true),
- m_keep_in_memory(false),
- m_use_dynamic(lldb::eNoDynamicValues),
- m_single_thread_timeout_usec(500000)
- {}
-
- ExecutionPolicy
- GetExecutionPolicy () const
- {
- return m_execution_policy;
- }
-
- EvaluateExpressionOptions&
- SetExecutionPolicy (ExecutionPolicy policy = eExecutionPolicyAlways)
- {
- m_execution_policy = policy;
- return *this;
- }
-
- bool
- DoesCoerceToId () const
- {
- return m_coerce_to_id;
- }
-
- EvaluateExpressionOptions&
- SetCoerceToId (bool coerce = true)
- {
- m_coerce_to_id = coerce;
- return *this;
- }
-
- bool
- DoesUnwindOnError () const
- {
- return m_unwind_on_error;
- }
-
- EvaluateExpressionOptions&
- SetUnwindOnError (bool unwind = false)
- {
- m_unwind_on_error = unwind;
- return *this;
- }
-
- bool
- DoesKeepInMemory () const
- {
- return m_keep_in_memory;
- }
-
- EvaluateExpressionOptions&
- SetKeepInMemory (bool keep = true)
- {
- m_keep_in_memory = keep;
- return *this;
- }
-
- lldb::DynamicValueType
- GetUseDynamic () const
- {
- return m_use_dynamic;
- }
-
- EvaluateExpressionOptions&
- SetUseDynamic (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget)
- {
- m_use_dynamic = dynamic;
- return *this;
- }
-
- uint32_t
- GetSingleThreadTimeoutUsec () const
- {
- return m_single_thread_timeout_usec;
- }
-
- EvaluateExpressionOptions&
- SetSingleThreadTimeoutUsec (uint32_t timeout = 0)
- {
- m_single_thread_timeout_usec = timeout;
- return *this;
- }
-
- private:
- ExecutionPolicy m_execution_policy;
- bool m_coerce_to_id;
- bool m_unwind_on_error;
- bool m_keep_in_memory;
- lldb::DynamicValueType m_use_dynamic;
- uint32_t m_single_thread_timeout_usec;
- };
// Since expressions results can persist beyond the lifetime of a process,
// and the const expression results are available after a process is gone,
Modified: lldb/branches/windows/include/lldb/Target/TargetList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Target/TargetList.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Target/TargetList.h (original)
+++ lldb/branches/windows/include/lldb/Target/TargetList.h Fri Oct 19 04:07:45 2012
@@ -98,7 +98,7 @@
//------------------------------------------------------------------
Error
CreateTarget (Debugger &debugger,
- const FileSpec& file_spec,
+ const char *user_exe_path,
const char *triple_cstr,
bool get_dependent_modules,
const OptionGroupPlatform *platform_options,
@@ -112,7 +112,7 @@
//------------------------------------------------------------------
Error
CreateTarget (Debugger &debugger,
- const FileSpec& file_spec,
+ const char *user_exe_path,
const ArchSpec& arch,
bool get_dependent_modules,
lldb::PlatformSP &platform_sp,
Modified: lldb/branches/windows/include/lldb/Target/Thread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/Target/Thread.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/Target/Thread.h (original)
+++ lldb/branches/windows/include/lldb/Target/Thread.h Fri Oct 19 04:07:45 2012
@@ -858,6 +858,10 @@
virtual lldb_private::Unwind *
GetUnwinder ();
+ // Check to see whether the thread is still at the last breakpoint hit that stopped it.
+ virtual const bool
+ IsStillAtLastBreakpointHit();
+
lldb::StackFrameListSP
GetStackFrameList ();
Modified: lldb/branches/windows/include/lldb/lldb-forward.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/include/lldb/lldb-forward.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/include/lldb/lldb-forward.h (original)
+++ lldb/branches/windows/include/lldb/lldb-forward.h Fri Oct 19 04:07:45 2012
@@ -98,6 +98,7 @@
class DynamicLoader;
class EmulateInstruction;
class Error;
+class EvaluateExpressionOptions;
class Event;
class EventData;
class ExecutionContext;
Modified: lldb/branches/windows/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/lldb.xcodeproj/project.pbxproj?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/branches/windows/lldb.xcodeproj/project.pbxproj Fri Oct 19 04:07:45 2012
@@ -505,6 +505,8 @@
4CCA645613B40B82003BDF98 /* AppleObjCTrampolineHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA644813B40B82003BDF98 /* AppleObjCTrampolineHandler.cpp */; };
4CCA645813B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA644A13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp */; };
4CD0BD0F134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD0BD0E134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp */; };
+ 4CE4F673162C971A00F75CB3 /* SBExpressionOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 4CE4F675162C973F00F75CB3 /* SBExpressionOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */; };
4CF3D80C15AF4DC800845BF3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDB919B414F6F10D008FF64B /* Security.framework */; };
4CF52AF51428291E0051E832 /* SBFileSpecList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CF52AF41428291E0051E832 /* SBFileSpecList.h */; settings = {ATTRIBUTES = (Public, ); }; };
4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */; };
@@ -1492,6 +1494,9 @@
4CCA644B13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleThreadPlanStepThroughObjCTrampoline.h; sourceTree = "<group>"; };
4CD0BD0C134BFAB600CB44D4 /* ValueObjectDynamicValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectDynamicValue.h; path = include/lldb/Core/ValueObjectDynamicValue.h; sourceTree = "<group>"; };
4CD0BD0E134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectDynamicValue.cpp; path = source/Core/ValueObjectDynamicValue.cpp; sourceTree = "<group>"; };
+ 4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBExpressionOptions.h; path = include/lldb/API/SBExpressionOptions.h; sourceTree = "<group>"; };
+ 4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBExpressionOptions.cpp; path = source/API/SBExpressionOptions.cpp; sourceTree = "<group>"; };
+ 4CE4F676162CE1E100F75CB3 /* SBExpressionOptions.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBExpressionOptions.i; sourceTree = "<group>"; };
4CEDAED311754F5E00E875A6 /* ThreadPlanStepUntil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepUntil.h; path = include/lldb/Target/ThreadPlanStepUntil.h; sourceTree = "<group>"; };
4CF52AF41428291E0051E832 /* SBFileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFileSpecList.h; path = include/lldb/API/SBFileSpecList.h; sourceTree = "<group>"; };
4CF52AF7142829390051E832 /* SBFileSpecList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFileSpecList.cpp; path = source/API/SBFileSpecList.cpp; sourceTree = "<group>"; };
@@ -2028,6 +2033,7 @@
2611FEFC142D83060017FEA3 /* SBFileSpec.i */,
2611FEFD142D83060017FEA3 /* SBFileSpecList.i */,
2611FEFE142D83060017FEA3 /* SBFrame.i */,
+ 4CE4F676162CE1E100F75CB3 /* SBExpressionOptions.i */,
2611FEFF142D83060017FEA3 /* SBFunction.i */,
2611FF00142D83060017FEA3 /* SBHostOS.i */,
2611FF01142D83060017FEA3 /* SBInputReader.i */,
@@ -2118,6 +2124,8 @@
2682F284115EF3A700CCFF99 /* SBError.cpp */,
9A9830FE1125FC5800A56CB0 /* SBEvent.h */,
9A9830FD1125FC5800A56CB0 /* SBEvent.cpp */,
+ 4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */,
+ 4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */,
26022531115F27FA00A601A2 /* SBFileSpec.h */,
26022532115F281400A601A2 /* SBFileSpec.cpp */,
4CF52AF41428291E0051E832 /* SBFileSpecList.h */,
@@ -3381,6 +3389,7 @@
B2A58722143119810092BFBA /* SBWatchpoint.h in Headers */,
26D265A2136B40EE002EEE45 /* SharingPtr.h in Headers */,
26D265BC136B4269002EEE45 /* lldb-public.h in Headers */,
+ 4CE4F673162C971A00F75CB3 /* SBExpressionOptions.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3773,6 +3782,7 @@
9475C18814E5E9FA001BFC6D /* SBTypeCategory.cpp in Sources */,
9475C18E14E5F834001BFC6D /* SBTypeNameSpecifier.cpp in Sources */,
9452573A16262D0200325455 /* SBDeclaration.cpp in Sources */,
+ 4CE4F675162C973F00F75CB3 /* SBExpressionOptions.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -4308,7 +4318,7 @@
"-flimit-debug-info",
"-Wparentheses",
);
- SDKROOT = "";
+ SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = debugging;
VALID_ARCHS = "armv4t armv5 armv6 armv7 armv7s i386 ppc ppc64 ppc7400 ppc970 x86_64";
@@ -4367,7 +4377,7 @@
"-flimit-debug-info",
"-Wparentheses",
);
- SDKROOT = "";
+ SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = debugging;
VALID_ARCHS = "armv4t armv5 armv6 armv7 armv7s i386 ppc ppc64 ppc7400 ppc970 x86_64";
@@ -5215,7 +5225,7 @@
"-flimit-debug-info",
"-Wparentheses",
);
- SDKROOT = "";
+ SDKROOT = macosx;
STRIP_INSTALLED_PRODUCT = NO;
STRIP_STYLE = debugging;
VALID_ARCHS = "armv4t armv5 armv6 armv7 armv7s i386 ppc ppc64 ppc7400 ppc970 x86_64";
Modified: lldb/branches/windows/scripts/Python/build-swig-Python.sh
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/scripts/Python/build-swig-Python.sh?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/scripts/Python/build-swig-Python.sh (original)
+++ lldb/branches/windows/scripts/Python/build-swig-Python.sh Fri Oct 19 04:07:45 2012
@@ -76,6 +76,7 @@
" ${SRC_ROOT}/include/lldb/API/SBDebugger.h"\
" ${SRC_ROOT}/include/lldb/API/SBError.h"\
" ${SRC_ROOT}/include/lldb/API/SBEvent.h"\
+" ${SRC_ROOT}/include/lldb/API/SBExpressionOptions.h"\
" ${SRC_ROOT}/include/lldb/API/SBFileSpec.h"\
" ${SRC_ROOT}/include/lldb/API/SBFrame.h"\
" ${SRC_ROOT}/include/lldb/API/SBFunction.h"\
@@ -120,6 +121,7 @@
" ${SRC_ROOT}/scripts/Python/interface/SBDeclaration.i"\
" ${SRC_ROOT}/scripts/Python/interface/SBError.i"\
" ${SRC_ROOT}/scripts/Python/interface/SBEvent.i"\
+" ${SRC_ROOT}/scripts/Python/interface/SBExpressionOptions.i"\
" ${SRC_ROOT}/scripts/Python/interface/SBFileSpec.i"\
" ${SRC_ROOT}/scripts/Python/interface/SBFrame.i"\
" ${SRC_ROOT}/scripts/Python/interface/SBFunction.i"\
Modified: lldb/branches/windows/scripts/Python/interface/SBCommandReturnObject.i
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/scripts/Python/interface/SBCommandReturnObject.i?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/scripts/Python/interface/SBCommandReturnObject.i (original)
+++ lldb/branches/windows/scripts/Python/interface/SBCommandReturnObject.i Fri Oct 19 04:07:45 2012
@@ -36,14 +36,20 @@
GetError ();
size_t
- PutOutput (FILE *fh);
-
- size_t
GetOutputSize ();
size_t
GetErrorSize ();
+ const char *
+ GetOutput (bool only_if_no_immediate);
+
+ const char *
+ GetError (bool if_no_immediate);
+
+ size_t
+ PutOutput (FILE *fh);
+
size_t
PutError (FILE *fh);
Modified: lldb/branches/windows/scripts/Python/interface/SBFrame.i
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/scripts/Python/interface/SBFrame.i?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/scripts/Python/interface/SBFrame.i (original)
+++ lldb/branches/windows/scripts/Python/interface/SBFrame.i Fri Oct 19 04:07:45 2012
@@ -139,6 +139,9 @@
lldb::SBValue
EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic, bool unwind_on_error);
+
+ lldb::SBValue
+ EvaluateExpression (const char *expr, SBExpressionOptions &options);
%feature("docstring", "
/// Gets the lexical block that defines the stack frame. Another way to think
Modified: lldb/branches/windows/scripts/Python/interface/SBValue.i
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/scripts/Python/interface/SBValue.i?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/scripts/Python/interface/SBValue.i (original)
+++ lldb/branches/windows/scripts/Python/interface/SBValue.i Fri Oct 19 04:07:45 2012
@@ -222,6 +222,9 @@
lldb::SBValue
CreateValueFromExpression (const char *name, const char* expression);
+
+ lldb::SBValue
+ CreateValueFromExpression (const char *name, const char* expression, SBExpressionOptions &options);
lldb::SBValue
CreateValueFromAddress(const char* name, lldb::addr_t address, lldb::SBType type);
Modified: lldb/branches/windows/scripts/lldb.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/scripts/lldb.swig?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/scripts/lldb.swig (original)
+++ lldb/branches/windows/scripts/lldb.swig Fri Oct 19 04:07:45 2012
@@ -66,6 +66,7 @@
#include "lldb/API/SBDeclaration.h"
#include "lldb/API/SBError.h"
#include "lldb/API/SBEvent.h"
+#include "lldb/API/SBExpressionOptions.h"
#include "lldb/API/SBFileSpec.h"
#include "lldb/API/SBFileSpecList.h"
#include "lldb/API/SBFrame.h"
@@ -125,6 +126,7 @@
%include "./Python/interface/SBDeclaration.i"
%include "./Python/interface/SBError.i"
%include "./Python/interface/SBEvent.i"
+%include "./Python/interface/SBExpressionOptions.i"
%include "./Python/interface/SBFileSpec.i"
%include "./Python/interface/SBFileSpecList.i"
%include "./Python/interface/SBFrame.i"
Modified: lldb/branches/windows/source/API/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/API/CMakeLists.txt?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/API/CMakeLists.txt (original)
+++ lldb/branches/windows/source/API/CMakeLists.txt Fri Oct 19 04:07:45 2012
@@ -15,6 +15,7 @@
SBDeclaration.cpp
SBError.cpp
SBEvent.cpp
+ SBExpressionOptions.cpp
SBFileSpec.cpp
SBFileSpecList.cpp
SBFrame.cpp
Modified: lldb/branches/windows/source/API/SBCommandReturnObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/API/SBCommandReturnObject.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/API/SBCommandReturnObject.cpp (original)
+++ lldb/branches/windows/source/API/SBCommandReturnObject.cpp Fri Oct 19 04:07:45 2012
@@ -268,7 +268,7 @@
if (m_opaque_ap.get())
m_opaque_ap->SetImmediateOutputFile (fh);
}
-
+
void
SBCommandReturnObject::SetImmediateErrorFile (FILE *fh)
{
@@ -285,6 +285,26 @@
}
}
+const char *
+SBCommandReturnObject::GetOutput (bool only_if_no_immediate)
+{
+ if (!m_opaque_ap.get())
+ return NULL;
+ if (only_if_no_immediate == false || m_opaque_ap->GetImmediateOutputStream().get() == NULL)
+ return GetOutput();
+ return NULL;
+}
+
+const char *
+SBCommandReturnObject::GetError (bool only_if_no_immediate)
+{
+ if (!m_opaque_ap.get())
+ return NULL;
+ if (only_if_no_immediate == false || m_opaque_ap->GetImmediateErrorStream().get() == NULL)
+ return GetError();
+ return NULL;
+}
+
size_t
SBCommandReturnObject::Printf(const char* format, ...)
{
Modified: lldb/branches/windows/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/API/SBDebugger.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/API/SBDebugger.cpp (original)
+++ lldb/branches/windows/source/API/SBDebugger.cpp Fri Oct 19 04:07:45 2012
@@ -511,12 +511,11 @@
if (m_opaque_sp)
{
sb_error.Clear();
- FileSpec filename_spec (filename, true);
OptionGroupPlatform platform_options (false);
platform_options.SetPlatformName (platform_name);
sb_error.ref() = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
- filename_spec,
+ filename,
target_triple,
add_dependent_modules,
&platform_options,
@@ -554,10 +553,9 @@
TargetSP target_sp;
if (m_opaque_sp)
{
- FileSpec file_spec (filename, true);
const bool add_dependent_modules = true;
Error error (m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
- file_spec,
+ filename,
target_triple,
add_dependent_modules,
NULL,
@@ -584,12 +582,11 @@
TargetSP target_sp;
if (m_opaque_sp)
{
- FileSpec file (filename, true);
Error error;
const bool add_dependent_modules = true;
- error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
- file,
+ error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
+ filename,
arch_cstr,
add_dependent_modules,
NULL,
@@ -618,14 +615,13 @@
TargetSP target_sp;
if (m_opaque_sp)
{
- FileSpec file (filename, true);
ArchSpec arch = Target::GetDefaultArchitecture ();
Error error;
const bool add_dependent_modules = true;
PlatformSP platform_sp(m_opaque_sp->GetPlatformList().GetSelectedPlatform());
error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp,
- file,
+ filename,
arch,
add_dependent_modules,
platform_sp,
Modified: lldb/branches/windows/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/API/SBFrame.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/API/SBFrame.cpp (original)
+++ lldb/branches/windows/source/API/SBFrame.cpp Fri Oct 19 04:07:45 2012
@@ -40,6 +40,7 @@
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBValue.h"
#include "lldb/API/SBAddress.h"
+#include "lldb/API/SBExpressionOptions.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBSymbolContext.h"
#include "lldb/API/SBThread.h"
@@ -1040,8 +1041,11 @@
Target *target = exe_ctx.GetTargetPtr();
if (frame && target)
{
- lldb::DynamicValueType use_dynamic = frame->CalculateTarget()->GetPreferDynamicValue();
- result = EvaluateExpression (expr, use_dynamic);
+ SBExpressionOptions options;
+ lldb::DynamicValueType fetch_dynamic_value = frame->CalculateTarget()->GetPreferDynamicValue();
+ options.SetFetchDynamicValue (fetch_dynamic_value);
+ options.SetUnwindOnError (true);
+ return EvaluateExpression (expr, options);
}
return result;
}
@@ -1049,12 +1053,24 @@
SBValue
SBFrame::EvaluateExpression (const char *expr, lldb::DynamicValueType fetch_dynamic_value)
{
- return EvaluateExpression (expr, fetch_dynamic_value, true);
+ SBExpressionOptions options;
+ options.SetFetchDynamicValue (fetch_dynamic_value);
+ options.SetUnwindOnError (true);
+ return EvaluateExpression (expr, options);
}
SBValue
SBFrame::EvaluateExpression (const char *expr, lldb::DynamicValueType fetch_dynamic_value, bool unwind_on_error)
{
+ SBExpressionOptions options;
+ options.SetFetchDynamicValue (fetch_dynamic_value);
+ options.SetUnwindOnError (unwind_on_error);
+ return EvaluateExpression (expr, options);
+}
+
+lldb::SBValue
+SBFrame::EvaluateExpression (const char *expr, const SBExpressionOptions &options)
+{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
LogSP expr_log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
@@ -1080,16 +1096,12 @@
StreamString frame_description;
frame->DumpUsingSettingsFormat (&frame_description);
Host::SetCrashDescriptionWithFormat ("SBFrame::EvaluateExpression (expr = \"%s\", fetch_dynamic_value = %u) %s",
- expr, fetch_dynamic_value, frame_description.GetString().c_str());
+ expr, options.GetFetchDynamicValue(), frame_description.GetString().c_str());
#endif
- Target::EvaluateExpressionOptions options;
- options.SetUnwindOnError(unwind_on_error)
- .SetUseDynamic(fetch_dynamic_value);
-
exe_results = target->EvaluateExpression (expr,
frame,
expr_value_sp,
- options);
+ options.ref());
expr_result.SetSP(expr_value_sp);
#ifdef LLDB_CONFIGURATION_DEBUG
Host::SetCrashDescription (NULL);
Modified: lldb/branches/windows/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/API/SBValue.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/API/SBValue.cpp (original)
+++ lldb/branches/windows/source/API/SBValue.cpp Fri Oct 19 04:07:45 2012
@@ -40,11 +40,12 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
+#include "lldb/API/SBDebugger.h"
+#include "lldb/API/SBExpressionOptions.h"
+#include "lldb/API/SBFrame.h"
#include "lldb/API/SBProcess.h"
#include "lldb/API/SBTarget.h"
#include "lldb/API/SBThread.h"
-#include "lldb/API/SBFrame.h"
-#include "lldb/API/SBDebugger.h"
using namespace lldb;
using namespace lldb_private;
@@ -694,9 +695,12 @@
if (log)
{
if (new_value_sp)
- log->Printf ("SBValue(%p)::CreateChildAtOffset => \"%s\"", value_sp.get(), new_value_sp->GetName().AsCString());
+ log->Printf ("SBValue(%p)::CreateChildAtOffset => \"%s\"",
+ value_sp.get(),
+ new_value_sp->GetName().AsCString());
else
- log->Printf ("SBValue(%p)::CreateChildAtOffset => NULL", value_sp.get());
+ log->Printf ("SBValue(%p)::CreateChildAtOffset => NULL",
+ value_sp.get());
}
return sb_value;
}
@@ -715,6 +719,14 @@
lldb::SBValue
SBValue::CreateValueFromExpression (const char *name, const char* expression)
{
+ SBExpressionOptions options;
+ options.ref().SetKeepInMemory(true);
+ return CreateValueFromExpression (name, expression, options);
+}
+
+lldb::SBValue
+SBValue::CreateValueFromExpression (const char *name, const char *expression, SBExpressionOptions &options)
+{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
lldb::SBValue sb_value;
lldb::ValueObjectSP value_sp(GetSP());
@@ -734,12 +746,11 @@
Target* target = exe_ctx.GetTargetPtr();
if (target)
{
- Target::EvaluateExpressionOptions options;
- options.SetKeepInMemory(true);
+ options.ref().SetKeepInMemory(true);
target->EvaluateExpression (expression,
exe_ctx.GetFramePtr(),
new_value_sp,
- options);
+ options.ref());
if (new_value_sp)
{
new_value_sp->SetName(ConstString(name));
@@ -1617,7 +1628,9 @@
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBValue(%p)::GetAddress () => (%s,%llu)", value_sp.get(), (addr.GetSection() ? addr.GetSection()->GetName().GetCString() : "NULL"), addr.GetOffset());
+ log->Printf ("SBValue(%p)::GetAddress () => (%s,%llu)", value_sp.get(),
+ (addr.GetSection() ? addr.GetSection()->GetName().GetCString() : "NULL"),
+ addr.GetOffset());
return SBAddress(new Address(addr));
}
Modified: lldb/branches/windows/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Commands/CommandObjectCommands.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/branches/windows/source/Commands/CommandObjectCommands.cpp Fri Oct 19 04:07:45 2012
@@ -1394,8 +1394,10 @@
std::string path = command.GetArgumentAtIndex(0);
Error error;
+ const bool init_session = true;
if (m_interpreter.GetScriptInterpreter()->LoadScriptingModule(path.c_str(),
m_options.m_allow_reload,
+ init_session,
error))
{
result.SetStatus (eReturnStatusSuccessFinishNoResult);
Modified: lldb/branches/windows/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Commands/CommandObjectExpression.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/branches/windows/source/Commands/CommandObjectExpression.cpp Fri Oct 19 04:07:45 2012
@@ -50,7 +50,9 @@
OptionDefinition
CommandObjectExpression::CommandOptions::g_option_table[] =
{
+ { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "all-threads", 'a', required_argument, NULL, 0, eArgTypeBoolean, "Should we run all threads if the execution doesn't complete on one thread."},
{ LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "dynamic-value", 'd', required_argument, NULL, 0, eArgTypeBoolean, "Upcast the value resulting from the expression to its dynamic type if available."},
+ { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "timeout", 't', required_argument, NULL, 0, eArgTypeUnsignedInteger, "Timeout value for running the expression."},
{ LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "unwind-on-error", 'u', required_argument, NULL, 0, eArgTypeBoolean, "Clean up program state if the expression causes a crash, breakpoint hit or signal."},
{ LLDB_OPT_SET_2 , false, "object-description", 'o', no_argument, NULL, 0, eArgTypeNone, "Print the object description of the value resulting from the expression."},
};
@@ -80,8 +82,16 @@
//}
//break;
- case 'o':
- print_object = true;
+ case 'a':
+ {
+ bool success;
+ bool result;
+ result = Args::StringToBoolean(option_arg, true, &success);
+ if (!success)
+ error.SetErrorStringWithFormat("invalid all-threads value setting: \"%s\"", option_arg);
+ else
+ try_all_threads = result;
+ }
break;
case 'd':
@@ -101,6 +111,22 @@
}
break;
+ case 'o':
+ print_object = true;
+ break;
+
+ case 't':
+ {
+ bool success;
+ uint32_t result;
+ result = Args::StringToUInt32(option_arg, 0, 0, &success);
+ if (success)
+ timeout = result;
+ else
+ error.SetErrorStringWithFormat ("invalid timeout setting \"%s\"", option_arg);
+ }
+ break;
+
case 'u':
{
bool success;
@@ -125,6 +151,8 @@
unwind_on_error = true;
show_types = true;
show_summary = true;
+ try_all_threads = true;
+ timeout = 0;
}
const OptionDefinition*
@@ -146,7 +174,13 @@
m_expr_lines ()
{
SetHelpLong(
-"Examples: \n\
+"Timeouts:\n\
+ If the expression can be evaluated statically (without runnning code) then it will be.\n\
+ Otherwise, by default the expression will run on the current thread with a short timeout:\n\
+ currently .25 seconds. If it doesn't return in that time, the evaluation will be interrupted\n\
+ and resumed with all threads running. You can use the -a option to disable retrying on all\n\
+ threads. You can use the -t option to set a shorter timeout.\n\
+Examples: \n\
\n\
expr my_struct->a = my_array[3] \n\
expr -f bin -- (index * 8) + 5 \n\
@@ -298,12 +332,13 @@
break;
}
- Target::EvaluateExpressionOptions options;
+ EvaluateExpressionOptions options;
options.SetCoerceToId(m_command_options.print_object)
.SetUnwindOnError(m_command_options.unwind_on_error)
.SetKeepInMemory(keep_in_memory)
.SetUseDynamic(use_dynamic)
- .SetSingleThreadTimeoutUsec(0);
+ .SetRunOthers(m_command_options.try_all_threads)
+ .SetTimeoutUsec(m_command_options.timeout);
exe_results = target->EvaluateExpression (expr,
m_interpreter.GetExecutionContext().GetFramePtr(),
Modified: lldb/branches/windows/source/Commands/CommandObjectExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Commands/CommandObjectExpression.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Commands/CommandObjectExpression.h (original)
+++ lldb/branches/windows/source/Commands/CommandObjectExpression.h Fri Oct 19 04:07:45 2012
@@ -55,6 +55,8 @@
bool unwind_on_error;
bool show_types;
bool show_summary;
+ uint32_t timeout;
+ bool try_all_threads;
};
CommandObjectExpression (CommandInterpreter &interpreter);
Modified: lldb/branches/windows/source/Commands/CommandObjectPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Commands/CommandObjectPlatform.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Commands/CommandObjectPlatform.cpp (original)
+++ lldb/branches/windows/source/Commands/CommandObjectPlatform.cpp Fri Oct 19 04:07:45 2012
@@ -416,9 +416,7 @@
// We don't have any file yet, so the first argument is our
// executable, and the rest are program arguments
const bool first_arg_is_executable = true;
- m_options.launch_info.SetArguments (args,
- first_arg_is_executable,
- first_arg_is_executable);
+ m_options.launch_info.SetArguments (args, first_arg_is_executable);
}
}
Modified: lldb/branches/windows/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Commands/CommandObjectProcess.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/branches/windows/source/Commands/CommandObjectProcess.cpp Fri Oct 19 04:07:45 2012
@@ -127,11 +127,6 @@
return false;
}
- exe_module->GetFileSpec().GetPath (filename, sizeof(filename));
-
- const bool add_exe_file_as_first_arg = true;
- m_options.launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), add_exe_file_as_first_arg);
-
StateType state = eStateInvalid;
Process *process = m_interpreter.GetExecutionContext().GetProcessPtr();
if (process)
@@ -167,18 +162,32 @@
}
}
+ const char *target_settings_argv0 = target->GetArg0();
+
+ exe_module->GetFileSpec().GetPath (filename, sizeof(filename));
+
+ if (target_settings_argv0)
+ {
+ m_options.launch_info.GetArguments().AppendArgument (target_settings_argv0);
+ m_options.launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), false);
+ }
+ else
+ {
+ m_options.launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), true);
+ }
+
if (launch_args.GetArgumentCount() == 0)
{
Args target_setting_args;
- if (target->GetRunArguments(target_setting_args) > 0)
+ if (target->GetRunArguments(target_setting_args))
m_options.launch_info.GetArguments().AppendArguments (target_setting_args);
}
else
{
+ m_options.launch_info.GetArguments().AppendArguments (launch_args);
+
// Save the arguments for subsequent runs in the current target.
target->SetRunArguments (launch_args);
-
- m_options.launch_info.GetArguments().AppendArguments (launch_args);
}
if (target->GetDisableASLR())
@@ -512,11 +521,10 @@
{
// If there isn't a current target create one.
TargetSP new_target_sp;
- FileSpec emptyFileSpec;
Error error;
error = m_interpreter.GetDebugger().GetTargetList().CreateTarget (m_interpreter.GetDebugger(),
- emptyFileSpec,
+ NULL,
NULL,
false,
NULL, // No platform options
@@ -1013,10 +1021,9 @@
if (!target_sp)
{
// If there isn't a current target create one.
- FileSpec emptyFileSpec;
error = m_interpreter.GetDebugger().GetTargetList().CreateTarget (m_interpreter.GetDebugger(),
- emptyFileSpec,
+ NULL,
NULL,
false,
NULL, // No platform options
Modified: lldb/branches/windows/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Commands/CommandObjectTarget.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/branches/windows/source/Commands/CommandObjectTarget.cpp Fri Oct 19 04:07:45 2012
@@ -221,17 +221,12 @@
{
const char *file_path = command.GetArgumentAtIndex(0);
Timer scoped_timer(__PRETTY_FUNCTION__, "(lldb) target create '%s'", file_path);
- FileSpec file_spec;
-
- if (file_path)
- file_spec.SetFile (file_path, true);
-
TargetSP target_sp;
Debugger &debugger = m_interpreter.GetDebugger();
const char *arch_cstr = m_arch_option.GetArchitectureName();
const bool get_dependent_files = true;
Error error (debugger.GetTargetList().CreateTarget (debugger,
- file_spec,
+ file_path,
arch_cstr,
get_dependent_files,
&m_platform_options,
@@ -239,6 +234,13 @@
if (target_sp)
{
+ if (file_path)
+ {
+ // Use exactly what the user typed as the first argument
+ // when we exec or posix_spawn
+ target_sp->SetArg0 (file_path);
+ }
+
debugger.GetTargetList().SetSelectedTarget(target_sp.get());
if (core_file)
{
@@ -1234,14 +1236,11 @@
}
static uint32_t
-DumpCompileUnitLineTable
-(
- CommandInterpreter &interpreter,
- Stream &strm,
- Module *module,
- const FileSpec &file_spec,
- bool load_addresses
- )
+DumpCompileUnitLineTable (CommandInterpreter &interpreter,
+ Stream &strm,
+ Module *module,
+ const FileSpec &file_spec,
+ bool load_addresses)
{
uint32_t num_matches = 0;
if (module)
Modified: lldb/branches/windows/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Commands/CommandObjectThread.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/branches/windows/source/Commands/CommandObjectThread.cpp Fri Oct 19 04:07:45 2012
@@ -1314,7 +1314,7 @@
if (command && command[0] != '\0')
{
Target *target = exe_ctx.GetTargetPtr();
- Target::EvaluateExpressionOptions options;
+ EvaluateExpressionOptions options;
options.SetUnwindOnError(true);
options.SetUseDynamic(eNoDynamicValues);
Modified: lldb/branches/windows/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Commands/CommandObjectWatchpoint.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/branches/windows/source/Commands/CommandObjectWatchpoint.cpp Fri Oct 19 04:07:45 2012
@@ -1234,11 +1234,12 @@
}
// Use expression evaluation to arrive at the address to watch.
- Target::EvaluateExpressionOptions options;
+ EvaluateExpressionOptions options;
options.SetCoerceToId(false)
.SetUnwindOnError(true)
.SetKeepInMemory(false)
- .SetSingleThreadTimeoutUsec(0);
+ .SetRunOthers(true)
+ .SetTimeoutUsec(0);
ExecutionResults expr_result = target->EvaluateExpression (expr_str.c_str(),
frame,
Modified: lldb/branches/windows/source/Core/CXXFormatterFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Core/CXXFormatterFunctions.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Core/CXXFormatterFunctions.cpp (original)
+++ lldb/branches/windows/source/Core/CXXFormatterFunctions.cpp Fri Oct 19 04:07:45 2012
@@ -47,7 +47,7 @@
if (!target || !stack_frame)
return false;
- Target::EvaluateExpressionOptions options;
+ EvaluateExpressionOptions options;
options.SetCoerceToId(false)
.SetUnwindOnError(true)
.SetKeepInMemory(true)
@@ -85,7 +85,7 @@
if (!target || !stack_frame)
return valobj_sp;
- Target::EvaluateExpressionOptions options;
+ EvaluateExpressionOptions options;
options.SetCoerceToId(false)
.SetUnwindOnError(true)
.SetKeepInMemory(true)
@@ -122,7 +122,7 @@
if (!target || !stack_frame)
return valobj_sp;
- Target::EvaluateExpressionOptions options;
+ EvaluateExpressionOptions options;
options.SetCoerceToId(false)
.SetUnwindOnError(true)
.SetKeepInMemory(true)
@@ -459,7 +459,7 @@
if (!target || !stack_frame)
return false;
- Target::EvaluateExpressionOptions options;
+ EvaluateExpressionOptions options;
options.SetCoerceToId(false)
.SetUnwindOnError(true)
.SetKeepInMemory(true)
@@ -1054,7 +1054,7 @@
object_fetcher_expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = %s; _lldb_valgen_item.value = %s; _lldb_valgen_item;",key_fetcher_expr.GetData(),value_fetcher_expr.GetData());
lldb::ValueObjectSP child_sp;
m_backend.GetTargetSP()->EvaluateExpression(object_fetcher_expr.GetData(), m_backend.GetFrameSP().get(), child_sp,
- Target::EvaluateExpressionOptions().SetKeepInMemory(true));
+ EvaluateExpressionOptions().SetKeepInMemory(true));
if (child_sp)
child_sp->SetName(ConstString(idx_name.GetData()));
return child_sp;
Modified: lldb/branches/windows/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Core/Debugger.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Core/Debugger.cpp (original)
+++ lldb/branches/windows/source/Core/Debugger.cpp Fri Oct 19 04:07:45 2012
@@ -1095,7 +1095,7 @@
if (!*percent_position || *percent_position > var_name_end)
{
if (log)
- log->Printf("no format descriptor in string, skipping");
+ log->Printf("[ScanFormatDescriptor] no format descriptor in string, skipping");
*var_name_final = var_name_end;
}
else
@@ -1104,13 +1104,13 @@
char* format_name = new char[var_name_end-*var_name_final]; format_name[var_name_end-*var_name_final-1] = '\0';
memcpy(format_name, *var_name_final+1, var_name_end-*var_name_final-1);
if (log)
- log->Printf("parsing %s as a format descriptor", format_name);
+ log->Printf("ScanFormatDescriptor] parsing %s as a format descriptor", format_name);
if ( !FormatManager::GetFormatFromCString(format_name,
true,
*custom_format) )
{
if (log)
- log->Printf("%s is an unknown format", format_name);
+ log->Printf("ScanFormatDescriptor] %s is an unknown format", format_name);
// if this is an @ sign, print ObjC description
if (*format_name == '@')
*val_obj_display = ValueObject::eValueObjectRepresentationStyleLanguageSpecific;
@@ -1128,19 +1128,19 @@
else if (*format_name == 'T')
*val_obj_display = ValueObject::eValueObjectRepresentationStyleType;
else if (log)
- log->Printf("%s is an error, leaving the previous value alone", format_name);
+ log->Printf("ScanFormatDescriptor] %s is an error, leaving the previous value alone", format_name);
}
// a good custom format tells us to print the value using it
else
{
if (log)
- log->Printf("will display value for this VO");
+ log->Printf("ScanFormatDescriptor] will display value for this VO");
*val_obj_display = ValueObject::eValueObjectRepresentationStyleValue;
}
delete format_name;
}
if (log)
- log->Printf("final format description outcome: custom_format = %d, val_obj_display = %d",
+ log->Printf("ScanFormatDescriptor] final format description outcome: custom_format = %d, val_obj_display = %d",
*custom_format,
*val_obj_display);
return true;
@@ -1169,7 +1169,7 @@
if (*close_bracket_position - *open_bracket_position == 1)
{
if (log)
- log->Printf("[] detected.. going from 0 to end of data");
+ log->Printf("[ScanBracketedRange] '[]' detected.. going from 0 to end of data");
*index_lower = 0;
}
else if (*separator_position == NULL || *separator_position > var_name_end)
@@ -1178,7 +1178,7 @@
*index_lower = ::strtoul (*open_bracket_position+1, &end, 0);
*index_higher = *index_lower;
if (log)
- log->Printf("[%lld] detected, high index is same", *index_lower);
+ log->Printf("[ScanBracketedRange] [%lld] detected, high index is same", *index_lower);
}
else if (*close_bracket_position && *close_bracket_position < var_name_end)
{
@@ -1186,25 +1186,25 @@
*index_lower = ::strtoul (*open_bracket_position+1, &end, 0);
*index_higher = ::strtoul (*separator_position+1, &end, 0);
if (log)
- log->Printf("[%lld-%lld] detected", *index_lower, *index_higher);
+ log->Printf("[ScanBracketedRange] [%lld-%lld] detected", *index_lower, *index_higher);
}
else
{
if (log)
- log->Printf("expression is erroneous, cannot extract indices out of it");
+ log->Printf("[ScanBracketedRange] expression is erroneous, cannot extract indices out of it");
return false;
}
if (*index_lower > *index_higher && *index_higher > 0)
{
if (log)
- log->Printf("swapping indices");
+ log->Printf("[ScanBracketedRange] swapping indices");
int temp = *index_lower;
*index_lower = *index_higher;
*index_higher = temp;
}
}
else if (log)
- log->Printf("no bracketed range, skipping entirely");
+ log->Printf("[ScanBracketedRange] no bracketed range, skipping entirely");
return true;
}
@@ -1219,7 +1219,7 @@
std::auto_ptr<char> ptr_deref_buffer(new char[10]);
::sprintf(ptr_deref_buffer.get(), ptr_deref_format, index);
if (log)
- log->Printf("name to deref: %s",ptr_deref_buffer.get());
+ log->Printf("[ExpandIndexedExpression] name to deref: %s",ptr_deref_buffer.get());
const char* first_unparsed;
ValueObject::GetValueForExpressionPathOptions options;
ValueObject::ExpressionPathEndResultType final_value_type;
@@ -1234,14 +1234,14 @@
if (!item)
{
if (log)
- log->Printf("ERROR: unparsed portion = %s, why stopping = %d,"
+ log->Printf("[ExpandIndexedExpression] ERROR: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
}
else
{
if (log)
- log->Printf("ALL RIGHT: unparsed portion = %s, why stopping = %d,"
+ log->Printf("[ExpandIndexedExpression] ALL RIGHT: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
}
@@ -1354,7 +1354,7 @@
break;
if (log)
- log->Printf("initial string: %s",var_name_begin);
+ log->Printf("[Debugger::FormatPrompt] initial string: %s",var_name_begin);
// check for *var and *svar
if (*var_name_begin == '*')
@@ -1364,7 +1364,7 @@
}
if (log)
- log->Printf("initial string: %s",var_name_begin);
+ log->Printf("[Debugger::FormatPrompt] initial string: %s",var_name_begin);
if (*var_name_begin == 's')
{
@@ -1376,14 +1376,14 @@
}
if (log)
- log->Printf("initial string: %s",var_name_begin);
+ log->Printf("[Debugger::FormatPrompt] initial string: %s",var_name_begin);
// should be a 'v' by now
if (*var_name_begin != 'v')
break;
if (log)
- log->Printf("initial string: %s",var_name_begin);
+ log->Printf("[Debugger::FormatPrompt] initial string: %s",var_name_begin);
ValueObject::ExpressionPathAftermath what_next = (do_deref_pointer ?
ValueObject::eExpressionPathAftermathDereference : ValueObject::eExpressionPathAftermathNothing);
@@ -1457,7 +1457,7 @@
memcpy(expr_path.get(), var_name_begin+3,var_name_final-var_name_begin-3);
if (log)
- log->Printf("symbol to expand: %s",expr_path.get());
+ log->Printf("[Debugger::FormatPrompt] symbol to expand: %s",expr_path.get());
target = valobj->GetValueForExpressionPath(expr_path.get(),
&first_unparsed,
@@ -1469,7 +1469,7 @@
if (!target)
{
if (log)
- log->Printf("ERROR: unparsed portion = %s, why stopping = %d,"
+ log->Printf("[Debugger::FormatPrompt] ERROR: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
break;
@@ -1477,7 +1477,7 @@
else
{
if (log)
- log->Printf("ALL RIGHT: unparsed portion = %s, why stopping = %d,"
+ log->Printf("[Debugger::FormatPrompt] ALL RIGHT: unparsed portion = %s, why stopping = %d,"
" final_value_type %d",
first_unparsed, reason_to_stop, final_value_type);
}
@@ -1500,7 +1500,7 @@
if (error.Fail())
{
if (log)
- log->Printf("ERROR: %s\n", error.AsCString("unknown")); \
+ log->Printf("[Debugger::FormatPrompt] ERROR: %s\n", error.AsCString("unknown")); \
break;
}
do_deref_pointer = false;
@@ -1529,7 +1529,7 @@
{
StreamString str_temp;
if (log)
- log->Printf("I am into array || pointer && !range");
+ log->Printf("[Debugger::FormatPrompt] I am into array || pointer && !range");
if (target->HasSpecialPrintableRepresentation(val_obj_display,
custom_format))
@@ -1539,7 +1539,7 @@
val_obj_display,
custom_format);
if (log)
- log->Printf("special cases did%s match", var_success ? "" : "n't");
+ log->Printf("[Debugger::FormatPrompt] special cases did%s match", var_success ? "" : "n't");
// should not happen
if (!var_success)
@@ -1591,17 +1591,17 @@
if (!is_array_range)
{
if (log)
- log->Printf("dumping ordinary printable output");
+ log->Printf("[Debugger::FormatPrompt] dumping ordinary printable output");
var_success = target->DumpPrintableRepresentation(s,val_obj_display, custom_format);
}
else
{
if (log)
- log->Printf("checking if I can handle as array");
+ log->Printf("[Debugger::FormatPrompt] checking if I can handle as array");
if (!is_array && !is_pointer)
break;
if (log)
- log->Printf("handle as array");
+ log->Printf("[Debugger::FormatPrompt] handle as array");
const char* special_directions = NULL;
StreamString special_directions_writer;
if (close_bracket_position && (var_name_end-close_bracket_position > 1))
@@ -1633,12 +1633,12 @@
if (!item)
{
if (log)
- log->Printf("ERROR in getting child item at index %lld", index_lower);
+ log->Printf("[Debugger::FormatPrompt] ERROR in getting child item at index %lld", index_lower);
}
else
{
if (log)
- log->Printf("special_directions for child item: %s",special_directions);
+ log->Printf("[Debugger::FormatPrompt] special_directions for child item: %s",special_directions);
}
if (!special_directions)
@@ -1952,7 +1952,7 @@
else if (::strncmp (var_name_begin, "stop-reason}", strlen("stop-reason}")) == 0)
{
StopInfoSP stop_info_sp = thread->GetStopInfo ();
- if (stop_info_sp)
+ if (stop_info_sp && stop_info_sp->IsValid())
{
cstr = stop_info_sp->GetDescription();
if (cstr && cstr[0])
@@ -1965,7 +1965,7 @@
else if (::strncmp (var_name_begin, "return-value}", strlen("return-value}")) == 0)
{
StopInfoSP stop_info_sp = thread->GetStopInfo ();
- if (stop_info_sp)
+ if (stop_info_sp && stop_info_sp->IsValid())
{
ValueObjectSP return_valobj_sp = StopInfo::GetReturnValueObject (stop_info_sp);
if (return_valobj_sp)
Modified: lldb/branches/windows/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Core/Module.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Core/Module.cpp (original)
+++ lldb/branches/windows/source/Core/Module.cpp Fri Oct 19 04:07:45 2012
@@ -314,6 +314,22 @@
if (objfile && objfile->GetArchitecture(object_arch))
{
m_did_init_ast = true;
+
+ // LLVM wants this to be set to iOS or MacOSX; if we're working on
+ // a bare-boards type image, change the triple for llvm's benefit.
+ if (object_arch.GetTriple().getVendor() == llvm::Triple::Apple
+ && object_arch.GetTriple().getOS() == llvm::Triple::UnknownOS)
+ {
+ if (object_arch.GetTriple().getArch() == llvm::Triple::arm ||
+ object_arch.GetTriple().getArch() == llvm::Triple::thumb)
+ {
+ object_arch.GetTriple().setOS(llvm::Triple::IOS);
+ }
+ else
+ {
+ object_arch.GetTriple().setOS(llvm::Triple::MacOSX);
+ }
+ }
m_ast.SetArchitecture (object_arch);
}
}
Modified: lldb/branches/windows/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Core/ValueObject.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Core/ValueObject.cpp (original)
+++ lldb/branches/windows/source/Core/ValueObject.cpp Fri Oct 19 04:07:45 2012
@@ -239,8 +239,9 @@
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
if (log)
- log->Printf("checking for FormatManager revisions. VO named %s is at revision %d, while the format manager is at revision %d",
+ log->Printf("[%s %p] checking for FormatManager revisions. ValueObject rev: %d - Global rev: %d",
GetName().GetCString(),
+ this,
m_last_format_mgr_revision,
DataVisualization::GetCurrentRevision());
@@ -274,6 +275,13 @@
ClearUserVisibleData(eClearUserVisibleDataItemsValue);
}
+void
+ValueObject::ResetCompleteTypeInfo ()
+{
+ m_did_calculate_complete_objc_class_type = false;
+ m_override_type = ClangASTType();
+}
+
ClangASTType
ValueObject::MaybeCalculateCompleteType ()
{
Modified: lldb/branches/windows/source/Core/ValueObjectDynamicValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Core/ValueObjectDynamicValue.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Core/ValueObjectDynamicValue.cpp (original)
+++ lldb/branches/windows/source/Core/ValueObjectDynamicValue.cpp Fri Oct 19 04:07:45 2012
@@ -14,6 +14,7 @@
// C++ Includes
// Other libraries and framework includes
// Project includes
+#include "lldb/Core/Log.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ValueObjectList.h"
#include "lldb/Core/Value.h"
@@ -287,15 +288,29 @@
Value old_value(m_value);
+ lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES));
+
if (!m_type_sp)
{
m_type_sp = dynamic_type_sp;
+ ResetCompleteTypeInfo ();
+ if (log)
+ log->Printf("[%s %p] now has a dynamic type %s",
+ GetName().GetCString(),
+ this,
+ GetTypeName().AsCString(""));
}
else if (dynamic_type_sp != m_type_sp)
{
// We are another type, we need to tear down our children...
m_type_sp = dynamic_type_sp;
SetValueDidChange (true);
+ ResetCompleteTypeInfo ();
+ if (log)
+ log->Printf("[%s %p] has a new dynamic type %s",
+ GetName().GetCString(),
+ this,
+ GetTypeName().AsCString(""));
}
if (!m_address.IsValid() || m_address != dynamic_address)
Modified: lldb/branches/windows/source/Core/Windows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Core/Windows.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Core/Windows.cpp (original)
+++ lldb/branches/windows/source/Core/Windows.cpp Fri Oct 19 04:07:45 2012
@@ -15,6 +15,7 @@
#include <cstdlib>
#include <cstdio>
#include <cerrno>
+#include <Windows.h>
int strcasecmp(const char* s1, const char* s2)
{
@@ -185,6 +186,13 @@
return &l1[1];
}
+char* getcwd(char* path, int max)
+{
+ if (GetCurrentDirectory(max, path) == 0)
+ return path;
+ return NULL;
+}
+
char *dirname(char *path)
{
char* l1 = strrchr(path, '\\');
Modified: lldb/branches/windows/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Expression/ClangExpressionParser.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/branches/windows/source/Expression/ClangExpressionParser.cpp Fri Oct 19 04:07:45 2012
@@ -275,6 +275,8 @@
break;
}
+ m_compiler->getLangOpts().Bool = true;
+ m_compiler->getLangOpts().WChar = true;
m_compiler->getLangOpts().DebuggerSupport = true; // Features specifically for debugger clients
if (expr.DesiredResultType() == ClangExpression::eResultTypeId)
m_compiler->getLangOpts().DebuggerCastResultToId = true;
Modified: lldb/branches/windows/source/Expression/ClangFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Expression/ClangFunction.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Expression/ClangFunction.cpp (original)
+++ lldb/branches/windows/source/Expression/ClangFunction.cpp Fri Oct 19 04:07:45 2012
@@ -485,13 +485,13 @@
ClangFunction::ExecuteFunction(
ExecutionContext &exe_ctx,
Stream &errors,
- uint32_t single_thread_timeout_usec,
+ uint32_t timeout_usec,
bool try_all_threads,
Value &results)
{
const bool stop_others = true;
const bool discard_on_error = true;
- return ExecuteFunction (exe_ctx, NULL, errors, stop_others, single_thread_timeout_usec,
+ return ExecuteFunction (exe_ctx, NULL, errors, stop_others, timeout_usec,
try_all_threads, discard_on_error, results);
}
@@ -504,7 +504,7 @@
bool stop_others,
bool try_all_threads,
bool discard_on_error,
- uint32_t single_thread_timeout_usec,
+ uint32_t timeout_usec,
Stream &errors,
lldb::addr_t *this_arg)
{
@@ -529,7 +529,7 @@
stop_others,
try_all_threads,
discard_on_error,
- single_thread_timeout_usec,
+ timeout_usec,
errors);
if (exe_ctx.GetProcessPtr())
@@ -544,7 +544,7 @@
lldb::addr_t *args_addr_ptr,
Stream &errors,
bool stop_others,
- uint32_t single_thread_timeout_usec,
+ uint32_t timeout_usec,
bool try_all_threads,
bool discard_on_error,
Value &results)
@@ -574,7 +574,7 @@
stop_others,
try_all_threads,
discard_on_error,
- single_thread_timeout_usec,
+ timeout_usec,
errors);
if (args_addr_ptr != NULL)
Modified: lldb/branches/windows/source/Expression/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Expression/ClangUserExpression.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Expression/ClangUserExpression.cpp (original)
+++ lldb/branches/windows/source/Expression/ClangUserExpression.cpp Fri Oct 19 04:07:45 2012
@@ -544,7 +544,8 @@
bool discard_on_error,
ClangUserExpression::ClangUserExpressionSP &shared_ptr_to_me,
lldb::ClangExpressionVariableSP &result,
- uint32_t single_thread_timeout_usec)
+ bool run_others,
+ uint32_t timeout_usec)
{
// The expression log is quite verbose, and if you're just tracking the execution of the
// expression, it's quite convenient to have these logs come out with the STEP log as well.
@@ -594,7 +595,7 @@
stop_others,
try_all_threads,
discard_on_error,
- single_thread_timeout_usec,
+ timeout_usec,
error_stream);
if (exe_ctx.GetProcessPtr())
@@ -655,10 +656,21 @@
const char *expr_cstr,
const char *expr_prefix,
lldb::ValueObjectSP &result_valobj_sp,
- uint32_t single_thread_timeout_usec)
+ bool run_others,
+ uint32_t timeout_usec)
{
Error error;
- return EvaluateWithError (exe_ctx, execution_policy, language, desired_type, discard_on_error, expr_cstr, expr_prefix, result_valobj_sp, error, single_thread_timeout_usec);
+ return EvaluateWithError (exe_ctx,
+ execution_policy,
+ language,
+ desired_type,
+ discard_on_error,
+ expr_cstr,
+ expr_prefix,
+ result_valobj_sp,
+ error,
+ run_others,
+ timeout_usec);
}
ExecutionResults
@@ -671,7 +683,8 @@
const char *expr_prefix,
lldb::ValueObjectSP &result_valobj_sp,
Error &error,
- uint32_t single_thread_timeout_usec)
+ bool run_others,
+ uint32_t timeout_usec)
{
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
@@ -747,7 +760,8 @@
discard_on_error,
user_expression_sp,
expr_result,
- single_thread_timeout_usec);
+ run_others,
+ timeout_usec);
if (execution_results != eExecutionCompleted)
{
Modified: lldb/branches/windows/source/Host/common/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Host/common/FileSpec.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Host/common/FileSpec.cpp (original)
+++ lldb/branches/windows/source/Host/common/FileSpec.cpp Fri Oct 19 04:07:45 2012
@@ -1020,4 +1020,28 @@
return false;
}
+bool
+FileSpec::IsRelativeToCurrentWorkingDirectory () const
+{
+ const char *directory = m_directory.GetCString();
+ if (directory && directory[0])
+ {
+ // If the path doesn't start with '/' or '~', return true
+ switch (directory[0])
+ {
+ case '/':
+ case '~':
+ return false;
+ default:
+ return true;
+ }
+ }
+ else if (m_filename)
+ {
+ // No directory, just a basename, return true
+ return true;
+ }
+ return false;
+}
+
Modified: lldb/branches/windows/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Host/common/Host.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Host/common/Host.cpp (original)
+++ lldb/branches/windows/source/Host/common/Host.cpp Fri Oct 19 04:07:45 2012
@@ -1334,7 +1334,7 @@
if (!arch.IsValid())
arch = Host::GetArchitecture ();
Error err = debugger.GetTargetList().CreateTarget(debugger,
- FileSpec(),
+ NULL,
arch.GetTriple().getTriple().c_str(),
false,
NULL,
@@ -1417,8 +1417,7 @@
// No shell, just run it
Args args (command);
const bool first_arg_is_executable = true;
- const bool first_arg_is_executable_and_argument = true;
- launch_info.SetArguments(args, first_arg_is_executable, first_arg_is_executable_and_argument);
+ launch_info.SetArguments(args, first_arg_is_executable);
}
if (working_dir)
Modified: lldb/branches/windows/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Interpreter/CommandInterpreter.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/branches/windows/source/Interpreter/CommandInterpreter.cpp Fri Oct 19 04:07:45 2012
@@ -311,8 +311,8 @@
{
alias_arguments_vector_sp.reset (new OptionArgVector);
ProcessAliasOptionsArgs (cmd_obj_sp, "--func-regex %1", alias_arguments_vector_sp);
- AddAlias ("rb", cmd_obj_sp);
- AddOrReplaceAliasOptions("rb", alias_arguments_vector_sp);
+ AddAlias ("rbreak", cmd_obj_sp);
+ AddOrReplaceAliasOptions("rbreak", alias_arguments_vector_sp);
}
}
@@ -1310,11 +1310,12 @@
{
ValueObjectSP expr_result_valobj_sp;
- Target::EvaluateExpressionOptions options;
+ EvaluateExpressionOptions options;
options.SetCoerceToId(false)
.SetUnwindOnError(true)
.SetKeepInMemory(false)
- .SetSingleThreadTimeoutUsec(0);
+ .SetRunOthers(true)
+ .SetTimeoutUsec(0);
ExecutionResults expr_result = target->EvaluateExpression (expr_str.c_str(),
exe_ctx.GetFramePtr(),
Modified: lldb/branches/windows/source/Interpreter/ScriptInterpreterNone.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Interpreter/ScriptInterpreterNone.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Interpreter/ScriptInterpreterNone.cpp (original)
+++ lldb/branches/windows/source/Interpreter/ScriptInterpreterNone.cpp Fri Oct 19 04:07:45 2012
@@ -26,7 +26,7 @@
}
bool
-ScriptInterpreterNone::ExecuteOneLine (const char *command, CommandReturnObject *, bool enable_io)
+ScriptInterpreterNone::ExecuteOneLine (const char *command, CommandReturnObject *, bool enable_io, bool set_lldb_globals)
{
m_interpreter.GetDebugger().GetErrorStream().PutCString ("error: there is no embedded script interpreter in this mode.\n");
return false;
Modified: lldb/branches/windows/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Interpreter/ScriptInterpreterPython.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/branches/windows/source/Interpreter/ScriptInterpreterPython.cpp Fri Oct 19 04:07:45 2012
@@ -721,7 +721,7 @@
}
bool
-ScriptInterpreterPython::ExecuteOneLine (const char *command, CommandReturnObject *result, bool enable_io)
+ScriptInterpreterPython::ExecuteOneLine (const char *command, CommandReturnObject *result, bool enable_io, bool set_lldb_globals)
{
if (!m_valid_session)
return false;
@@ -732,8 +732,8 @@
// method to pass the command string directly down to Python.
Locker locker(this,
- ScriptInterpreterPython::Locker::AcquireLock | ScriptInterpreterPython::Locker::InitSession,
- ScriptInterpreterPython::Locker::FreeAcquiredLock | ScriptInterpreterPython::Locker::TearDownSession);
+ ScriptInterpreterPython::Locker::AcquireLock | (set_lldb_globals ? ScriptInterpreterPython::Locker::InitSession : 0),
+ ScriptInterpreterPython::Locker::FreeAcquiredLock | (set_lldb_globals ? ScriptInterpreterPython::Locker::TearDownSession : 0));
bool success = false;
@@ -1000,12 +1000,13 @@
ScriptInterpreterPython::ExecuteOneLineWithReturn (const char *in_string,
ScriptInterpreter::ScriptReturnType return_type,
void *ret_value,
- bool enable_io)
+ bool enable_io,
+ bool set_lldb_globals)
{
Locker locker(this,
- ScriptInterpreterPython::Locker::AcquireLock | ScriptInterpreterPython::Locker::InitSession,
- ScriptInterpreterPython::Locker::FreeAcquiredLock | ScriptInterpreterPython::Locker::TearDownSession);
+ ScriptInterpreterPython::Locker::AcquireLock | (set_lldb_globals ? ScriptInterpreterPython::Locker::InitSession : 0),
+ ScriptInterpreterPython::Locker::FreeAcquiredLock | (set_lldb_globals ? ScriptInterpreterPython::Locker::TearDownSession : 0));
PyObject *py_return = NULL;
PyObject *mainmod = PyImport_AddModule ("__main__");
@@ -1165,13 +1166,13 @@
}
bool
-ScriptInterpreterPython::ExecuteMultipleLines (const char *in_string, bool enable_io)
+ScriptInterpreterPython::ExecuteMultipleLines (const char *in_string, bool enable_io, bool set_lldb_globals)
{
Locker locker(this,
- ScriptInterpreterPython::Locker::AcquireLock | ScriptInterpreterPython::Locker::InitSession,
- ScriptInterpreterPython::Locker::FreeAcquiredLock | ScriptInterpreterPython::Locker::TearDownSession);
+ ScriptInterpreterPython::Locker::AcquireLock | (set_lldb_globals ? ScriptInterpreterPython::Locker::InitSession : 0),
+ ScriptInterpreterPython::Locker::FreeAcquiredLock | (set_lldb_globals ? ScriptInterpreterPython::Locker::TearDownSession : 0));
bool success = false;
PyObject *py_return = NULL;
@@ -2373,6 +2374,7 @@
bool
ScriptInterpreterPython::LoadScriptingModule (const char* pathname,
bool can_reload,
+ bool init_lldb_globals,
lldb_private::Error& error)
{
if (!pathname || !pathname[0])
@@ -2404,14 +2406,16 @@
std::string basename(target_file.GetFilename().GetCString());
// Before executing Pyton code, lock the GIL.
- Locker py_lock(this);
+ Locker py_lock (this,
+ Locker::AcquireLock | (init_lldb_globals ? Locker::InitSession : 0),
+ Locker::FreeAcquiredLock | (init_lldb_globals ? Locker::TearDownSession : 0));
// now make sure that Python has "directory" in the search path
StreamString command_stream;
command_stream.Printf("if not (sys.path.__contains__('%s')):\n sys.path.append('%s');\n\n",
directory,
directory);
- bool syspath_retval = ExecuteMultipleLines(command_stream.GetData(), false);
+ bool syspath_retval = ExecuteMultipleLines(command_stream.GetData(), false, false);
if (!syspath_retval)
{
error.SetErrorString("Python sys.path handling failed");
@@ -2432,7 +2436,10 @@
// this call will fail if the module does not exist (because the parameter to it is not a string
// but an actual Python module object, which is non-existant if the module was not imported before)
bool was_imported = (ExecuteOneLineWithReturn(command_stream.GetData(),
- ScriptInterpreterPython::eScriptReturnTypeInt, &refcount, false) && refcount > 0);
+ ScriptInterpreterPython::eScriptReturnTypeInt,
+ &refcount,
+ false,
+ false) && refcount > 0);
if (was_imported == true && can_reload == false)
{
error.SetErrorString("module already imported");
@@ -2442,7 +2449,7 @@
// now actually do the import
command_stream.Clear();
command_stream.Printf("import %s",basename.c_str());
- bool import_retval = ExecuteOneLine(command_stream.GetData(), NULL, false);
+ bool import_retval = ExecuteOneLine(command_stream.GetData(), NULL, false, false);
if (!import_retval)
{
error.SetErrorString("Python import statement failed");
Modified: lldb/branches/windows/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h (original)
+++ lldb/branches/windows/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h Fri Oct 19 04:07:45 2012
@@ -93,6 +93,12 @@
return pc & ~(lldb::addr_t)1;
}
+ virtual bool
+ FunctionCallsChangeCFA ()
+ {
+ return false;
+ }
+
virtual const lldb_private::RegisterInfo *
GetRegisterInfoArray (uint32_t &count);
Modified: lldb/branches/windows/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h (original)
+++ lldb/branches/windows/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h Fri Oct 19 04:07:45 2012
@@ -93,7 +93,13 @@
// Just make sure the address is a valid 32 bit address.
return pc <= UINT32_MAX;
}
-
+
+ virtual bool
+ FunctionCallsChangeCFA ()
+ {
+ return true;
+ }
+
virtual const lldb_private::RegisterInfo *
GetRegisterInfoArray (uint32_t &count);
Modified: lldb/branches/windows/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h (original)
+++ lldb/branches/windows/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h Fri Oct 19 04:07:45 2012
@@ -91,7 +91,13 @@
// aren't fixed width...
return true;
}
-
+
+ virtual bool
+ FunctionCallsChangeCFA ()
+ {
+ return true;
+ }
+
virtual const lldb_private::RegisterInfo *
GetRegisterInfoArray (uint32_t &count);
//------------------------------------------------------------------
Modified: lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Fri Oct 19 04:07:45 2012
@@ -188,7 +188,14 @@
Target &target = process->GetTarget();
ModuleSP memory_module_sp;
- // Use the memory module as the module if we have one...
+
+ // If this is a kext and the user asked us to ignore kexts, don't try to load it.
+ if (kernel_image == false && target.GetDisableKextLoading() == true)
+ {
+ return false;
+ }
+
+ // Use the memory module as the module if we have one
if (address != LLDB_INVALID_ADDRESS)
{
FileSpec file_spec;
@@ -395,6 +402,7 @@
{
m_kernel.Clear(false);
m_kernel.module_sp = m_process->GetTarget().GetExecutableModule();
+ m_kernel.kernel_image = true;
ConstString kernel_name("mach_kernel");
if (m_kernel.module_sp.get()
Modified: lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h (original)
+++ lldb/branches/windows/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h Fri Oct 19 04:07:45 2012
@@ -136,7 +136,7 @@
char name[KERNEL_MODULE_MAX_NAME];
lldb::ModuleSP module_sp;
uint32_t load_process_stop_id;
- lldb_private::UUID uuid; // UUID for this dylib if it has one, else all zeros
+ lldb_private::UUID uuid; // UUID for this dylib if it has one, else all zeros
lldb_private::Address so_address; // The section offset address for this kext in case it can be read from object files
uint64_t address;
uint64_t size;
@@ -144,6 +144,7 @@
uint32_t load_tag;
uint32_t flags;
uint64_t reference_list;
+ bool kernel_image; // true if this is the kernel, false if this is a kext
OSKextLoadedKextSummary() :
module_sp (),
@@ -155,7 +156,8 @@
version (0),
load_tag (0),
flags (0),
- reference_list (0)
+ reference_list (0),
+ kernel_image (false)
{
name[0] = '\0';
}
Modified: lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Fri Oct 19 04:07:45 2012
@@ -55,8 +55,13 @@
OperatingSystemPython::CreateInstance (Process *process, bool force)
{
// Python OperatingSystem plug-ins must be requested by name, so force must be true
- if (force)
- return new OperatingSystemPython (process);
+ FileSpec python_os_plugin_spec (process->GetPythonOSPluginPath());
+ if (python_os_plugin_spec && python_os_plugin_spec.Exists())
+ {
+ std::auto_ptr<OperatingSystemPython> os_ap (new OperatingSystemPython (process, python_os_plugin_spec));
+ if (os_ap.get() && os_ap->IsValid())
+ return os_ap.release();
+ }
return NULL;
}
@@ -74,12 +79,12 @@
}
-OperatingSystemPython::OperatingSystemPython (lldb_private::Process *process) :
+OperatingSystemPython::OperatingSystemPython (lldb_private::Process *process, const FileSpec &python_module_path) :
OperatingSystem (process),
m_thread_list_valobj_sp (),
m_register_info_ap (),
- m_interpreter(NULL),
- m_python_object(NULL)
+ m_interpreter (NULL),
+ m_python_object (NULL)
{
if (!process)
return;
@@ -89,13 +94,27 @@
m_interpreter = target_sp->GetDebugger().GetCommandInterpreter().GetScriptInterpreter();
if (m_interpreter)
{
- // TODO: hardcoded is not good
- auto object_sp = m_interpreter->CreateOSPlugin("operating_system.PlugIn",process->CalculateProcess());
- if (object_sp)
+
+ std::string os_plugin_class_name (python_module_path.GetFilename().AsCString(""));
+ if (!os_plugin_class_name.empty())
{
- m_python_object = object_sp->GetObject();
-
- //GetDynamicRegisterInfo (); // COMMENT THIS LINE OUT PRIOR TO CHECKIN!!!
+ const bool init_session = false;
+ const bool allow_reload = true;
+ char python_module_path_cstr[PATH_MAX];
+ python_module_path.GetPath(python_module_path_cstr, sizeof(python_module_path_cstr));
+ Error error;
+ if (m_interpreter->LoadScriptingModule (python_module_path_cstr, allow_reload, init_session, error))
+ {
+ // Strip the ".py" extension if there is one
+ size_t py_extension_pos = os_plugin_class_name.rfind(".py");
+ if (py_extension_pos != std::string::npos)
+ os_plugin_class_name.erase (py_extension_pos);
+ // Add ".OperatingSystemPlugIn" to the module name to get a string like "modulename.OperatingSystemPlugIn"
+ os_plugin_class_name += ".OperatingSystemPlugIn";
+ auto object_sp = m_interpreter->CreateOSPlugin(os_plugin_class_name.c_str(), process->CalculateProcess());
+ if (object_sp)
+ m_python_object = object_sp->GetObject();
+ }
}
}
}
@@ -217,8 +236,8 @@
return RegisterContextSP();
auto object_sp = m_interpreter->OSPlugin_QueryForRegisterContextData (m_interpreter->MakeScriptObject(m_python_object),
thread->GetID());
-
- if (!object_sp)
+
+ if (!object_sp)
return RegisterContextSP();
PythonDataString reg_context_data((PyObject*)object_sp->GetObject());
Modified: lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h (original)
+++ lldb/branches/windows/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h Fri Oct 19 04:07:45 2012
@@ -43,7 +43,8 @@
//------------------------------------------------------------------
// Class Methods
//------------------------------------------------------------------
- OperatingSystemPython (lldb_private::Process *process);
+ OperatingSystemPython (lldb_private::Process *process,
+ const lldb_private::FileSpec &python_module_path);
virtual
~OperatingSystemPython ();
@@ -78,6 +79,10 @@
protected:
+ bool IsValid() const
+ {
+ return m_python_object != NULL;
+ }
DynamicRegisterInfo *
GetDynamicRegisterInfo ();
Modified: lldb/branches/windows/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original)
+++ lldb/branches/windows/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Fri Oct 19 04:07:45 2012
@@ -498,11 +498,10 @@
if (target == NULL)
{
TargetSP new_target_sp;
- FileSpec emptyFileSpec;
ArchSpec emptyArchSpec;
error = debugger.GetTargetList().CreateTarget (debugger,
- emptyFileSpec,
+ NULL,
emptyArchSpec,
false,
m_remote_platform_sp,
Modified: lldb/branches/windows/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/branches/windows/source/Plugins/Platform/Linux/PlatformLinux.cpp Fri Oct 19 04:07:45 2012
@@ -408,11 +408,10 @@
if (target == NULL)
{
TargetSP new_target_sp;
- FileSpec emptyFileSpec;
ArchSpec emptyArchSpec;
error = debugger.GetTargetList().CreateTarget (debugger,
- emptyFileSpec,
+ NULL,
emptyArchSpec,
false,
m_remote_platform_sp,
Modified: lldb/branches/windows/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/branches/windows/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Fri Oct 19 04:07:45 2012
@@ -533,10 +533,9 @@
if (target == NULL)
{
TargetSP new_target_sp;
- FileSpec emptyFileSpec;
error = debugger.GetTargetList().CreateTarget (debugger,
- emptyFileSpec,
+ NULL,
NULL,
false,
NULL,
Modified: lldb/branches/windows/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/branches/windows/source/Plugins/Platform/Windows/PlatformWindows.cpp Fri Oct 19 04:07:45 2012
@@ -496,10 +496,10 @@
ArchSpec emptyArchSpec;
error = debugger.GetTargetList().CreateTarget (debugger,
- emptyFileSpec,
- emptyArchSpec,
+ NULL,
+ NULL,
false,
- m_remote_platform_sp,
+ NULL,
new_target_sp);
target = new_target_sp.get();
}
Modified: lldb/branches/windows/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/branches/windows/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Fri Oct 19 04:07:45 2012
@@ -373,10 +373,9 @@
if (target == NULL)
{
TargetSP new_target_sp;
- FileSpec emptyFileSpec;
error = debugger.GetTargetList().CreateTarget (debugger,
- emptyFileSpec,
+ NULL,
NULL,
false,
NULL,
Modified: lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.cpp Fri Oct 19 04:07:45 2012
@@ -843,7 +843,7 @@
// Check that the launch was a success.
if (!args->m_error.Success())
{
- StopLaunchOpThread();
+ StopOpThread();
error = args->m_error;
return;
}
@@ -898,10 +898,10 @@
}
}
- // Check that the launch was a success.
+ // Check that the attach was a success.
if (!args->m_error.Success())
{
- StopAttachOpThread();
+ StopOpThread();
error = args->m_error;
return;
}
@@ -936,18 +936,6 @@
Host::ThreadCreate(g_thread_name, LaunchOpThread, args, &error);
}
-void
-ProcessMonitor::StopLaunchOpThread()
-{
- lldb::thread_result_t result;
-
- if (!IS_VALID_LLDB_HOST_THREAD(m_operation_thread))
- return;
-
- Host::ThreadCancel(m_operation_thread, NULL);
- Host::ThreadJoin(m_operation_thread, &result, NULL);
-}
-
void *
ProcessMonitor::LaunchOpThread(void *arg)
{
@@ -1142,19 +1130,15 @@
Host::ThreadCreate(g_thread_name, AttachOpThread, args, &error);
}
-void
-ProcessMonitor::StopAttachOpThread()
-{
- assert(!"Not implemented yet!!!");
-}
-
void *
ProcessMonitor::AttachOpThread(void *arg)
{
AttachArgs *args = static_cast<AttachArgs*>(arg);
- if (!Attach(args))
+ if (!Attach(args)) {
+ sem_post(&args->m_semaphore);
return NULL;
+ }
ServeOperation(args);
return NULL;
@@ -1665,16 +1649,16 @@
return result;
}
-bool
+lldb_private::Error
ProcessMonitor::Detach()
{
- bool result;
lldb_private::Error error;
- DetachOperation op(error);
- result = error.Success();
- DoOperation(&op);
+ if (m_pid != LLDB_INVALID_PROCESS_ID) {
+ DetachOperation op(error);
+ DoOperation(&op);
+ }
StopMonitor();
- return result;
+ return error;
}
bool
@@ -1705,13 +1689,25 @@
ProcessMonitor::StopMonitor()
{
StopMonitoringChildProcess();
- StopLaunchOpThread();
+ StopOpThread();
CloseFD(m_terminal_fd);
CloseFD(m_client_fd);
CloseFD(m_server_fd);
}
void
+ProcessMonitor::StopOpThread()
+{
+ lldb::thread_result_t result;
+
+ if (!IS_VALID_LLDB_HOST_THREAD(m_operation_thread))
+ return;
+
+ Host::ThreadCancel(m_operation_thread, NULL);
+ Host::ThreadJoin(m_operation_thread, &result, NULL);
+}
+
+void
ProcessMonitor::CloseFD(int &fd)
{
if (fd != -1)
Modified: lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.h (original)
+++ lldb/branches/windows/source/Plugins/Process/Linux/ProcessMonitor.h Fri Oct 19 04:07:45 2012
@@ -158,7 +158,7 @@
bool
BringProcessIntoLimbo();
- bool
+ lldb_private::Error
Detach();
@@ -213,9 +213,6 @@
void
StartLaunchOpThread(LaunchArgs *args, lldb_private::Error &error);
- void
- StopLaunchOpThread();
-
static void *
LaunchOpThread(void *arg);
@@ -238,9 +235,6 @@
void
StartAttachOpThread(AttachArgs *args, lldb_private::Error &error);
- void
- StopAttachOpThread();
-
static void *
AttachOpThread(void *args);
@@ -287,6 +281,10 @@
void
StopMonitor();
+ /// Stops the operation thread used to attach/launch a process.
+ void
+ StopOpThread();
+
void
CloseFD(int &fd);
};
Modified: lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Fri Oct 19 04:07:45 2012
@@ -676,7 +676,7 @@
MakeRequestPacketHeader (command, request_packet, command_length);
request_packet.PutMaxHex64 (addr, command_addr_byte_size);
request_packet.PutHex32 (src_len);
- request_packet.PutBytesAsRawHex8(src, src_len);
+ request_packet.PutRawBytes(src, src_len);
DataExtractor reply_packet;
if (SendRequestAndGetReply (command, request_sequence_id, request_packet, reply_packet))
Modified: lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp Fri Oct 19 04:07:45 2012
@@ -179,6 +179,9 @@
if (m_thread_stop_reason_stop_id != process_stop_id ||
(m_actual_stop_info_sp && !m_actual_stop_info_sp->IsValid()))
{
+ if (IsStillAtLastBreakpointHit())
+ return m_actual_stop_info_sp;
+
if (m_cached_stop_info_sp)
SetStopInfo (m_cached_stop_info_sp);
else
Modified: lldb/branches/windows/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp Fri Oct 19 04:07:45 2012
@@ -60,7 +60,7 @@
const bool stop_other_threads = true;
const bool discard_on_error = true;
const bool try_all_threads = true;
- const uint32_t single_thread_timeout_usec = 500000;
+ const uint32_t timeout_usec = 500000;
addr_t prot_arg, flags_arg = 0;
if (prot == eMmapProtNone)
@@ -115,7 +115,7 @@
stop_other_threads,
try_all_threads,
discard_on_error,
- single_thread_timeout_usec,
+ timeout_usec,
error_strm);
if (result == eExecutionCompleted)
{
@@ -164,7 +164,7 @@
const bool stop_other_threads = true;
const bool discard_on_error = true;
const bool try_all_threads = true;
- const uint32_t single_thread_timeout_usec = 500000;
+ const uint32_t timeout_usec = 500000;
AddressRange munmap_range;
if (sc.GetAddressRange(range_scope, 0, use_inline_block_range, munmap_range))
@@ -193,7 +193,7 @@
stop_other_threads,
try_all_threads,
discard_on_error,
- single_thread_timeout_usec,
+ timeout_usec,
error_strm);
if (result == eExecutionCompleted)
{
Modified: lldb/branches/windows/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Fri Oct 19 04:07:45 2012
@@ -604,7 +604,7 @@
repeating_frames = true;
}
}
- if (repeating_frames)
+ if (repeating_frames && abi->FunctionCallsChangeCFA())
{
if (log)
{
Modified: lldb/branches/windows/source/Plugins/Process/Utility/ThreadMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/Utility/ThreadMemory.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/Utility/ThreadMemory.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/Utility/ThreadMemory.cpp Fri Oct 19 04:07:45 2012
@@ -107,6 +107,9 @@
if (m_thread_stop_reason_stop_id != process_stop_id ||
(m_actual_stop_info_sp && !m_actual_stop_info_sp->IsValid()))
{
+ if (IsStillAtLastBreakpointHit())
+ return m_actual_stop_info_sp;
+
// If GetGDBProcess().SetThreadStopInfo() doesn't find a stop reason
// for this thread, then m_actual_stop_info_sp will not ever contain
// a valid stop reason and the "m_actual_stop_info_sp->IsValid() == false"
Modified: lldb/branches/windows/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Oct 19 04:07:45 2012
@@ -48,6 +48,8 @@
#include "lldb/Core/Value.h"
#include "lldb/Host/Symbols.h"
#include "lldb/Host/TimeValue.h"
+#include "lldb/Interpreter/CommandInterpreter.h"
+#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/DynamicLoader.h"
#include "lldb/Target/Target.h"
@@ -3038,31 +3040,129 @@
#include "lldb/Interpreter/CommandObject.h"
#include "lldb/Interpreter/CommandObjectMultiword.h"
-class CommandObjectProcessGDBRemotePacket : public CommandObjectParsed
+class CommandObjectProcessGDBRemotePacketHistory : public CommandObjectParsed
{
private:
public:
- CommandObjectProcessGDBRemotePacket(CommandInterpreter &interpreter) :
+ CommandObjectProcessGDBRemotePacketHistory(CommandInterpreter &interpreter) :
CommandObjectParsed (interpreter,
- "process plugin packet",
- "Send a custom packet through the GDB remote protocol and print the answer.",
+ "process plugin packet history",
+ "Dumps the packet history buffer. ",
NULL)
{
}
- ~CommandObjectProcessGDBRemotePacket ()
+ ~CommandObjectProcessGDBRemotePacketHistory ()
{
}
bool
DoExecute (Args& command, CommandReturnObject &result)
{
- printf ("CommandObjectProcessGDBRemotePacket::DoExecute() called!!!\n");
+ const size_t argc = command.GetArgumentCount();
+ if (argc == 0)
+ {
+ ProcessGDBRemote *process = (ProcessGDBRemote *)m_interpreter.GetExecutionContext().GetProcessPtr();
+ if (process)
+ {
+ process->GetGDBRemote().DumpHistory(result.GetOutputStream());
+ result.SetStatus (eReturnStatusSuccessFinishResult);
+ return true;
+ }
+ }
+ else
+ {
+ result.AppendErrorWithFormat ("'%s' takes no arguments", m_cmd_name.c_str());
+ }
+ result.SetStatus (eReturnStatusFailed);
+ return false;
+ }
+};
+
+class CommandObjectProcessGDBRemotePacketSend : public CommandObjectParsed
+{
+private:
+
+public:
+ CommandObjectProcessGDBRemotePacketSend(CommandInterpreter &interpreter) :
+ CommandObjectParsed (interpreter,
+ "process plugin packet send",
+ "Send a custom packet through the GDB remote protocol and print the answer. "
+ "The packet header and footer will automatically be added to the packet prior to sending and stripped from the result.",
+ NULL)
+ {
+ }
+
+ ~CommandObjectProcessGDBRemotePacketSend ()
+ {
+ }
+
+ bool
+ DoExecute (Args& command, CommandReturnObject &result)
+ {
+ const size_t argc = command.GetArgumentCount();
+ if (argc == 0)
+ {
+ result.AppendErrorWithFormat ("'%s' takes a one or more packet content arguments", m_cmd_name.c_str());
+ result.SetStatus (eReturnStatusFailed);
+ return false;
+ }
+
+ ProcessGDBRemote *process = (ProcessGDBRemote *)m_interpreter.GetExecutionContext().GetProcessPtr();
+ if (process)
+ {
+ const StateType state = process->GetState();
+
+ if (StateIsStoppedState (state, true))
+ {
+ for (size_t i=0; i<argc; ++ i)
+ {
+ const char *packet_cstr = command.GetArgumentAtIndex(0);
+ bool send_async = false;
+ StringExtractorGDBRemote response;
+ process->GetGDBRemote().SendPacketAndWaitForResponse(packet_cstr, response, send_async);
+ result.SetStatus (eReturnStatusSuccessFinishResult);
+ Stream &output_strm = result.GetOutputStream();
+ output_strm.Printf (" packet: %s\n", packet_cstr);
+ const std::string &response_str = response.GetStringRef();
+ if (response_str.empty())
+ output_strm.PutCString ("response: \nerror: UNIMPLEMENTED\n");
+ else
+ output_strm.Printf ("response: %s\n", response.GetStringRef().c_str());
+ }
+ }
+ else
+ {
+ result.AppendErrorWithFormat ("process must be stopped in order to send GDB remote packets, state is %s", StateAsCString (state));
+ result.SetStatus (eReturnStatusFailed);
+ return false;
+ }
+
+ }
return true;
}
};
+class CommandObjectProcessGDBRemotePacket : public CommandObjectMultiword
+{
+private:
+
+public:
+ CommandObjectProcessGDBRemotePacket(CommandInterpreter &interpreter) :
+ CommandObjectMultiword (interpreter,
+ "process plugin packet",
+ "Commands that deal with GDB remote packets.",
+ NULL)
+ {
+ LoadSubCommand ("history", CommandObjectSP (new CommandObjectProcessGDBRemotePacketHistory (interpreter)));
+ LoadSubCommand ("send", CommandObjectSP (new CommandObjectProcessGDBRemotePacketSend (interpreter)));
+ }
+
+ ~CommandObjectProcessGDBRemotePacket ()
+ {
+ }
+};
class CommandObjectMultiwordProcessGDBRemote : public CommandObjectMultiword
{
@@ -3081,8 +3181,6 @@
}
};
-
-
CommandObject *
ProcessGDBRemote::GetPluginCommandObject()
{
Modified: lldb/branches/windows/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp Fri Oct 19 04:07:45 2012
@@ -225,6 +225,9 @@
if (m_thread_stop_reason_stop_id != process_stop_id ||
(m_actual_stop_info_sp && !m_actual_stop_info_sp->IsValid()))
{
+ if (IsStillAtLastBreakpointHit())
+ return m_actual_stop_info_sp;
+
// If GetGDBProcess().SetThreadStopInfo() doesn't find a stop reason
// for this thread, then m_actual_stop_info_sp will not ever contain
// a valid stop reason and the "m_actual_stop_info_sp->IsValid() == false"
Modified: lldb/branches/windows/source/Plugins/Process/mach-core/ThreadMachCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/Process/mach-core/ThreadMachCore.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/Process/mach-core/ThreadMachCore.cpp (original)
+++ lldb/branches/windows/source/Plugins/Process/mach-core/ThreadMachCore.cpp Fri Oct 19 04:07:45 2012
@@ -136,6 +136,9 @@
if (m_thread_stop_reason_stop_id != process_stop_id ||
(m_actual_stop_info_sp && !m_actual_stop_info_sp->IsValid()))
{
+ if (IsStillAtLastBreakpointHit())
+ return m_actual_stop_info_sp;
+
// TODO: can we query the initial state of the thread here?
// For now I am just going to pretend that a SIGSTOP happened.
Modified: lldb/branches/windows/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/branches/windows/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Oct 19 04:07:45 2012
@@ -5611,6 +5611,27 @@
// No children for this struct/union/class, lets finish it
ast.StartTagDeclarationDefinition (clang_type);
ast.CompleteTagDeclarationDefinition (clang_type);
+
+ if (tag == DW_TAG_structure_type) // this only applies in C
+ {
+ clang::QualType qual_type = clang::QualType::getFromOpaquePtr (clang_type);
+ const clang::RecordType *record_type = qual_type->getAs<clang::RecordType> ();
+
+ if (record_type)
+ {
+ clang::RecordDecl *record_decl = record_type->getDecl();
+
+ if (record_decl)
+ {
+ LayoutInfo layout_info;
+
+ layout_info.alignment = 0;
+ layout_info.bit_size = 0;
+
+ m_record_decl_to_layout_map.insert(std::make_pair(record_decl, layout_info));
+ }
+ }
+ }
}
else if (clang_type_was_created)
{
Modified: lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp (original)
+++ lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp Fri Oct 19 04:07:45 2012
@@ -109,7 +109,11 @@
// use later.
int instructions_since_last_prologue_insn = 0; // # of insns since last CFI was update
bool prologue_complete = false; // true if we have finished prologue setup
+
bool reinstate_prologue_next_instruction = false; // Next iteration, re-install the prologue row of CFI
+
+ bool last_instruction_restored_return_addr_reg = false; // re-install the prologue row of CFI if the next instruction is a branch immediate
+
UnwindPlan::RowSP prologue_completed_row; // copy of prologue row of CFI
// cache the pc register number (in whatever register numbering this UnwindPlan uses) for
@@ -118,7 +122,17 @@
RegisterInfo pc_reg_info;
if (m_inst_emulator_ap->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC, pc_reg_info))
pc_reg_num = pc_reg_info.kinds[unwind_plan.GetRegisterKind()];
+ else
+ pc_reg_num = LLDB_INVALID_REGNUM;
+ // cache the return address register number (in whatever register numbering this UnwindPlan uses) for
+ // quick reference during instruction parsing.
+ uint32_t ra_reg_num = LLDB_INVALID_REGNUM;
+ RegisterInfo ra_reg_info;
+ if (m_inst_emulator_ap->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA, ra_reg_info))
+ ra_reg_num = ra_reg_info.kinds[unwind_plan.GetRegisterKind()];
+ else
+ ra_reg_num = LLDB_INVALID_REGNUM;
for (size_t idx=0; idx<num_instructions; ++idx)
{
@@ -159,6 +173,7 @@
// If there are any instructions past this, there must have been flow control over this
// epilogue so we'll reinstate the original prologue setup instructions.
UnwindPlan::Row::RegisterLocation pc_regloc;
+ UnwindPlan::Row::RegisterLocation ra_regloc;
if (prologue_complete
&& pc_reg_num != LLDB_INVALID_REGNUM
&& m_curr_row->GetRegisterInfo (pc_reg_num, pc_regloc)
@@ -168,13 +183,25 @@
log->Printf("UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly -- pc is <same>, restore prologue instructions.");
reinstate_prologue_next_instruction = true;
}
+ else if (prologue_complete
+ && ra_reg_num != LLDB_INVALID_REGNUM
+ && m_curr_row->GetRegisterInfo (ra_reg_num, ra_regloc)
+ && ra_regloc.IsSame())
+ {
+ if (log && log->GetVerbose())
+ log->Printf("UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly -- lr is <same>, restore prologue instruction if the next instruction is a branch immediate.");
+ last_instruction_restored_return_addr_reg = true;
+ }
}
else
{
// If the previous instruction was a return-to-caller (epilogue), and we're still executing
// instructions in this function, there must be a code path that jumps over that epilogue.
+ // Also detect the case where we epilogue & branch imm to another function (tail-call opt)
+ // instead of a normal pop lr-into-pc exit.
// Reinstate the frame setup from the prologue.
- if (reinstate_prologue_next_instruction)
+ if (reinstate_prologue_next_instruction
+ || (m_curr_insn_is_branch_immediate && last_instruction_restored_return_addr_reg))
{
if (log && log->GetVerbose())
log->Printf("UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly -- Reinstating prologue instruction set");
@@ -189,8 +216,20 @@
m_curr_row.reset(newrow);
reinstate_prologue_next_instruction = false;
+ last_instruction_restored_return_addr_reg = false;
+ m_curr_insn_is_branch_immediate = false;
}
+ // clear both of these if either one wasn't set
+ if (last_instruction_restored_return_addr_reg)
+ {
+ last_instruction_restored_return_addr_reg = false;
+ }
+ if (m_curr_insn_is_branch_immediate)
+ {
+ m_curr_insn_is_branch_immediate = false;
+ }
+
// If we haven't seen any prologue instructions for a while (4 instructions in a row),
// the function prologue has probably completed. Save a copy of that Row.
if (prologue_complete == false && instructions_since_last_prologue_insn++ > 3)
@@ -544,7 +583,6 @@
case EmulateInstruction::eContextAdjustPC:
case EmulateInstruction::eContextRegisterStore:
case EmulateInstruction::eContextRegisterLoad:
- case EmulateInstruction::eContextRelativeBranchImmediate:
case EmulateInstruction::eContextAbsoluteBranchRegister:
case EmulateInstruction::eContextSupervisorCall:
case EmulateInstruction::eContextTableBranchReadMemory:
@@ -568,6 +606,15 @@
// }
break;
+ case EmulateInstruction::eContextRelativeBranchImmediate:
+ {
+
+ {
+ m_curr_insn_is_branch_immediate = true;
+ }
+ }
+ break;
+
case EmulateInstruction::eContextPopRegisterOffStack:
{
const uint32_t reg_num = reg_info->kinds[m_unwind_plan_ptr->GetRegisterKind()];
Modified: lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h (original)
+++ lldb/branches/windows/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h Fri Oct 19 04:07:45 2012
@@ -135,6 +135,7 @@
m_unwind_plan_ptr (NULL),
m_curr_row (),
m_curr_row_modified (false),
+ m_curr_insn_is_branch_immediate (false),
m_cfa_reg_info (),
m_fp_is_cfa (false),
m_register_values (),
@@ -164,6 +165,7 @@
lldb_private::UnwindPlan* m_unwind_plan_ptr;
lldb_private::UnwindPlan::RowSP m_curr_row;
bool m_curr_row_modified;
+ bool m_curr_insn_is_branch_immediate;
typedef std::map<uint64_t, uint64_t> PushedRegisterToAddrMap;
uint64_t m_initial_sp;
lldb_private::RegisterInfo m_cfa_reg_info;
Modified: lldb/branches/windows/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Symbol/ClangASTContext.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/branches/windows/source/Symbol/ClangASTContext.cpp Fri Oct 19 04:07:45 2012
@@ -380,7 +380,7 @@
m_language_options_ap(),
m_source_manager_ap(),
m_diagnostics_engine_ap(),
- m_target_options_ap(),
+ m_target_options_rp(),
m_target_info_ap(),
m_identifier_table_ap(),
m_selector_table_ap(),
@@ -403,7 +403,7 @@
m_selector_table_ap.reset();
m_identifier_table_ap.reset();
m_target_info_ap.reset();
- m_target_options_ap.reset();
+ m_target_options_rp.reset();
m_diagnostics_engine_ap.reset();
m_source_manager_ap.reset();
m_language_options_ap.reset();
@@ -418,7 +418,7 @@
m_language_options_ap.reset();
m_source_manager_ap.reset();
m_diagnostics_engine_ap.reset();
- m_target_options_ap.reset();
+ m_target_options_rp.reset();
m_target_info_ap.reset();
m_identifier_table_ap.reset();
m_selector_table_ap.reset();
@@ -610,13 +610,14 @@
TargetOptions *
ClangASTContext::getTargetOptions()
{
- if (m_target_options_ap.get() == NULL && !m_target_triple.empty())
+ if (m_target_options_rp.getPtr() == NULL && !m_target_triple.empty())
{
- m_target_options_ap.reset (new TargetOptions());
- if (m_target_options_ap.get())
- m_target_options_ap->Triple = m_target_triple;
+ m_target_options_rp.reset ();
+ m_target_options_rp = new TargetOptions();
+ if (m_target_options_rp.getPtr() != NULL)
+ m_target_options_rp->Triple = m_target_triple;
}
- return m_target_options_ap.get();
+ return m_target_options_rp.getPtr();
}
@@ -3652,11 +3653,10 @@
{
QualType qual_type(QualType::getFromOpaquePtr(clang_type));
const clang::Type::TypeClass type_class = qual_type->getTypeClass();
- switch (type_class)
+ if (type_class == clang::Type::Builtin)
{
- case clang::Type::Builtin:
switch (cast<clang::BuiltinType>(qual_type)->getKind())
-
+ {
case clang::BuiltinType::Void: return eBasicTypeVoid;
case clang::BuiltinType::Bool: return eBasicTypeBool;
case clang::BuiltinType::Char_S: return eBasicTypeSignedChar;
@@ -3695,6 +3695,7 @@
case clang::BuiltinType::BuiltinFn:
case clang::BuiltinType::ARCUnbridgedCast:
return eBasicTypeOther;
+ }
}
}
Modified: lldb/branches/windows/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Target/Process.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Target/Process.cpp (original)
+++ lldb/branches/windows/source/Target/Process.cpp Fri Oct 19 04:07:45 2012
@@ -94,12 +94,14 @@
{
{ "disable-memory-cache" , OptionValue::eTypeBoolean, false, DISABLE_MEM_CACHE_DEFAULT, NULL, NULL, "Disable reading and caching of memory in fixed-size units." },
{ "extra-startup-command", OptionValue::eTypeArray , false, OptionValue::eTypeString, NULL, NULL, "A list containing extra commands understood by the particular process plugin used." },
+ { "python-os-plugin-path", OptionValue::eTypeFileSpec, false, 0, NULL, NULL, "A path to a python OS plug-in module file that contains a OperatingSystemPlugIn class." },
{ NULL , OptionValue::eTypeInvalid, false, 0, NULL, NULL, NULL }
};
enum {
ePropertyDisableMemCache,
- ePropertyExtraStartCommand
+ ePropertyExtraStartCommand,
+ ePropertyPythonOSPluginPath
};
ProcessProperties::ProcessProperties (bool is_global) :
@@ -145,6 +147,20 @@
m_collection_sp->SetPropertyAtIndexFromArgs(NULL, idx, args);
}
+FileSpec
+ProcessProperties::GetPythonOSPluginPath () const
+{
+ const uint32_t idx = ePropertyPythonOSPluginPath;
+ return m_collection_sp->GetPropertyAtIndexAsFileSpec(NULL, idx);
+}
+
+void
+ProcessProperties::SetPythonOSPluginPath (const FileSpec &file)
+{
+ const uint32_t idx = ePropertyPythonOSPluginPath;
+ m_collection_sp->SetPropertyAtIndexAsFileSpec(NULL, idx, file);
+}
+
void
ProcessInstanceInfo::Dump (Stream &s, Platform *platform) const
{
@@ -302,9 +318,7 @@
void
-ProcessInfo::SetArguments (char const **argv,
- bool first_arg_is_executable,
- bool first_arg_is_executable_and_argument)
+ProcessInfo::SetArguments (char const **argv, bool first_arg_is_executable)
{
m_arguments.SetArguments (argv);
@@ -319,18 +333,11 @@
// could be a remote platform path
const bool resolve = false;
m_executable.SetFile(first_arg, resolve);
-
- // If argument zero is an executable and shouldn't be included
- // in the arguments, remove it from the front of the arguments
- if (first_arg_is_executable_and_argument == false)
- m_arguments.DeleteArgumentAtIndex (0);
}
}
}
void
-ProcessInfo::SetArguments (const Args& args,
- bool first_arg_is_executable,
- bool first_arg_is_executable_and_argument)
+ProcessInfo::SetArguments (const Args& args, bool first_arg_is_executable)
{
// Copy all arguments
m_arguments = args;
@@ -346,11 +353,6 @@
// could be a remote platform path
const bool resolve = false;
m_executable.SetFile(first_arg, resolve);
-
- // If argument zero is an executable and shouldn't be included
- // in the arguments, remove it from the front of the arguments
- if (first_arg_is_executable_and_argument == false)
- m_arguments.DeleteArgumentAtIndex (0);
}
}
}
@@ -410,6 +412,9 @@
}
}
+#ifdef _WIN32
+char* getcwd(char* path, int max);
+#endif
bool
ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell (Error &error,
@@ -443,19 +448,57 @@
shell_executable = shell_resolved_path;
}
+ const char **argv = GetArguments().GetConstArgumentVector ();
+ if (argv == NULL || argv[0] == NULL)
+ return false;
Args shell_arguments;
std::string safe_arg;
shell_arguments.AppendArgument (shell_executable);
shell_arguments.AppendArgument ("-c");
-
StreamString shell_command;
if (will_debug)
{
+ // Add a modified PATH environment variable in case argv[0]
+ // is a relative path
+ const char *argv0 = argv[0];
+ if (argv0 && (argv0[0] != '/' && argv0[0] != '~'))
+ {
+ // We have a relative path to our executable which may not work if
+ // we just try to run "a.out" (without it being converted to "./a.out")
+ const char *working_dir = GetWorkingDirectory();
+ std::string new_path("PATH=");
+ const size_t empty_path_len = new_path.size();
+
+ if (working_dir && working_dir[0])
+ {
+ new_path += working_dir;
+ }
+ else
+ {
+ char current_working_dir[PATH_MAX];
+ const char *cwd = getcwd(current_working_dir, sizeof(current_working_dir));
+ if (cwd && cwd[0])
+ new_path += cwd;
+ }
+ const char *curr_path = getenv("PATH");
+ if (curr_path)
+ {
+ if (new_path.size() > empty_path_len)
+ new_path += ':';
+ new_path += curr_path;
+ }
+ new_path += ' ';
+ shell_command.PutCString(new_path.c_str());
+ }
+
shell_command.PutCString ("exec");
+
+#if defined(__APPLE__)
+ // Only Apple supports /usr/bin/arch being able to specify the architecture
if (GetArchitecture().IsValid())
{
shell_command.Printf(" /usr/bin/arch -arch %s", GetArchitecture().GetArchitectureName());
- // Set the resume count to 2:
+ // Set the resume count to 2:
// 1 - stop in shell
// 2 - stop in /usr/bin/arch
// 3 - then we will stop in our program
@@ -463,39 +506,36 @@
}
else
{
- // Set the resume count to 1:
+ // Set the resume count to 1:
// 1 - stop in shell
// 2 - then we will stop in our program
SetResumeCount(1);
}
+#else
+ // Set the resume count to 1:
+ // 1 - stop in shell
+ // 2 - then we will stop in our program
+ SetResumeCount(1);
+#endif
}
-
- const char **argv = GetArguments().GetConstArgumentVector ();
- if (argv)
+
+ if (first_arg_is_full_shell_command)
{
- if (first_arg_is_full_shell_command)
- {
- // There should only be one argument that is the shell command itself to be used as is
- if (argv[0] && !argv[1])
- shell_command.Printf("%s", argv[0]);
- else
- return false;
- }
+ // There should only be one argument that is the shell command itself to be used as is
+ if (argv[0] && !argv[1])
+ shell_command.Printf("%s", argv[0]);
else
- {
- for (size_t i=0; argv[i] != NULL; ++i)
- {
- const char *arg = Args::GetShellSafeArgument (argv[i], safe_arg);
- shell_command.Printf(" %s", arg);
- }
- }
- shell_arguments.AppendArgument (shell_command.GetString().c_str());
+ return false;
}
else
{
- return false;
+ for (size_t i=0; argv[i] != NULL; ++i)
+ {
+ const char *arg = Args::GetShellSafeArgument (argv[i], safe_arg);
+ shell_command.Printf(" %s", arg);
+ }
}
-
+ shell_arguments.AppendArgument (shell_command.GetString().c_str());
m_executable.SetFile(shell_executable, false);
m_arguments = shell_arguments;
return true;
@@ -3746,7 +3786,7 @@
}
StopInfoSP stop_info_sp = thread_sp->GetStopInfo ();
- if (stop_info_sp)
+ if (stop_info_sp && stop_info_sp->IsValid())
{
stop_info_sp->PerformAction(event_ptr);
// The stop action might restart the target. If it does, then we want to mark that in the
@@ -4138,9 +4178,9 @@
Process::RunThreadPlan (ExecutionContext &exe_ctx,
lldb::ThreadPlanSP &thread_plan_sp,
bool stop_others,
- bool try_all_threads,
+ bool run_others,
bool discard_on_error,
- uint32_t single_thread_timeout_usec,
+ uint32_t timeout_usec,
Stream &errors)
{
ExecutionResults return_value = eExecutionSetupError;
@@ -4265,6 +4305,8 @@
bool first_timeout = true;
bool do_resume = true;
+ const uint64_t default_one_thread_timeout_usec = 250000;
+ uint64_t computed_timeout = 0;
while (1)
{
@@ -4303,9 +4345,12 @@
if (stop_state != eStateRunning)
{
if (log)
- log->Printf("Process::RunThreadPlan(): didn't get running event after initial resume, got %s instead.", StateAsCString(stop_state));
+ log->Printf("Process::RunThreadPlan(): didn't get running event after "
+ "initial resume, got %s instead.",
+ StateAsCString(stop_state));
- errors.Printf("Didn't get running event after initial resume, got %s instead.", StateAsCString(stop_state));
+ errors.Printf("Didn't get running event after initial resume, got %s instead.",
+ StateAsCString(stop_state));
return_value = eExecutionSetupError;
break;
}
@@ -4318,28 +4363,45 @@
// We set the timeout AFTER the resume, since the resume takes some time and we
// don't want to charge that to the timeout.
- if (single_thread_timeout_usec != 0)
+ if (first_timeout)
{
- // we have a > 0 timeout, let us set it so that we stop after the deadline
- real_timeout = TimeValue::Now();
- real_timeout.OffsetWithMicroSeconds(single_thread_timeout_usec);
-
- timeout_ptr = &real_timeout;
+ if (run_others)
+ {
+ // If we are running all threads then we take half the time to run all threads, bounded by
+ // .25 sec.
+ if (timeout_usec == 0)
+ computed_timeout = default_one_thread_timeout_usec;
+ else
+ {
+ computed_timeout = timeout_usec / 2;
+ if (computed_timeout > default_one_thread_timeout_usec)
+ {
+ computed_timeout = default_one_thread_timeout_usec;
+ }
+ timeout_usec -= computed_timeout;
+ }
+ }
+ else
+ {
+ computed_timeout = timeout_usec;
+ }
}
- else if (first_timeout)
+ else
{
- // if we are willing to wait "forever" we still need to have an initial timeout
- // this timeout is going to induce all threads to run when hit. we do this so that
- // we can avoid ending locked up because of multithreaded contention issues
+ computed_timeout = timeout_usec;
+ }
+
+ if (computed_timeout != 0)
+ {
+ // we have a > 0 timeout, let us set it so that we stop after the deadline
real_timeout = TimeValue::Now();
- real_timeout.OffsetWithNanoSeconds(500000000UL);
+ real_timeout.OffsetWithMicroSeconds(computed_timeout);
+
timeout_ptr = &real_timeout;
}
else
{
- timeout_ptr = NULL; // if we are in a no-timeout scenario, then we only need a fake timeout the first time through
- // at this point in the code, all threads will be running so we are willing to wait forever, and do not
- // need a timeout
+ timeout_ptr = NULL;
}
}
else
@@ -4476,21 +4538,21 @@
// Not really sure what to do if Halt fails here...
if (log) {
- if (try_all_threads)
+ if (run_others)
{
if (first_timeout)
- log->Printf ("Process::RunThreadPlan(): Running function with timeout: %d timed out, "
- "trying with all threads enabled.",
- single_thread_timeout_usec);
+ log->Printf ("Process::RunThreadPlan(): Running function with timeout: %lld timed out, "
+ "trying for %d usec with all threads enabled.",
+ computed_timeout, timeout_usec);
else
log->Printf ("Process::RunThreadPlan(): Restarting function with all threads enabled "
- "and timeout: %d timed out.",
- single_thread_timeout_usec);
+ "and timeout: %d timed out, abandoning execution.",
+ timeout_usec);
}
else
log->Printf ("Process::RunThreadPlan(): Running function with timeout: %d timed out, "
- "halt and abandoning execution.",
- single_thread_timeout_usec);
+ "abandoning execution.",
+ timeout_usec);
}
Error halt_error = Halt();
@@ -4531,7 +4593,7 @@
break;
}
- if (!try_all_threads)
+ if (!run_others)
{
if (log)
log->PutCString ("Process::RunThreadPlan(): try_all_threads was false, we stopped so now we're quitting.");
@@ -4910,7 +4972,8 @@
{
if (only_threads_with_stop_reason)
{
- if (thread->GetStopInfo().get() == NULL)
+ StopInfoSP stop_info_sp = thread->GetStopInfo();
+ if (stop_info_sp.get() == NULL || !stop_info_sp->IsValid())
continue;
}
thread->GetStatus (strm,
Modified: lldb/branches/windows/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Target/Target.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Target/Target.cpp (original)
+++ lldb/branches/windows/source/Target/Target.cpp Fri Oct 19 04:07:45 2012
@@ -1747,7 +1747,8 @@
expr_cstr,
prefix,
result_valobj_sp,
- options.GetSingleThreadTimeoutUsec());
+ options.GetRunOthers(),
+ options.GetTimeoutUsec());
}
}
@@ -2150,7 +2151,8 @@
{ "max-children-count" , OptionValue::eTypeSInt64 , false, 256 , NULL, NULL, "Maximum number of children to expand in any level of depth." },
{ "max-string-summary-length" , OptionValue::eTypeSInt64 , false, 1024 , NULL, NULL, "Maximum number of characters to show when using %s in summary strings." },
{ "breakpoints-use-platform-avoid-list", OptionValue::eTypeBoolean , false, true , NULL, NULL, "Consult the platform module avoid list when setting non-module specific breakpoints." },
- { "run-args" , OptionValue::eTypeArgs , false, 0 , NULL, NULL, "A list containing all the arguments to be passed to the executable when it is run." },
+ { "arg0" , OptionValue::eTypeString , false, 0 , NULL, NULL, "The first argument passed to the program in the argument array which can be different from the executable itself." },
+ { "run-args" , OptionValue::eTypeArgs , false, 0 , NULL, NULL, "A list containing all the arguments to be passed to the executable when it is run. Note that this does NOT include the argv[0] which is in target.arg0." },
{ "env-vars" , OptionValue::eTypeDictionary, false, OptionValue::eTypeString , NULL, NULL, "A list of all the environment variables to be passed to the executable's environment, and their values." },
{ "inherit-env" , OptionValue::eTypeBoolean , false, true , NULL, NULL, "Inherit the environment from the process that is running LLDB." },
{ "input-path" , OptionValue::eTypeFileSpec , false, 0 , NULL, NULL, "The file/path to be used by the executable program for reading its standard input." },
@@ -2165,6 +2167,7 @@
"Always checking for inlined breakpoint locations can be expensive (memory and time), so we try to minimize the "
"times we look for inlined locations. This setting allows you to control exactly which strategy is used when settings "
"file and line breakpoints." },
+ { "disable-kext-loading" , OptionValue::eTypeBoolean , false, false , NULL, NULL, "Disable kext image loading in a Darwin kernel debug session" },
{ NULL , OptionValue::eTypeInvalid , false, 0 , NULL, NULL, NULL }
};
enum
@@ -2179,6 +2182,7 @@
ePropertyMaxChildrenCount,
ePropertyMaxSummaryLength,
ePropertyBreakpointUseAvoidList,
+ ePropertyArg0,
ePropertyRunArgs,
ePropertyEnvVars,
ePropertyInheritEnv,
@@ -2187,7 +2191,8 @@
ePropertyErrorPath,
ePropertyDisableASLR,
ePropertyDisableSTDIO,
- ePropertyInlineStrategy
+ ePropertyInlineStrategy,
+ ePropertyDisableKextLoading
};
@@ -2370,6 +2375,20 @@
return (InlineStrategy)m_collection_sp->GetPropertyAtIndexAsEnumeration (NULL, idx, g_properties[idx].default_uint_value);
}
+const char *
+TargetProperties::GetArg0 () const
+{
+ const uint32_t idx = ePropertyArg0;
+ return m_collection_sp->GetPropertyAtIndexAsString (NULL, idx, NULL);
+}
+
+void
+TargetProperties::SetArg0 (const char *arg)
+{
+ const uint32_t idx = ePropertyArg0;
+ m_collection_sp->SetPropertyAtIndexAsString (NULL, idx, arg);
+}
+
bool
TargetProperties::GetRunArguments (Args &args) const
{
@@ -2501,6 +2520,20 @@
return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);
}
+bool
+TargetProperties::GetDisableKextLoading () const
+{
+ const uint32_t idx = ePropertyDisableKextLoading;
+ return m_collection_sp->GetPropertyAtIndexAsBoolean (NULL, idx, g_properties[idx].default_uint_value != 0);
+}
+
+void
+TargetProperties::SetDisableKextLoading (bool b)
+{
+ const uint32_t idx = ePropertyDisableKextLoading;
+ m_collection_sp->SetPropertyAtIndexAsBoolean (NULL, idx, b);
+}
+
const TargetPropertiesSP &
Target::GetGlobalProperties()
{
Modified: lldb/branches/windows/source/Target/TargetList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Target/TargetList.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Target/TargetList.cpp (original)
+++ lldb/branches/windows/source/Target/TargetList.cpp Fri Oct 19 04:07:45 2012
@@ -57,7 +57,7 @@
Error
TargetList::CreateTarget (Debugger &debugger,
- const FileSpec& file,
+ const char *user_exe_path,
const char *triple_cstr,
bool get_dependent_files,
const OptionGroupPlatform *platform_options,
@@ -112,39 +112,29 @@
platform_arch = arch;
error = TargetList::CreateTarget (debugger,
- file,
+ user_exe_path,
platform_arch,
get_dependent_files,
platform_sp,
target_sp);
-
- if (target_sp)
- {
- if (file.GetDirectory())
- {
- FileSpec file_dir;
- file_dir.GetDirectory() = file.GetDirectory();
- target_sp->GetExecutableSearchPaths ().Append (file_dir);
- }
- }
return error;
}
+#ifdef _WIN32
+char* getcwd(char* path, int max);
+#endif
+
Error
-TargetList::CreateTarget
-(
- Debugger &debugger,
- const FileSpec& file,
- const ArchSpec& specified_arch,
- bool get_dependent_files,
- PlatformSP &platform_sp,
- TargetSP &target_sp
-)
+TargetList::CreateTarget (Debugger &debugger,
+ const char *user_exe_path,
+ const ArchSpec& specified_arch,
+ bool get_dependent_files,
+ PlatformSP &platform_sp,
+ TargetSP &target_sp)
{
Timer scoped_timer (__PRETTY_FUNCTION__,
- "TargetList::CreateTarget (file = '%s/%s', arch = '%s')",
- file.GetDirectory().AsCString(),
- file.GetFilename().AsCString(),
+ "TargetList::CreateTarget (file = '%s', arch = '%s')",
+ user_exe_path,
specified_arch.GetArchitectureName());
Error error;
@@ -168,12 +158,28 @@
if (!arch.IsValid())
arch = specified_arch;
-
+ FileSpec file (user_exe_path, false);
if (file)
{
+ if (file.IsRelativeToCurrentWorkingDirectory())
+ {
+ // Ignore paths that start with "./" and "../"
+ if (!((user_exe_path[0] == '.' && user_exe_path[1] == '/') ||
+ (user_exe_path[0] == '.' && user_exe_path[1] == '.' && user_exe_path[2] == '/')))
+ {
+ char cwd[PATH_MAX];
+ if (getcwd (cwd, sizeof(cwd)))
+ {
+ std::string cwd_user_exe_path (cwd);
+ cwd_user_exe_path += '/';
+ cwd_user_exe_path += user_exe_path;
+ file.SetFile(cwd_user_exe_path.c_str(), false);
+ }
+ }
+ }
+
ModuleSP exe_module_sp;
- FileSpec resolved_file(file);
if (platform_sp)
{
FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths());
@@ -217,9 +223,22 @@
if (target_sp)
{
+ if (user_exe_path)
+ {
+ // Use exactly what the user typed as the first argument when we exec or posix_spawn
+ target_sp->SetArg0 (user_exe_path);
+ }
+ if (file.GetDirectory())
+ {
+ FileSpec file_dir;
+ file_dir.GetDirectory() = file.GetDirectory();
+ target_sp->GetExecutableSearchPaths ().Append (file_dir);
+ }
Mutex::Locker locker(m_target_list_mutex);
m_selected_target_idx = m_target_list.size();
m_target_list.push_back(target_sp);
+
+
}
return error;
Modified: lldb/branches/windows/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Target/Thread.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/source/Target/Thread.cpp (original)
+++ lldb/branches/windows/source/Target/Thread.cpp Fri Oct 19 04:07:45 2012
@@ -440,9 +440,11 @@
// telling the current plan it will resume, since we might change what the current
// plan is.
- lldb::addr_t pc = GetRegisterContext()->GetPC();
- BreakpointSiteSP bp_site_sp = GetProcess()->GetBreakpointSiteList().FindByAddress(pc);
- if (bp_site_sp && bp_site_sp->IsEnabled())
+ StopReason stop_reason = lldb::eStopReasonInvalid;
+ StopInfoSP stop_info_sp = GetStopInfo();
+ if (stop_info_sp.get())
+ stop_reason = stop_info_sp->GetStopReason();
+ if (stop_reason == lldb::eStopReasonBreakpoint)
{
// Note, don't assume there's a ThreadPlanStepOverBreakpoint, the target may not require anything
// special to step over a breakpoint.
@@ -506,7 +508,7 @@
// If the WillResume for the plan says we are faking a resume, then it will have set an appropriate stop info.
// In that case, don't reset it here.
- if (need_to_resume)
+ if (need_to_resume && resume_state != eStateSuspended)
{
m_actual_stop_info_sp.reset();
}
@@ -1715,3 +1717,22 @@
ClearStackFrames ();
m_reg_context_sp.reset();
}
+
+const bool
+Thread::IsStillAtLastBreakpointHit ()
+{
+ // If we are currently stopped at a breakpoint, always return that stopinfo and don't reset it.
+ // This allows threads to maintain their breakpoint stopinfo, such as when thread-stepping in
+ // multithreaded programs.
+ if (m_actual_stop_info_sp) {
+ StopReason stop_reason = m_actual_stop_info_sp->GetStopReason();
+ if (stop_reason == lldb::eStopReasonBreakpoint) {
+ uint64_t value = m_actual_stop_info_sp->GetValue();
+ lldb::addr_t pc = GetRegisterContext()->GetPC();
+ BreakpointSiteSP bp_site_sp = GetProcess()->GetBreakpointSiteList().FindByAddress(pc);
+ if (bp_site_sp && value == bp_site_sp->GetID())
+ return true;
+ }
+ }
+ return false;
+}
Modified: lldb/branches/windows/test/expression_command/test/TestExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/test/expression_command/test/TestExprs.py?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/test/expression_command/test/TestExprs.py (original)
+++ lldb/branches/windows/test/expression_command/test/TestExprs.py Fri Oct 19 04:07:45 2012
@@ -71,8 +71,8 @@
# (const char *) $7 = ...
self.expect("expression argv[0]",
- substrs = ["(const char *)",
- os.path.join(self.mydir, "a.out")])
+ substrs = ["(const char *)",
+ "a.out"])
# (const char *) $8 = 0x... "/Volumes/data/lldb/svn/trunk/test/expression_command/test/a.out"
@python_api_test
Modified: lldb/branches/windows/test/functionalities/command_script/welcome.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/test/functionalities/command_script/welcome.py?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/test/functionalities/command_script/welcome.py (original)
+++ lldb/branches/windows/test/functionalities/command_script/welcome.py Fri Oct 19 04:07:45 2012
@@ -18,10 +18,11 @@
return None
def print_wait_impl(debugger, args, result, dict):
- print 'Trying to do long task..';
+ result.SetImmediateOutputFile(sys.stdout)
+ result.PutCString('Trying to do long task..')
import time
time.sleep(1)
- print 'Still doing long task..';
+ result.PutCString('Still doing long task..')
time.sleep(1)
result.PutCString('Done; if you saw the delays I am doing OK')
return None
Modified: lldb/branches/windows/test/lang/cpp/dynamic-value/pass-to-base.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/test/lang/cpp/dynamic-value/pass-to-base.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/test/lang/cpp/dynamic-value/pass-to-base.cpp (original)
+++ lldb/branches/windows/test/lang/cpp/dynamic-value/pass-to-base.cpp Fri Oct 19 04:07:45 2012
@@ -23,7 +23,8 @@
doSomething (A &anotherA)
{
printf ("In A %p doing something with %d.\n", this, m_a_value);
- printf ("Also have another A at %p: %d.\n", &anotherA, anotherA.Value()); // Break here in doSomething.
+ int tmp_value = anotherA.Value();
+ printf ("Also have another A at %p: %d.\n", &anotherA, tmp_value); // Break here in doSomething.
}
int
Modified: lldb/branches/windows/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/test/lldbtest.py?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/test/lldbtest.py (original)
+++ lldb/branches/windows/test/lldbtest.py Fri Oct 19 04:07:45 2012
@@ -801,7 +801,7 @@
os.environ["LLDB_SESSION_DIRNAME"])
if not os.path.isdir(dname):
os.mkdir(dname)
- fname = os.path.join(dname, "%s-%s-%s-%s.log" % (prefix, self.getArchitecture(), self.getCompiler(), self.id()))
+ fname = os.path.join(dname, "%s-%s-%s-%s.log" % (prefix, self.getArchitecture(), "_".join(self.getCompiler().split('/')), self.id()))
with open(fname, "w") as f:
import datetime
print >> f, "Session info generated @", datetime.datetime.now().ctime()
Modified: lldb/branches/windows/tools/driver/DriverEvents.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/tools/driver/DriverEvents.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/tools/driver/DriverEvents.cpp (original)
+++ lldb/branches/windows/tools/driver/DriverEvents.cpp Fri Oct 19 04:07:45 2012
@@ -203,11 +203,17 @@
// output orderings and problems with the prompt.
m_debugger.GetCommandInterpreter().HandleCommand (command_string, result, true);
- if (result.GetOutputSize() > 0)
- m_io_channel_ap->OutWrite (result.GetOutput(), result.GetOutputSize(), NO_ASYNC);
-
- if (result.GetErrorSize() > 0)
- m_io_channel_ap->OutWrite (result.GetError(), result.GetErrorSize(), NO_ASYNC);
+ const bool only_if_no_immediate = true;
+
+ const size_t output_size = result.GetOutputSize();
+
+ if (output_size > 0)
+ m_io_channel_ap->OutWrite (result.GetOutput(only_if_no_immediate), output_size, NO_ASYNC);
+
+ const size_t error_size = result.GetErrorSize();
+
+ if (error_size > 0)
+ m_io_channel_ap->OutWrite (result.GetError(only_if_no_immediate), error_size, NO_ASYNC);
// We are done getting and running our command, we can now clear the
// m_waiting_for_command so we can get another one.
Modified: lldb/branches/windows/tools/driver/IOChannel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/tools/driver/IOChannel.cpp?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/tools/driver/IOChannel.cpp (original)
+++ lldb/branches/windows/tools/driver/IOChannel.cpp Fri Oct 19 04:07:45 2012
@@ -557,7 +557,7 @@
void
IOChannel::OutWrite (const char *buffer, size_t len, bool asynchronous)
{
- if (len == 0)
+ if (len == 0 || buffer == NULL)
return;
// We're in the process of exiting -- IOChannel::Run() has already completed
@@ -581,7 +581,7 @@
void
IOChannel::ErrWrite (const char *buffer, size_t len, bool asynchronous)
{
- if (len == 0)
+ if (len == 0 || buffer == NULL)
return;
// Use the mutex to make sure OutWrite and ErrWrite do not interfere with each other's output.
Modified: lldb/branches/windows/www/build.html
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/www/build.html?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/www/build.html (original)
+++ lldb/branches/windows/www/build.html Fri Oct 19 04:07:45 2012
@@ -61,9 +61,11 @@
<li><a href="http://www.thrysoee.dk/editline">libedit</a></li>
<li><a href="http://www.python.org">Python</a></li>
</ul>
- <p>So for example, on a Fedora system one might say:</p>
+ <p>So for example, on a Fedora system one might run:</p>
<code>> yum install swig python-devel libedit-devel</code>
- <p>If building using GCC instead of Clang, GCC 4.6.2 or newer is recommended.</p>
+ <p>On an Ubuntu system one might run:</p>
+ <code>> sudo apt-get install swig python-dev libedit-dev </code>
+ <p>If building using GCC instead of Clang, GCC 4.6.2 or newer is required.</p>
<ul>
<li><a href="http://gcc.gnu.org">GCC</a></li>
</ul>
@@ -94,48 +96,35 @@
<br>> svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
</code>
- <p>In general, LLDB requires specific revisions of both LLVM and Clang in order to
- build. This requirement insulates LLDB a bit from the constant development
- happening in both of these projects. The required revision can be discovered by
- consulting the Perl script <tt>$lldb/scripts/build-llvm.pl</tt> and locating the
- <tt>$llvm_revision</tt> variable. At the time of this writing, the required revision
- is <tt>r127682</tt>, so we might check and revert our LLVM and Clang trees to the
- required state as follows:</p>
- <code>> grep -m 1 llvm_revision $lldb/scripts/build-llvm.pl
- <br>our $llvm_revision = "127682";
- <br>> cd $clang
- <br>> svn update -r 127682
- <br>> cd $llvm
- <br>> svn update -r 127682</code>
-
+ <p>In general, building the LLDB trunk revision requires trunk revisions of both
+ LLVM and Clang.
<p>It is highly recommended that you build the system out of tree. Create a second
build directory and configure the LLVM project tree to your specifications as
- outlined in LLVM’s <em>Getting Started Guide</em>. For Linux development the x86
- backend and JIT compiler should be enabled. A typical build procedure might be:</p>
+ outlined in LLVM’s <em>Getting Started Guide</em>. A typical build procedure
+ might be:</p>
<code>> cd $llvm/..
<br>> mkdir build
<br>> cd build
- <br>> $llvm/configure --enable-targets=x86 --enable-jit --enable-libcpp
- <br>> make CXXFLAGS+=c++11</code>
-
+ <br>> $llvm/configure --enable-libcpp
+ <br>> make CXXFLAGS=-std=c++11</code>
<p>Note that once both LLVM and Clang have been configured and built it is not
necessary to perform a top-level <tt>make</tt> to rebuild changes made only to LLDB.
- You can build from the <tt>build/tools/lldb</tt> subdirectory as well. If your
- compiler doesn't support c++11 or libc++, you may need to tweak or remove the last
- parameter to the configure script and make command.</p>
+ You can run <tt>make</tt> from the <tt>build/tools/lldb</tt> subdirectory as well. If your
+ compiler doesn't support libc++, you may need to tweak or remove the last
+ parameter to the configure script.</p>
<h2>Additional Notes</h2>
<p>LLDB has a Python scripting capability and supplies it’s own Python module,
- <tt>lldb.py</tt>, built alongside the <tt>lldb</tt> binary. Python needs to know where to
- look for this module when LLDB starts up. There are two options available:</p>
- <ol class="arabic">
- <li>
- <p>Keep a copy of <tt>lldb.py</tt> in the current working directory when starting lldb.</p>
- </li>
- <li>
- <p>Set <tt>PYTHONPATH</tt> to point to the directory holding <tt>lldb.py</tt>.</p>
- </li>
- </ol>
+ <tt>lldb</tt>, built alongside the <tt>lldb</tt> binary. Python needs to know where to
+ look for this module when LLDB starts up. To tell python the location of LLDB, set
+ <tt>PYTHONPATH</tt> environment variable.
+ <p>In bash with a <tt>Debug+Asserts</tt> build (the default if configure is invoked
+ like in the example on this page) one might run:</p>
+ <code>> export PYTHONPATH=$llvm/build/Debug+Asserts/lib/python2.7/site-packages</code>
+ <p>If you used different configure flags, or have a different version of python,
+ you may need to adjust the above to suit your needs. To test that the lldb python module
+ is built correctly and is available to Python, run:</p>
+ <code>> python -c 'import lldb'</code></p>
</div>
<div class="postfooter"></div>
</div>
@@ -143,4 +132,4 @@
</div>
</div>
</body>
-</html>
+</html>
Modified: lldb/branches/windows/www/lldb-gdb.html
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/www/lldb-gdb.html?rev=166275&r1=166274&r2=166275&view=diff
==============================================================================
--- lldb/branches/windows/www/lldb-gdb.html (original)
+++ lldb/branches/windows/www/lldb-gdb.html Fri Oct 19 04:07:45 2012
@@ -311,6 +311,30 @@
<b>(lldb)</b> br s -S count<br>
</td>
</tr>
+ <tr><td class="header" colspan="2">Set a breakpoint by regular expression on function name.</td></tr>
+
+ <tr>
+ <td class="content">
+ <b>(gdb)</b> rbreak regular-expression<br>
+ </td>
+ <td class="content">
+ <b>(lldb)</b> breakpoint set --regex regular-expression<br>
+ <b>(lldb)</b> br s -r regular-expression<br>
+ </td>
+ </tr>
+
+ <tr><td class="header" colspan="2">Set a breakpoint by regular expression on source file contents.</td></tr>
+
+ <tr>
+ <td class="content">
+ <b>(gdb)</b> shell grep -e -n pattern source-file<br>
+ <b>(gdb)</b> break source-file:CopyLineNumbers<br>
+ </td>
+ <td class="content">
+ <b>(lldb)</b> breakpoint set --source-pattern regular-expression --file SourceFile<br>
+ <b>(lldb)</b> br s -p regular-expression -f file<br>
+ </td>
+ </tr>
<tr><td class="header" colspan="2">List all breakpoints.</td></tr>
<tr>
@@ -694,6 +718,26 @@
</td>
</tr>
+ <tr><td class="header" colspan="2">Write a new decimal value '123' to the current thread register 'rax'.</td></tr>
+ <tr>
+ <td class="content">
+ <b>(gdb)</b> p $rax = 123<br>
+ </td>
+ <td class="content">
+ <b>(lldb)</b> register write rax 123<br>
+ </td>
+ </tr>
+
+ <tr><td class="header" colspan="2">Skip 8 bytes ahead of the current program counter (instruction pointer). Note that we use backticks to evaluate an expression and insert the scalar result in LLDB.</td></tr>
+ <tr>
+ <td class="content">
+ <b>(gdb)</b> jump *$pc+8<br>
+ </td>
+ <td class="content">
+ <b>(lldb)</b> register write pc `$pc+8`<br>
+ </td>
+ </tr>
+
<tr><td class="header" colspan="2">Show the general purpose registers for the current thread formatted as <b>signed decimal</b>. LLDB tries to use
the same format characters as <b>printf(3)</b> when possible. Type "help format" to see the full list of format specifiers.</td></tr>
<tr>
More information about the lldb-commits
mailing list