[Lldb-commits] [lldb] r154639 - in /lldb/branches/lldb-platform-work: ./ include/lldb/ include/lldb/API/ include/lldb/Core/ include/lldb/Symbol/ include/lldb/Target/ scripts/Python/interface/ source/API/ source/Host/common/ source/Plugins/Disassembler/llvm/ source/Plugins/ObjectFile/Mach-O/ source/Plugins/SymbolFile/DWARF/ source/Symbol/ test/lang/objc/forward-decl/ test/lang/objc/hidden-ivars/ test/lang/objc/objc-property/ test/lang/objc/real-definition/ test/make/
Johnny Chen
johnny.chen at apple.com
Thu Apr 12 17:38:16 PDT 2012
Author: johnny
Date: Thu Apr 12 19:38:16 2012
New Revision: 154639
URL: http://llvm.org/viewvc/llvm-project?rev=154639&view=rev
Log:
Merge changes from ToT:
svn merge -r 154627:154638 https://johnny@llvm.org/svn/llvm-project/lldb/trunk .
Modified:
lldb/branches/lldb-platform-work/ (props changed)
lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h
lldb/branches/lldb-platform-work/include/lldb/API/SBInstruction.h
lldb/branches/lldb-platform-work/include/lldb/Core/Address.h
lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h
lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTContext.h
lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTImporter.h
lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangExternalASTSourceCommon.h
lldb/branches/lldb-platform-work/include/lldb/Symbol/ObjectFile.h
lldb/branches/lldb-platform-work/include/lldb/Target/Target.h
lldb/branches/lldb-platform-work/include/lldb/lldb-enumerations.h
lldb/branches/lldb-platform-work/include/lldb/lldb-private-enumerations.h
lldb/branches/lldb-platform-work/scripts/Python/interface/SBAddress.i
lldb/branches/lldb-platform-work/scripts/Python/interface/SBInstruction.i
lldb/branches/lldb-platform-work/source/API/SBAddress.cpp
lldb/branches/lldb-platform-work/source/API/SBInstruction.cpp
lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp
lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h
lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/branches/lldb-platform-work/source/Symbol/ClangASTContext.cpp
lldb/branches/lldb-platform-work/source/Symbol/ClangASTImporter.cpp
lldb/branches/lldb-platform-work/source/Symbol/ClangExternalASTSourceCommon.cpp
lldb/branches/lldb-platform-work/test/lang/objc/forward-decl/TestForwardDecl.py
lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/TestHiddenIvars.py
lldb/branches/lldb-platform-work/test/lang/objc/objc-property/TestObjCProperty.py
lldb/branches/lldb-platform-work/test/lang/objc/real-definition/TestRealDefinition.py
lldb/branches/lldb-platform-work/test/make/Makefile.rules
Propchange: lldb/branches/lldb-platform-work/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Apr 12 19:38:16 2012
@@ -1 +1 @@
-/lldb/trunk:154224-154627
+/lldb/trunk:154224-154638
Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBAddress.h Thu Apr 12 19:38:16 2012
@@ -100,6 +100,8 @@
lldb::SBLineEntry
GetLineEntry ();
+ lldb::AddressClass
+ GetAddressClass ();
protected:
Modified: lldb/branches/lldb-platform-work/include/lldb/API/SBInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/API/SBInstruction.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/API/SBInstruction.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/API/SBInstruction.h Thu Apr 12 19:38:16 2012
@@ -39,6 +39,9 @@
SBAddress
GetAddress();
+ lldb::AddressClass
+ GetAddressClass ();
+
const char *
GetMnemonic (lldb::SBTarget target);
Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Address.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Address.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Address.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Address.h Thu Apr 12 19:38:16 2012
@@ -250,7 +250,7 @@
DumpStyle fallback_style = DumpStyleInvalid,
uint32_t addr_byte_size = UINT32_MAX) const;
- AddressClass
+ lldb::AddressClass
GetAddressClass () const;
//------------------------------------------------------------------
Modified: lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Core/Disassembler.h Thu Apr 12 19:38:16 2012
@@ -30,7 +30,7 @@
{
public:
Instruction (const Address &address,
- AddressClass addr_class = eAddressClassInvalid);
+ lldb::AddressClass addr_class = lldb::eAddressClassInvalid);
virtual
~Instruction();
@@ -64,7 +64,7 @@
virtual void
CalculateMnemonicOperandsAndComment (ExecutionContextScope *exe_scope) = 0;
- AddressClass
+ lldb::AddressClass
GetAddressClass ();
void
@@ -72,7 +72,7 @@
{
// Invalidate the address class to lazily discover
// it if we need to.
- m_address_class = eAddressClassInvalid;
+ m_address_class = lldb::eAddressClassInvalid;
m_address = addr;
}
@@ -130,7 +130,7 @@
// The usual value will be eAddressClassCode, but often when
// disassembling memory, you might run into data. This can
// help us to disassemble appropriately.
- AddressClass m_address_class;
+ lldb::AddressClass m_address_class;
Opcode m_opcode; // The opcode for this instruction
std::string m_opcode_name;
std::string m_mnemocics;
Modified: lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTContext.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTContext.h Thu Apr 12 19:38:16 2012
@@ -143,6 +143,26 @@
static bool
GetCompleteDecl (clang::ASTContext *ast,
clang::Decl *decl);
+
+ void SetMetadata (uintptr_t object,
+ uint64_t metadata)
+ {
+ SetMetadata(getASTContext(), object, metadata);
+ }
+
+ static void
+ SetMetadata (clang::ASTContext *ast,
+ uintptr_t object,
+ uint64_t metadata);
+
+ uint64_t GetMetadata (uintptr_t object)
+ {
+ return GetMetadata(getASTContext(), object);
+ }
+
+ static uint64_t
+ GetMetadata (clang::ASTContext *ast,
+ uintptr_t object);
//------------------------------------------------------------------
// Basic Types
@@ -270,7 +290,8 @@
lldb::AccessType access_type,
const char *name,
int kind,
- lldb::LanguageType language);
+ lldb::LanguageType language,
+ clang::CXXRecordDecl **decl = NULL);
static clang::FieldDecl *
AddFieldToRecordType (clang::ASTContext *ast,
@@ -929,15 +950,6 @@
//------------------------------------------------------------------
static unsigned
GetTypeQualifiers(lldb::clang_type_t clang_type);
-
- //------------------------------------------------------------------
- // Flags
- //------------------------------------------------------------------
- static uint64_t
- GetTypeFlags(clang::ASTContext *ast, lldb::clang_type_t clang_type);
-
- static void
- SetTypeFlags(clang::ASTContext *ast, lldb::clang_type_t clang_type, uint64_t flags);
protected:
//------------------------------------------------------------------
// Classes that inherit from ClangASTContext can see and modify these
Modified: lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTImporter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTImporter.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTImporter.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangASTImporter.h Thu Apr 12 19:38:16 2012
@@ -80,6 +80,9 @@
return origin.Valid();
}
+ uint64_t
+ GetDeclMetadata (const clang::Decl *decl);
+
//
// Namespace maps
//
Modified: lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangExternalASTSourceCommon.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangExternalASTSourceCommon.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangExternalASTSourceCommon.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Symbol/ClangExternalASTSourceCommon.h Thu Apr 12 19:38:16 2012
@@ -42,6 +42,7 @@
{
public:
ClangExternalASTSourceCommon();
+ ~ClangExternalASTSourceCommon();
virtual uint64_t GetMetadata(uintptr_t object);
virtual void SetMetadata(uintptr_t object, uint64_t metadata);
Modified: lldb/branches/lldb-platform-work/include/lldb/Symbol/ObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Symbol/ObjectFile.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Symbol/ObjectFile.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Symbol/ObjectFile.h Thu Apr 12 19:38:16 2012
@@ -200,7 +200,7 @@
/// architecture (and object for archives). Returns zero if no
/// architecture or object has been selected.
//------------------------------------------------------------------
- virtual AddressClass
+ virtual lldb::AddressClass
GetAddressClass (lldb::addr_t file_addr);
//------------------------------------------------------------------
Modified: lldb/branches/lldb-platform-work/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Target/Target.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Target/Target.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Target/Target.h Thu Apr 12 19:38:16 2012
@@ -597,7 +597,7 @@
/// returned.
//------------------------------------------------------------------
lldb::addr_t
- GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class = lldb_private::eAddressClassInvalid) const;
+ GetCallableLoadAddress (lldb::addr_t load_addr, lldb::AddressClass addr_class = lldb::eAddressClassInvalid) const;
//------------------------------------------------------------------
/// Get \a load_addr as an opcode for this target.
@@ -612,7 +612,7 @@
/// returned.
//------------------------------------------------------------------
lldb::addr_t
- GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class = lldb_private::eAddressClassInvalid) const;
+ GetOpcodeLoadAddress (lldb::addr_t load_addr, lldb::AddressClass addr_class = lldb::eAddressClassInvalid) const;
protected:
void
Modified: lldb/branches/lldb-platform-work/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/lldb-enumerations.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/lldb-enumerations.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/lldb-enumerations.h Thu Apr 12 19:38:16 2012
@@ -626,6 +626,27 @@
eFrameCompareOlder
} FrameComparison;
+ //----------------------------------------------------------------------
+ // Address Class
+ //
+ // A way of classifying an address used for disassembling and setting
+ // breakpoints. Many object files can track exactly what parts of their
+ // object files are code, data and other information. This is of course
+ // above and beyond just looking at the section types. For example, code
+ // might contain PC relative data and the object file might be able to
+ // tell us that an address in code is data.
+ //----------------------------------------------------------------------
+ typedef enum AddressClass
+ {
+ eAddressClassInvalid,
+ eAddressClassUnknown,
+ eAddressClassCode,
+ eAddressClassCodeAlternateISA,
+ eAddressClassData,
+ eAddressClassDebug,
+ eAddressClassRuntime
+ } AddressClass;
+
} // namespace lldb
Modified: lldb/branches/lldb-platform-work/include/lldb/lldb-private-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/lldb-private-enumerations.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/lldb-private-enumerations.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/lldb-private-enumerations.h Thu Apr 12 19:38:16 2012
@@ -37,27 +37,6 @@
} AddressType;
//----------------------------------------------------------------------
-// Address Class
-//
-// A way of classifying an address used for disassembling and setting
-// breakpoints. Many object files can track exactly what parts of their
-// object files are code, data and other information. This is of course
-// above and beyond just looking at the section types. For example, code
-// might contain PC relative data and the object file might be able to
-// tell us that an address in code is data.
-//----------------------------------------------------------------------
-typedef enum AddressClass
-{
- eAddressClassInvalid,
- eAddressClassUnknown,
- eAddressClassCode,
- eAddressClassCodeAlternateISA,
- eAddressClassData,
- eAddressClassDebug,
- eAddressClassRuntime
-} AddressClass;
-
-//----------------------------------------------------------------------
// Votes - Need a tri-state, yes, no, no opinion...
//----------------------------------------------------------------------
typedef enum Vote
Modified: lldb/branches/lldb-platform-work/scripts/Python/interface/SBAddress.i
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/scripts/Python/interface/SBAddress.i?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/scripts/Python/interface/SBAddress.i (original)
+++ lldb/branches/lldb-platform-work/scripts/Python/interface/SBAddress.i Thu Apr 12 19:38:16 2012
@@ -93,6 +93,9 @@
lldb::addr_t offset);
+ lldb::AddressClass
+ GetAddressClass ();
+
%feature("docstring", "
//------------------------------------------------------------------
/// GetSymbolContext() and the following can lookup symbol information for a given address.
Modified: lldb/branches/lldb-platform-work/scripts/Python/interface/SBInstruction.i
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/scripts/Python/interface/SBInstruction.i?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/scripts/Python/interface/SBInstruction.i (original)
+++ lldb/branches/lldb-platform-work/scripts/Python/interface/SBInstruction.i Thu Apr 12 19:38:16 2012
@@ -27,9 +27,12 @@
bool
IsValid();
- SBAddress
+ lldb::SBAddress
GetAddress();
+ lldb::AddressClass
+ GetAddressClass ();
+
const char *
GetMnemonic (lldb::SBTarget target);
Modified: lldb/branches/lldb-platform-work/source/API/SBAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/API/SBAddress.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/API/SBAddress.cpp (original)
+++ lldb/branches/lldb-platform-work/source/API/SBAddress.cpp Thu Apr 12 19:38:16 2012
@@ -313,4 +313,11 @@
return sb_line_entry;
}
+AddressClass
+SBAddress::GetAddressClass ()
+{
+ if (m_opaque_ap.get())
+ return m_opaque_ap->GetAddressClass();
+ return eAddressClassInvalid;
+}
Modified: lldb/branches/lldb-platform-work/source/API/SBInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/API/SBInstruction.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/API/SBInstruction.cpp (original)
+++ lldb/branches/lldb-platform-work/source/API/SBInstruction.cpp Thu Apr 12 19:38:16 2012
@@ -237,3 +237,11 @@
return m_opaque_sp->TestEmulation (output_stream.get(), test_file);
}
+
+lldb::AddressClass
+SBInstruction::GetAddressClass ()
+{
+ if (m_opaque_sp.get())
+ return m_opaque_sp->GetAddressClass();
+ return eAddressClassInvalid;
+}
Modified: lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp Thu Apr 12 19:38:16 2012
@@ -29,6 +29,61 @@
#define ENABLE_MUTEX_ERROR_CHECKING 1
#endif
+#if ENABLE_MUTEX_ERROR_CHECKING
+#include <set>
+
+enum MutexAction
+{
+ eMutexActionInitialized,
+ eMutexActionDestroyed,
+ eMutexActionAssertInitialized
+};
+
+static bool
+error_check_mutex (pthread_mutex_t *m, MutexAction action)
+{
+ typedef std::set<pthread_mutex_t *> mutex_set;
+ static pthread_mutex_t g_mutex_set_mutex = PTHREAD_MUTEX_INITIALIZER;
+ mutex_set g_initialized_mutex_set;
+ mutex_set g_destroyed_mutex_set;
+
+ bool success = true;
+ int err;
+ // Manually call lock so we don't to any of this error checking
+ err = ::pthread_mutex_lock (&g_mutex_set_mutex);
+ assert(err == 0);
+ switch (action)
+ {
+ case eMutexActionInitialized:
+ // Make sure this isn't already in our initialized mutex set...
+ assert (g_initialized_mutex_set.find(m) == g_initialized_mutex_set.end());
+ // Remove this from the destroyed set in case it was ever in there
+ g_destroyed_mutex_set.erase(m);
+ // Add the mutex to the initialized set
+ g_initialized_mutex_set.insert(m);
+ break;
+
+ case eMutexActionDestroyed:
+ // Make sure this isn't already in our destroyed mutex set...
+ assert (g_destroyed_mutex_set.find(m) == g_destroyed_mutex_set.end());
+ // Remove this from the initialized so we can put it into the destroyed set
+ g_initialized_mutex_set.erase(m);
+ // Add the mutex to the destroyed set
+ g_destroyed_mutex_set.insert(m);
+ break;
+ case eMutexActionAssertInitialized:
+ // This function will return true if "m" is in the initialized mutex set
+ success = g_initialized_mutex_set.find(m) != g_initialized_mutex_set.end();
+ break;
+ }
+ // Manually call unlock so we don't to any of this error checking
+ err = ::pthread_mutex_unlock (&g_mutex_set_mutex);
+ assert(err == 0);
+ return success;
+}
+
+#endif
+
using namespace lldb_private;
//----------------------------------------------------------------------
@@ -147,6 +202,10 @@
{
int err;
err = ::pthread_mutex_init (&m_mutex, NULL);
+#if ENABLE_MUTEX_ERROR_CHECKING
+ if (err == 0)
+ error_check_mutex (&m_mutex, eMutexActionInitialized);
+#endif
assert(err == 0);
}
@@ -182,6 +241,10 @@
}
assert(err == 0);
err = ::pthread_mutex_init (&m_mutex, &attr);
+#if ENABLE_MUTEX_ERROR_CHECKING
+ if (err == 0)
+ error_check_mutex (&m_mutex, eMutexActionInitialized);
+#endif
assert(err == 0);
err = ::pthread_mutexattr_destroy (&attr);
assert(err == 0);
@@ -197,7 +260,9 @@
int err;
err = ::pthread_mutex_destroy (&m_mutex);
#if ENABLE_MUTEX_ERROR_CHECKING
- if (err)
+ if (err == 0)
+ error_check_mutex (&m_mutex, eMutexActionDestroyed);
+ else
{
Host::SetCrashDescriptionWithFormat ("%s error: pthread_mutex_destroy() => err = %i (%s)", __PRETTY_FUNCTION__, err, strerror(err));
assert(err == 0);
@@ -219,7 +284,14 @@
Mutex::Lock (pthread_mutex_t *mutex_ptr)
{
DEBUG_LOG ("[%4.4x/%4.4x] pthread_mutex_lock (%p)...\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), mutex_ptr);
+
+#if ENABLE_MUTEX_ERROR_CHECKING
+ error_check_mutex (mutex_ptr, eMutexActionAssertInitialized);
+#endif
+
int err = ::pthread_mutex_lock (mutex_ptr);
+
+
#if ENABLE_MUTEX_ERROR_CHECKING
if (err)
{
@@ -234,6 +306,10 @@
int
Mutex::TryLock (pthread_mutex_t *mutex_ptr)
{
+#if ENABLE_MUTEX_ERROR_CHECKING
+ error_check_mutex (mutex_ptr, eMutexActionAssertInitialized);
+#endif
+
int err = ::pthread_mutex_trylock (mutex_ptr);
DEBUG_LOG ("[%4.4x/%4.4x] pthread_mutex_trylock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), mutex_ptr, err);
return err;
@@ -242,7 +318,12 @@
int
Mutex::Unlock (pthread_mutex_t *mutex_ptr)
{
+#if ENABLE_MUTEX_ERROR_CHECKING
+ error_check_mutex (mutex_ptr, eMutexActionAssertInitialized);
+#endif
+
int err = ::pthread_mutex_unlock (mutex_ptr);
+
#if ENABLE_MUTEX_ERROR_CHECKING
if (err)
{
Modified: lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVM.h Thu Apr 12 19:38:16 2012
@@ -20,7 +20,7 @@
{
public:
InstructionLLVM (const lldb_private::Address &addr,
- lldb_private::AddressClass addr_class,
+ lldb::AddressClass addr_class,
EDDisassemblerRef disassembler,
llvm::Triple::ArchType arch_type);
Modified: lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Thu Apr 12 19:38:16 2012
@@ -32,7 +32,7 @@
public:
InstructionLLVMC (DisassemblerLLVMC &disasm,
const lldb_private::Address &address,
- lldb_private::AddressClass addr_class) :
+ AddressClass addr_class) :
Instruction(address, addr_class),
m_is_valid(false),
m_disasm(disasm),
@@ -350,7 +350,7 @@
}
template <bool Reparse> bool Parse (const lldb_private::Address &address,
- lldb_private::AddressClass addr_class,
+ AddressClass addr_class,
const DataExtractor &extractor,
uint32_t data_offset,
lldb_private::ExecutionContextScope *exe_scope)
Modified: lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h Thu Apr 12 19:38:16 2012
@@ -88,7 +88,7 @@
virtual size_t
GetAddressByteSize () const;
- virtual lldb_private::AddressClass
+ virtual lldb::AddressClass
GetAddressClass (lldb::addr_t file_addr);
virtual lldb_private::Symtab *
Modified: lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp Thu Apr 12 19:38:16 2012
@@ -109,6 +109,7 @@
else if (::strcasecmp (arg, "pubtypes") == 0) flag_bits &= ~DWARF_LOG_DEBUG_PUBTYPES;
else if (::strcasecmp (arg, "aranges") == 0) flag_bits &= ~DWARF_LOG_DEBUG_ARANGES;
else if (::strcasecmp (arg, "lookups") == 0) flag_bits &= ~DWARF_LOG_LOOKUPS;
+ else if (::strcasecmp (arg, "map") == 0) flag_bits &= ~DWARF_LOG_DEBUG_MAP;
else if (::strcasecmp (arg, "default") == 0) flag_bits &= ~DWARF_LOG_DEFAULT;
else if (::strncasecmp(arg, "comp", 4) == 0) flag_bits &= ~DWARF_LOG_TYPE_COMPLETION;
else
@@ -152,6 +153,7 @@
else if (::strcasecmp (arg, "pubtypes") == 0) flag_bits |= DWARF_LOG_DEBUG_PUBTYPES;
else if (::strcasecmp (arg, "aranges") == 0) flag_bits |= DWARF_LOG_DEBUG_ARANGES;
else if (::strcasecmp (arg, "lookups") == 0) flag_bits |= DWARF_LOG_LOOKUPS;
+ else if (::strcasecmp (arg, "map") == 0) flag_bits |= DWARF_LOG_DEBUG_MAP;
else if (::strcasecmp (arg, "default") == 0) flag_bits |= DWARF_LOG_DEFAULT;
else if (::strncasecmp(arg, "comp", 4) == 0) flag_bits |= DWARF_LOG_TYPE_COMPLETION;
else
@@ -181,7 +183,8 @@
" pubnames - log the parsing if .debug_pubnames\n"
" pubtypes - log the parsing if .debug_pubtypes\n"
" lookups - log any lookups that happen by name, regex, or address\n\n"
- " completion - log struct/unions/class type completions\n\n",
+ " completion - log struct/unions/class type completions\n\n"
+ " map - log insertions of object files into DWARF debug maps\n\n",
SymbolFileDWARF::GetPluginNameStatic());
}
Modified: lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h Thu Apr 12 19:38:16 2012
@@ -25,6 +25,7 @@
#define DWARF_LOG_DEBUG_ARANGES (1u << 5)
#define DWARF_LOG_LOOKUPS (1u << 6)
#define DWARF_LOG_TYPE_COMPLETION (1u << 7)
+#define DWARF_LOG_DEBUG_MAP (1u << 8)
#define DWARF_LOG_ALL (UINT32_MAX)
#define DWARF_LOG_DEFAULT (DWARF_LOG_DEBUG_INFO)
Modified: lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Apr 12 19:38:16 2012
@@ -1667,6 +1667,8 @@
member_type->GetClangLayoutType(),
accessibility,
bit_size);
+
+ GetClangASTContext().SetMetadata((uintptr_t)field_decl, MakeUserID(die->GetOffset()));
}
else
{
@@ -1736,6 +1738,8 @@
prop_setter_name,
prop_getter_name,
prop_attributes);
+
+ GetClangASTContext().SetMetadata((uintptr_t)ivar_decl, MakeUserID(die->GetOffset()));
}
}
}
@@ -3815,6 +3819,8 @@
storage);
assert(param_var_decl);
function_param_decls.push_back(param_var_decl);
+
+ GetClangASTContext().SetMetadata((uintptr_t)param_var_decl, MakeUserID(die->GetOffset()));
}
}
}
@@ -5161,17 +5167,23 @@
template_param_infos);
clang_type = ast.CreateClassTemplateSpecializationType (class_specialization_decl);
clang_type_was_created = true;
+
+ GetClangASTContext().SetMetadata((uintptr_t)class_template_decl, MakeUserID(die->GetOffset()));
+ GetClangASTContext().SetMetadata((uintptr_t)class_specialization_decl, MakeUserID(die->GetOffset()));
}
}
if (!clang_type_was_created)
{
clang_type_was_created = true;
+ clang::CXXRecordDecl *record_decl;
clang_type = ast.CreateRecordType (decl_ctx,
accessibility,
type_name_cstr,
tag_decl_kind,
- class_language);
+ class_language,
+ &record_decl);
+ GetClangASTContext().SetMetadata((uintptr_t)record_decl, MakeUserID(die->GetOffset()));
}
}
@@ -5530,6 +5542,7 @@
accessibility);
LinkDeclContextToDIE(ClangASTContext::GetAsDeclContext(objc_method_decl), die);
type_handled = objc_method_decl != NULL;
+ GetClangASTContext().SetMetadata((uintptr_t)objc_method_decl, MakeUserID(die->GetOffset()));
}
}
else if (is_cxx_method)
@@ -5634,6 +5647,8 @@
Host::SetCrashDescription (NULL);
type_handled = cxx_method_decl != NULL;
+
+ GetClangASTContext().SetMetadata((uintptr_t)cxx_method_decl, MakeUserID(die->GetOffset()));
}
}
else
@@ -5698,6 +5713,8 @@
ast.SetFunctionParameters (function_decl,
&function_param_decls.front(),
function_param_decls.size());
+
+ GetClangASTContext().SetMetadata((uintptr_t)function_decl, MakeUserID(die->GetOffset()));
}
}
type_sp.reset( new Type (MakeUserID(die->GetOffset()),
Modified: lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Thu Apr 12 19:38:16 2012
@@ -21,6 +21,7 @@
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/VariableList.h"
+#include "LogChannelDWARF.h"
#include "SymbolFileDWARF.h"
using namespace lldb;
@@ -106,6 +107,8 @@
Symtab* symtab = m_obj_file->GetSymtab();
if (symtab)
{
+ LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_MAP));
+
std::vector<uint32_t> oso_indexes;
// StreamFile s(stdout);
// symtab->Dump(&s, NULL, eSortOrderNone);
@@ -145,6 +148,9 @@
m_compile_unit_infos[i].last_symbol = symtab->SymbolAtIndex (sibling_idx - 1);
m_compile_unit_infos[i].first_symbol_index = symtab->GetIndexForSymbol(m_compile_unit_infos[i].so_symbol);
m_compile_unit_infos[i].last_symbol_index = symtab->GetIndexForSymbol(m_compile_unit_infos[i].last_symbol);
+
+ if (log)
+ log->Printf("Initialized OSO 0x%8.8x: file=%s", i, m_compile_unit_infos[i].oso_symbol->GetName().GetCString());
}
}
}
Modified: lldb/branches/lldb-platform-work/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Symbol/ClangASTContext.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Symbol/ClangASTContext.cpp Thu Apr 12 19:38:16 2012
@@ -1125,10 +1125,13 @@
#pragma mark Structure, Unions, Classes
clang_type_t
-ClangASTContext::CreateRecordType (DeclContext *decl_ctx, AccessType access_type, const char *name, int kind, LanguageType language)
+ClangASTContext::CreateRecordType (DeclContext *decl_ctx, AccessType access_type, const char *name, int kind, LanguageType language, CXXRecordDecl **out_decl)
{
ASTContext *ast = getASTContext();
assert (ast != NULL);
+
+ if (out_decl)
+ *out_decl = NULL;
if (decl_ctx == NULL)
decl_ctx = ast->getTranslationUnitDecl();
@@ -1153,6 +1156,9 @@
SourceLocation(),
name && name[0] ? &ast->Idents.get(name) : NULL);
+ if (out_decl)
+ *out_decl = decl;
+
if (!name)
decl->setAnonymousStructOrUnion(true);
@@ -6195,36 +6201,6 @@
return qual_type.getQualifiers().getCVRQualifiers();
}
-uint64_t
-GetTypeFlags(clang::ASTContext *ast, lldb::clang_type_t clang_type)
-{
- assert (clang_type);
-
- clang::ExternalASTSource *external_ast_source = ast->getExternalSource();
-
- if (!external_ast_source)
- return 0;
-
- ClangExternalASTSourceCommon *common_ast_source = static_cast<ClangExternalASTSourceCommon*>(external_ast_source);
-
- return common_ast_source->GetMetadata((uintptr_t)clang_type);
-}
-
-void
-SetTypeFlags(clang::ASTContext *ast, lldb::clang_type_t clang_type, uint64_t flags)
-{
- assert (clang_type);
-
- clang::ExternalASTSource *external_ast_source = ast->getExternalSource();
-
- if (!external_ast_source)
- return;
-
- ClangExternalASTSourceCommon *common_ast_source = static_cast<ClangExternalASTSourceCommon*>(external_ast_source);
-
- return common_ast_source->SetMetadata((uintptr_t)clang_type, flags);
-}
-
bool
ClangASTContext::GetCompleteType (clang::ASTContext *ast, lldb::clang_type_t clang_type)
{
@@ -6299,6 +6275,31 @@
}
}
+void
+ClangASTContext::SetMetadata (clang::ASTContext *ast,
+ uintptr_t object,
+ uint64_t metadata)
+{
+ ClangExternalASTSourceCommon *external_source =
+ static_cast<ClangExternalASTSourceCommon*>(ast->getExternalSource());
+
+ if (external_source)
+ external_source->SetMetadata(object, metadata);
+}
+
+uint64_t
+ClangASTContext::GetMetadata (clang::ASTContext *ast,
+ uintptr_t object)
+{
+ ClangExternalASTSourceCommon *external_source =
+ static_cast<ClangExternalASTSourceCommon*>(ast->getExternalSource());
+
+ if (external_source && external_source->HasMetadata(object))
+ return external_source->GetMetadata(object);
+ else
+ return 0;
+}
+
clang::DeclContext *
ClangASTContext::GetAsDeclContext (clang::CXXMethodDecl *cxx_method_decl)
{
Modified: lldb/branches/lldb-platform-work/source/Symbol/ClangASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Symbol/ClangASTImporter.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Symbol/ClangASTImporter.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Symbol/ClangASTImporter.cpp Thu Apr 12 19:38:16 2012
@@ -14,6 +14,7 @@
#include "lldb/Core/Module.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/ClangASTImporter.h"
+#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
#include "lldb/Symbol/ClangNamespaceDecl.h"
using namespace lldb_private;
@@ -237,6 +238,17 @@
return true;
}
+uint64_t
+ClangASTImporter::GetDeclMetadata (const clang::Decl *decl)
+{
+ DeclOrigin decl_origin = GetDeclOrigin(decl);
+
+ if (decl_origin.Valid())
+ return ClangASTContext::GetMetadata(decl_origin.ctx, (uintptr_t)decl_origin.decl);
+ else
+ return ClangASTContext::GetMetadata(&decl->getASTContext(), (uintptr_t)decl);
+}
+
ClangASTImporter::DeclOrigin
ClangASTImporter::GetDeclOrigin(const clang::Decl *decl)
{
@@ -414,18 +426,20 @@
{
if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from))
{
- log->Printf(" [ClangASTImporter] Imported (%sDecl*)%p, named %s (from (Decl*)%p)",
+ log->Printf(" [ClangASTImporter] Imported (%sDecl*)%p, named %s (from (Decl*)%p), metadata 0x%llx",
from->getDeclKindName(),
to,
from_named_decl->getName().str().c_str(),
- from);
+ from,
+ m_master.GetDeclMetadata(from));
}
else
{
- log->Printf(" [ClangASTImporter] Imported (%sDecl*)%p (from (Decl*)%p)",
+ log->Printf(" [ClangASTImporter] Imported (%sDecl*)%p (from (Decl*)%p), metadata 0x%llx",
from->getDeclKindName(),
to,
- from);
+ from,
+ m_master.GetDeclMetadata(from));
}
}
Modified: lldb/branches/lldb-platform-work/source/Symbol/ClangExternalASTSourceCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Symbol/ClangExternalASTSourceCommon.cpp?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Symbol/ClangExternalASTSourceCommon.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Symbol/ClangExternalASTSourceCommon.cpp Thu Apr 12 19:38:16 2012
@@ -13,9 +13,18 @@
#define ClangExternalASTSourceCommon_MAGIC (0x00112233aabbccddull)
+uint64_t g_TotalSizeOfMetadata = 0;
+
ClangExternalASTSourceCommon::ClangExternalASTSourceCommon() : clang::ExternalASTSource()
{
m_magic = ClangExternalASTSourceCommon_MAGIC;
+
+ g_TotalSizeOfMetadata += m_metadata.size();
+}
+
+ClangExternalASTSourceCommon::~ClangExternalASTSourceCommon()
+{
+ g_TotalSizeOfMetadata -= m_metadata.size();
}
uint64_t ClangExternalASTSourceCommon::GetMetadata (uintptr_t object)
@@ -29,7 +38,10 @@
{
assert (m_magic == ClangExternalASTSourceCommon_MAGIC);
+ uint64_t orig_size = m_metadata.size();
m_metadata[object] = metadata;
+ uint64_t new_size = m_metadata.size();
+ g_TotalSizeOfMetadata += (new_size - orig_size);
}
bool ClangExternalASTSourceCommon::HasMetadata (uintptr_t object)
Modified: lldb/branches/lldb-platform-work/test/lang/objc/forward-decl/TestForwardDecl.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/lang/objc/forward-decl/TestForwardDecl.py?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/lang/objc/forward-decl/TestForwardDecl.py (original)
+++ lldb/branches/lldb-platform-work/test/lang/objc/forward-decl/TestForwardDecl.py Thu Apr 12 19:38:16 2012
@@ -9,11 +9,13 @@
mydir = os.path.join("lang", "objc", "forward-decl")
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test
def test_expr_with_dsym(self):
self.buildDsym()
self.expr()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dwarf_test
def test_expr_with_dwarf(self):
self.buildDwarf()
Modified: lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/TestHiddenIvars.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/TestHiddenIvars.py?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/TestHiddenIvars.py (original)
+++ lldb/branches/lldb-platform-work/test/lang/objc/hidden-ivars/TestHiddenIvars.py Thu Apr 12 19:38:16 2012
@@ -9,23 +9,35 @@
mydir = os.path.join("lang", "objc", "hidden-ivars")
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test
def test_expr_with_dsym(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDsym()
self.expr()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dwarf_test
def test_expr_with_dwarf(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDwarf()
self.expr()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test
def test_frame_variable_with_dsym(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDsym()
self.frame_var()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dwarf_test
def test_frame_variable_with_dwarf(self):
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDwarf()
self.frame_var()
Modified: lldb/branches/lldb-platform-work/test/lang/objc/objc-property/TestObjCProperty.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/lang/objc/objc-property/TestObjCProperty.py?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/lang/objc/objc-property/TestObjCProperty.py (original)
+++ lldb/branches/lldb-platform-work/test/lang/objc/objc-property/TestObjCProperty.py Thu Apr 12 19:38:16 2012
@@ -17,6 +17,8 @@
@dsym_test
def test_objc_properties_with_dsym(self):
"""Test that expr uses the correct property getters and setters"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDsym()
self.do_test_properties()
@@ -24,6 +26,8 @@
@dwarf_test
def test_objc_properties_with_dwarf(self):
"""Test that expr uses the correct property getters and setters"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDwarf()
self.do_test_properties()
Modified: lldb/branches/lldb-platform-work/test/lang/objc/real-definition/TestRealDefinition.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/lang/objc/real-definition/TestRealDefinition.py?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/lang/objc/real-definition/TestRealDefinition.py (original)
+++ lldb/branches/lldb-platform-work/test/lang/objc/real-definition/TestRealDefinition.py Thu Apr 12 19:38:16 2012
@@ -9,27 +9,39 @@
mydir = os.path.join("lang", "objc", "real-definition")
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test
def test_frame_var_after_stop_at_interface_with_dsym(self):
"""Test that we can find the implementation for an objective C type"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDsym()
self.stop_at_interface()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dwarf_test
def test_frame_var_after_stop_at_interface_with_dwarf(self):
"""Test that we can find the implementation for an objective C type"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDwarf()
self.stop_at_interface()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dsym_test
def test_frame_var_after_stop_at_implementation_with_dsym(self):
"""Test that we can find the implementation for an objective C type"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDsym()
self.stop_at_implementation()
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
@dwarf_test
def test_frame_var_after_stop_at_implementation_with_dwarf(self):
"""Test that we can find the implementation for an objective C type"""
+ if self.getArchitecture() == 'i386':
+ self.skipTest("requires modern objc runtime")
self.buildDwarf()
self.stop_at_implementation()
Modified: lldb/branches/lldb-platform-work/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/make/Makefile.rules?rev=154639&r1=154638&r2=154639&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/make/Makefile.rules (original)
+++ lldb/branches/lldb-platform-work/test/make/Makefile.rules Thu Apr 12 19:38:16 2012
@@ -70,7 +70,7 @@
CXXFLAGS +=$(CFLAGS)
LD = $(CC)
LDFLAGS ?= $(CFLAGS)
-LDFLAGS += $(LD_EXTRAS)
+LDFLAGS += $(LD_EXTRAS) -arch $(ARCH)
OBJECTS =
EXE ?= a.out
More information about the lldb-commits
mailing list