Re: [Lldb-commits] [PATCH] D13942: Make SymbolFileDWARF::GetCachedSectionData thread safe

2015-10-22 Thread Pavel Labath via lldb-commits
labath accepted this revision.
labath added a comment.

The new version of the patch looks much cleaner than the old one. Thanks.



Comment at: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:641
@@ -669,3 +640,3 @@
 {
-if (m_flags.IsClear (got_flag))
+std::call_once(data_segment.m_flag, [this, sect_type, &data_segment]()
 {

shorter and probably more efficient:
`std::call_once(m_flag, &SFD::LoadSectionData, this, sect_type, 
std::ref(data_segment.m_data));`


http://reviews.llvm.org/D13942



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251003 - [RenderScript] Support for mips64 runtime hook

2015-10-22 Thread Ewan Crawford via lldb-commits
Author: ewancrawford
Date: Thu Oct 22 04:01:05 2015
New Revision: 251003

URL: http://llvm.org/viewvc/llvm-project?rev=251003&view=rev
Log:
[RenderScript] Support for mips64 runtime hook

Previously we could not hook the RS runtime on mips64 architectures.

Patch implements ABI specific code for inspecting function arguments.

Author: Dean De Leo, d...@codeplay.com


Modified:

lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=251003&r1=251002&r2=251003&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
 Thu Oct 22 04:01:05 2015
@@ -609,25 +609,30 @@ RenderScriptRuntime::GetArgSimple(Execut
 {
 const RegisterInfo* rArg = 
reg_ctx->GetRegisterInfoAtIndex(arg);
 RegisterValue rVal;
-reg_ctx->ReadRegister(rArg, rVal);
-(*data) = rVal.GetAsUInt32();
-success = true;
+success = reg_ctx->ReadRegister(rArg, rVal);
+if (success)
+{
+(*data) = rVal.GetAsUInt32();
+}
+else
+{
+if (log)
+log->Printf ("RenderScriptRuntime:: GetArgSimple - 
error reading ARM register: %d.", arg);
+}
 }
 else
 {
 uint64_t sp = reg_ctx->GetSP();
+uint32_t offset = (arg-4) * sizeof(uint32_t);
+process->ReadMemory(sp + offset, &data, sizeof(uint32_t), 
error);
+if (error.Fail())
+{
+if (log)
+log->Printf ("RenderScriptRuntime:: GetArgSimple - 
error reading ARM stack: %s.", error.AsCString());
+}
+else
 {
-uint32_t offset = (arg-4) * sizeof(uint32_t);
-process->ReadMemory(sp + offset, &data, sizeof(uint32_t), 
error);
-if (error.Fail())
-{
-if (log)
-log->Printf ("RenderScriptRuntime:: GetArgSimple - 
error reading ARM stack: %s.", error.AsCString());
-}
-else
-{
-success = true;
-}
+success = true;
 }
 }
 
@@ -660,6 +665,44 @@ RenderScriptRuntime::GetArgSimple(Execut
 }
 break;
 }
+case llvm::Triple::ArchType::mips64el:
+{
+// read from the registers
+if (arg < 8)
+{
+const RegisterInfo* rArg = reg_ctx->GetRegisterInfoAtIndex(arg 
+ 4);
+RegisterValue rVal;
+success = reg_ctx->ReadRegister(rArg, rVal);
+if (success)
+{
+(*data) = rVal.GetAsUInt64();
+}
+else
+{
+if (log)
+log->Printf("RenderScriptRuntime::GetArgSimple - 
Mips64 - Error reading the argument #%d", arg);
+}
+}
+
+// read from the stack
+else
+{
+uint64_t sp = reg_ctx->GetSP();
+uint32_t offset = (arg - 8) * sizeof(uint64_t);
+process->ReadMemory(sp + offset, &data, sizeof(uint64_t), 
error);
+if (error.Fail())
+{
+if (log)
+log->Printf ("RenderScriptRuntime::GetArgSimple - 
Mips64 - Error reading Mips64 stack: %s.", error.AsCString());
+}
+else
+{
+success = true;
+}
+}
+
+break;
+}
 default:
 {
 // invalid architecture
@@ -841,10 +884,12 @@ RenderScriptRuntime::LoadRuntimeHooks(ll
 
 if (targetArchType != llvm::Triple::ArchType::x86
 && targetArchType != llvm::Triple::ArchType::arm
-&& targetArchType != llvm::Triple::ArchType::aarch64)
+&& targetArchType != llvm::Triple::ArchType::aarch64
+&& targetArchType != llvm::Triple::ArchType::mips64el
+)
 {
 if (log)
-log->Printf ("RenderScriptRuntime::LoadRuntimeHooks - Unable to 
hook runtime. Only X86, ARM supported currently.");
+log->Printf ("RenderScriptR

Re: [Lldb-commits] [PATCH] D13964: Fix libstdc++ data formatters on Ubuntu 15.10 x86_64

2015-10-22 Thread Pavel Labath via lldb-commits
labath added a subscriber: labath.


Comment at: test/make/Makefile.rules:304
@@ -303,3 +303,3 @@
else
-   CXXFLAGS += -stdlib=libc++
+   CXXFLAGS += -stdlib=libc++ -DLLDB_USING_LIBCPP
LDFLAGS += -stdlib=libc++

Thanks for fixing the build.

When I get libc++ detection and skipping logic centralized, I'd like to remove 
this magic and make self.build() fail with a hard error in the case when the 
Makefile requests libc++ use, but the library is not present. The skipping 
logic should fire before self.build(), but it we still end up attempting to 
build, then that's something we should know about.

How does that sound?


http://reviews.llvm.org/D13964



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13970: Add support for abstract domain sockets.

2015-10-22 Thread Pavel Labath via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

lgtm


http://reviews.llvm.org/D13970



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL250335: Fix codesign command with cmake.

2015-10-22 Thread Dawn Perchik via lldb-commits
dawn added a comment.

One resolution would be to check for the cmake version and conditionally enable 
the new code, but that's beyond my capabilities - anyone know how?  If not, can 
we please revert this commit?


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL250335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13948: [AppleObjCRuntime] Don't bother looking for the runtime on non-apple targets

2015-10-22 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251004: [AppleObjCRuntime] Don't bother looking for the 
runtime on non-apple targets (authored by labath).

Changed prior to commit:
  http://reviews.llvm.org/D13948?vs=38020&id=38103#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13948

Files:
  
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp

Index: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
===
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -382,8 +382,11 @@
 {
 if (!process)
 return ObjCRuntimeVersions::eObjC_VersionUnknown;
-
+
 Target &target = process->GetTarget();
+if (target.GetArchitecture().GetTriple().getVendor() != 
llvm::Triple::VendorType::Apple)
+return ObjCRuntimeVersions::eObjC_VersionUnknown;
+
 const ModuleList &target_modules = target.GetImages();
 Mutex::Locker modules_locker(target_modules.GetMutex());
 


Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
===
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -382,8 +382,11 @@
 {
 if (!process)
 return ObjCRuntimeVersions::eObjC_VersionUnknown;
-
+
 Target &target = process->GetTarget();
+if (target.GetArchitecture().GetTriple().getVendor() != llvm::Triple::VendorType::Apple)
+return ObjCRuntimeVersions::eObjC_VersionUnknown;
+
 const ModuleList &target_modules = target.GetImages();
 Mutex::Locker modules_locker(target_modules.GetMutex());
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251004 - [AppleObjCRuntime] Don't bother looking for the runtime on non-apple targets

2015-10-22 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Oct 22 04:34:40 2015
New Revision: 251004

URL: http://llvm.org/viewvc/llvm-project?rev=251004&view=rev
Log:
[AppleObjCRuntime] Don't bother looking for the runtime on non-apple targets

Summary:
This short-circuits the GetObjCVersion function to avoid iterating through 
target modules on
non-apple targets. This function is called on every Process::IsDynamicValue 
call, so this
overhead is not negligible.

Reviewers: clayborg, jingham

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13948

Modified:

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp?rev=251004&r1=251003&r2=251004&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
 Thu Oct 22 04:34:40 2015
@@ -382,8 +382,11 @@ AppleObjCRuntime::GetObjCVersion (Proces
 {
 if (!process)
 return ObjCRuntimeVersions::eObjC_VersionUnknown;
-
+
 Target &target = process->GetTarget();
+if (target.GetArchitecture().GetTriple().getVendor() != 
llvm::Triple::VendorType::Apple)
+return ObjCRuntimeVersions::eObjC_VersionUnknown;
+
 const ModuleList &target_modules = target.GetImages();
 Mutex::Locker modules_locker(target_modules.GetMutex());
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13947: [lldb-mi] Fix expansion of anonymous structures and unions

2015-10-22 Thread Hafiz Abid Qadeer via lldb-commits
abidh accepted this revision.
abidh added a comment.

LGTM. Thanks for doing it. For this case, the output of the lldb-mi looks more 
sensible then gdb.


http://reviews.llvm.org/D13947



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13602: [LLDB] Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.

2015-10-22 Thread Pavel Labath via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

looks reasonable


Repository:
  rL LLVM

http://reviews.llvm.org/D13602



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251006 - Fix some race condition in ConstString around Mangled name handling

2015-10-22 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Thu Oct 22 06:14:31 2015
New Revision: 251006

URL: http://llvm.org/viewvc/llvm-project?rev=251006&view=rev
Log:
Fix some race condition in ConstString around Mangled name handling

Differential revision: http://reviews.llvm.org/D13941

Modified:
lldb/trunk/source/Core/ConstString.cpp

Modified: lldb/trunk/source/Core/ConstString.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConstString.cpp?rev=251006&r1=251005&r2=251006&view=diff
==
--- lldb/trunk/source/Core/ConstString.cpp (original)
+++ lldb/trunk/source/Core/ConstString.cpp Thu Oct 22 06:14:31 2015
@@ -36,7 +36,9 @@ public:
 {
 if (ccstr)
 {
-const StringPoolEntryType&entry = GetStringMapEntryFromKeyData 
(ccstr);
+const uint8_t h = hash (llvm::StringRef(ccstr));
+llvm::sys::SmartScopedReader 
rlock(m_string_pools[h].m_mutex);
+const StringPoolEntryType& entry = GetStringMapEntryFromKeyData 
(ccstr);
 return entry.getKey().size();
 }
 return 0;
@@ -46,7 +48,11 @@ public:
 GetMangledCounterpart (const char *ccstr) const
 {
 if (ccstr)
+{
+const uint8_t h = hash (llvm::StringRef(ccstr));
+llvm::sys::SmartScopedReader 
rlock(m_string_pools[h].m_mutex);
 return GetStringMapEntryFromKeyData (ccstr).getValue();
+}
 return 0;
 }
 
@@ -55,8 +61,16 @@ public:
 {
 if (key_ccstr && value_ccstr)
 {
-GetStringMapEntryFromKeyData (key_ccstr).setValue(value_ccstr);
-GetStringMapEntryFromKeyData (value_ccstr).setValue(key_ccstr);
+{
+const uint8_t h = hash (llvm::StringRef(key_ccstr));
+llvm::sys::SmartScopedWriter 
wlock(m_string_pools[h].m_mutex);
+GetStringMapEntryFromKeyData (key_ccstr).setValue(value_ccstr);
+}
+{
+const uint8_t h = hash (llvm::StringRef(value_ccstr));
+llvm::sys::SmartScopedWriter 
wlock(m_string_pools[h].m_mutex);
+GetStringMapEntryFromKeyData (value_ccstr).setValue(key_ccstr);
+}
 return true;
 }
 return false;
@@ -83,7 +97,7 @@ public:
 {
 if (string_ref.data())
 {
-uint8_t h = hash (string_ref);
+const uint8_t h = hash (string_ref);
 
 {
 llvm::sys::SmartScopedReader 
rlock(m_string_pools[h].m_mutex);
@@ -104,18 +118,29 @@ public:
 {
 if (demangled_cstr)
 {
-llvm::StringRef string_ref (demangled_cstr);
-uint8_t h = hash (string_ref);
-llvm::sys::SmartScopedWriter 
wlock(m_string_pools[h].m_mutex);
+const char *demangled_ccstr = nullptr;
 
-// Make string pool entry with the mangled counterpart already set
-StringPoolEntryType& entry = 
*m_string_pools[h].m_string_map.insert (std::make_pair (string_ref, 
mangled_ccstr)).first;
+{
+llvm::StringRef string_ref (demangled_cstr);
+const uint8_t h = hash (string_ref);
+llvm::sys::SmartScopedWriter 
wlock(m_string_pools[h].m_mutex);
+
+// Make string pool entry with the mangled counterpart already 
set
+StringPoolEntryType& entry = 
*m_string_pools[h].m_string_map.insert (
+std::make_pair (string_ref, mangled_ccstr)).first;
+
+// Extract the const version of the demangled_cstr
+demangled_ccstr = entry.getKeyData();
+}
+
+{
+// Now assign the demangled const string as the counterpart of 
the
+// mangled const string...
+const uint8_t h = hash (llvm::StringRef(mangled_ccstr));
+llvm::sys::SmartScopedWriter 
wlock(m_string_pools[h].m_mutex);
+GetStringMapEntryFromKeyData 
(mangled_ccstr).setValue(demangled_ccstr);
+}
 
-// Extract the const version of the demangled_cstr
-const char *demangled_ccstr = entry.getKeyData();
-// Now assign the demangled const string as the counterpart of the
-// mangled const string...
-GetStringMapEntryFromKeyData 
(mangled_ccstr).setValue(demangled_ccstr);
 // Return the constant demangled C string
 return demangled_ccstr;
 }
@@ -153,7 +178,7 @@ public:
 
 protected:
 uint8_t
-hash(const llvm::StringRef &s)
+hash(const llvm::StringRef &s) const
 {
 uint32_t h = llvm::HashString(s);
 return ((h >> 24) ^ (h >> 16) ^ (h >> 8) ^ h) & 0xff;


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13942: Make SymbolFileDWARF::GetCachedSectionData thread safe

2015-10-22 Thread Tamas Berghammer via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251007: Make SymbolFileDWARF::GetCachedSectionData thread 
safe (authored by tberghammer).

Changed prior to commit:
  http://reviews.llvm.org/D13942?vs=38019&id=38109#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13942

Files:
  lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
  lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h

Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
===
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
@@ -23,11 +23,6 @@
 
 ~SymbolFileDWARFDwo() override = default;
 
-const lldb_private::DWARFDataExtractor&
-GetCachedSectionData(uint32_t got_flag,
- lldb::SectionType sect_type,
- lldb_private::DWARFDataExtractor &data) override;
-
 lldb::CompUnitSP
 ParseCompileUnit(DWARFCompileUnit* dwarf_cu, uint32_t cu_idx) override;
 
@@ -44,6 +39,9 @@
 GetTypeSystemForLanguage(lldb::LanguageType language) override;
 
 protected:
+void
+LoadSectionData (lldb::SectionType sect_type, lldb_private::DWARFDataExtractor& data) override;
+
 DIEToTypePtr&
 GetDIEToType() override;
 
Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -14,6 +14,7 @@
 // C++ Includes
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -265,32 +266,16 @@
 
 DWARFDebugRanges*
 DebugRanges();
+
 const DWARFDebugRanges*
 DebugRanges() const;
 
-virtual const lldb_private::DWARFDataExtractor&
-GetCachedSectionData (uint32_t got_flag, 
-  lldb::SectionType sect_type, 
-  lldb_private::DWARFDataExtractor &data);
-
 static bool
 SupportedVersion(uint16_t version);
 
 DWARFDIE
 GetDeclContextDIEContainingDIE (const DWARFDIE &die);
 
-lldb_private::Flags&
-GetFlags ()
-{
-return m_flags;
-}
-
-const lldb_private::Flags&
-GetFlags () const
-{
-return m_flags;
-}
-
 bool
 HasForwardDeclForClangType (const lldb_private::CompilerType &compiler_type);
 
@@ -326,36 +311,27 @@
 typedef llvm::DenseMap DIEToClangType;
 typedef llvm::DenseMap ClangTypeToDIE;
 
-enum
+struct DWARFDataSegment
 {
-flagsGotDebugAbbrevData = (1 << 0),
-flagsGotDebugAddrData   = (1 << 1),
-flagsGotDebugArangesData= (1 << 2),
-flagsGotDebugFrameData  = (1 << 3),
-flagsGotDebugInfoData   = (1 << 4),
-flagsGotDebugLineData   = (1 << 5),
-flagsGotDebugLocData= (1 << 6),
-flagsGotDebugMacInfoData= (1 << 7),
-flagsGotDebugPubNamesData   = (1 << 8),
-flagsGotDebugPubTypesData   = (1 << 9),
-flagsGotDebugRangesData = (1 << 10),
-flagsGotDebugStrData= (1 << 11),
-flagsGotDebugStrOffsetsData = (1 << 12),
-flagsGotAppleNamesData  = (1 << 13),
-flagsGotAppleTypesData  = (1 << 14),
-flagsGotAppleNamespacesData = (1 << 15),
-flagsGotAppleObjCData   = (1 << 16)
+std::once_flag   m_flag;
+lldb_private::DWARFDataExtractor m_data;
 };
-
+
+DISALLOW_COPY_AND_ASSIGN (SymbolFileDWARF);
+
+const lldb_private::DWARFDataExtractor&
+GetCachedSectionData (lldb::SectionType sect_type, DWARFDataSegment& data_segment);
+
+virtual void
+LoadSectionData (lldb::SectionType sect_type, lldb_private::DWARFDataExtractor& data);
+
 bool
 DeclContextMatchesThisSymbolFile (const lldb_private::CompilerDeclContext *decl_ctx);
 
 bool
 DIEInDeclContext (const lldb_private::CompilerDeclContext *parent_decl_ctx,
   const DWARFDIE &die);
 
-DISALLOW_COPY_AND_ASSIGN (SymbolFileDWARF);
-
 virtual DWARFCompileUnit*
 GetDWARFCompileUnit (lldb_private::CompileUnit *comp_unit);
 
@@ -542,22 +518,22 @@
 
 lldb::ModuleWPm_debug_map_module_wp;
 SymbolFileDWARFDebugMap * m_debug_map_symfile;
-lldb_private::Flags   m_flags;
 lldb_private::DWARFDataExtractor  m_dwarf_data;
-lldb_private::DWARFDataExtractor  m_data_debug_abbrev;
-lldb_private::DWARFDataExtractor  m_data_debug_addr;
-lldb_private::DWARFDataExtractor  m_data_debug_aranges;
-lldb_private::DWARFDataExtractor  m_data_debug_frame;
-lldb_private::DWARFDa

[Lldb-commits] [lldb] r251007 - Make SymbolFileDWARF::GetCachedSectionData thread safe

2015-10-22 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Thu Oct 22 06:14:37 2015
New Revision: 251007

URL: http://llvm.org/viewvc/llvm-project?rev=251007&view=rev
Log:
Make SymbolFileDWARF::GetCachedSectionData thread safe

Differential revision: http://reviews.llvm.org/D13942

Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=251007&r1=251006&r2=251007&view=diff
==
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Oct 22 
06:14:37 2015
@@ -429,7 +429,6 @@ SymbolFileDWARF::SymbolFileDWARF(ObjectF
 UserID (0),  // Used by SymbolFileDWARFDebugMap to when this class parses 
.o files to contain the .o file index/ID
 m_debug_map_module_wp (),
 m_debug_map_symfile (NULL),
-m_flags(),
 m_data_debug_abbrev (),
 m_data_debug_aranges (),
 m_data_debug_frame (),
@@ -509,7 +508,6 @@ SymbolFileDWARF::InitializeObject()
 if (module_sp)
 {
 const SectionList *section_list = module_sp->GetSectionList();
-
 const Section* section = 
section_list->FindSectionByName(GetDWARFMachOSegmentName ()).get();
 
 // Memory map the DWARF mach-o segment so we have everything mmap'ed
@@ -517,19 +515,24 @@ SymbolFileDWARF::InitializeObject()
 if (section)
 m_obj_file->MemoryMapSectionData(section, m_dwarf_data);
 }
+
 get_apple_names_data();
-if (m_data_apple_names.GetByteSize() > 0)
+if (m_data_apple_names.m_data.GetByteSize() > 0)
 {
-m_apple_names_ap.reset (new DWARFMappedHash::MemoryTable 
(m_data_apple_names, get_debug_str_data(), ".apple_names"));
+m_apple_names_ap.reset (new DWARFMappedHash::MemoryTable 
(m_data_apple_names.m_data,
+  
get_debug_str_data(),
+  
".apple_names"));
 if (m_apple_names_ap->IsValid())
 m_using_apple_tables = true;
 else
 m_apple_names_ap.reset();
 }
 get_apple_types_data();
-if (m_data_apple_types.GetByteSize() > 0)
+if (m_data_apple_types.m_data.GetByteSize() > 0)
 {
-m_apple_types_ap.reset (new DWARFMappedHash::MemoryTable 
(m_data_apple_types, get_debug_str_data(), ".apple_types"));
+m_apple_types_ap.reset (new DWARFMappedHash::MemoryTable 
(m_data_apple_types.m_data,
+  
get_debug_str_data(),
+  
".apple_types"));
 if (m_apple_types_ap->IsValid())
 m_using_apple_tables = true;
 else
@@ -537,9 +540,11 @@ SymbolFileDWARF::InitializeObject()
 }
 
 get_apple_namespaces_data();
-if (m_data_apple_namespaces.GetByteSize() > 0)
+if (m_data_apple_namespaces.m_data.GetByteSize() > 0)
 {
-m_apple_namespaces_ap.reset (new DWARFMappedHash::MemoryTable 
(m_data_apple_namespaces, get_debug_str_data(), ".apple_namespaces"));
+m_apple_namespaces_ap.reset (new DWARFMappedHash::MemoryTable 
(m_data_apple_namespaces.m_data,
+   
get_debug_str_data(),
+   
".apple_namespaces"));
 if (m_apple_namespaces_ap->IsValid())
 m_using_apple_tables = true;
 else
@@ -547,9 +552,11 @@ SymbolFileDWARF::InitializeObject()
 }
 
 get_apple_objc_data();
-if (m_data_apple_objc.GetByteSize() > 0)
+if (m_data_apple_objc.m_data.GetByteSize() > 0)
 {
-m_apple_objc_ap.reset (new DWARFMappedHash::MemoryTable 
(m_data_apple_objc, get_debug_str_data(), ".apple_objc"));
+m_apple_objc_ap.reset (new DWARFMappedHash::MemoryTable 
(m_data_apple_objc.m_data,
+ 
get_debug_str_data(),
+ 
".apple_objc"));
 if (m_apple_objc_ap->IsValid())
 m_using_apple_tables = true;
 else
@@ -591,46 +598,10 @@ SymbolFileDWARF::CalculateAbilities ()
 section = section_list->FindSectionByType 
(eSectionTypeDWARFDebugAbbrev, true).get();
 if (section)
 debug_abbrev_file_size = section->GetFileSize();
-else
-m_flags.Set (flagsGotDebugAbbrevData);
-
-section = section_list->FindSectionByType 
(eSe

Re: [Lldb-commits] [PATCH] D13941: Fix some race condition in ConstString around Mangled name handling

2015-10-22 Thread Tamas Berghammer via lldb-commits
This revision was automatically updated to reflect the committed changes.
tberghammer marked 5 inline comments as done.
Closed by commit rL251006: Fix some race condition in ConstString around 
Mangled name handling (authored by tberghammer).

Changed prior to commit:
  http://reviews.llvm.org/D13941?vs=38006&id=38108#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13941

Files:
  lldb/trunk/source/Core/ConstString.cpp

Index: lldb/trunk/source/Core/ConstString.cpp
===
--- lldb/trunk/source/Core/ConstString.cpp
+++ lldb/trunk/source/Core/ConstString.cpp
@@ -36,7 +36,9 @@
 {
 if (ccstr)
 {
-const StringPoolEntryType&entry = GetStringMapEntryFromKeyData (ccstr);
+const uint8_t h = hash (llvm::StringRef(ccstr));
+llvm::sys::SmartScopedReader rlock(m_string_pools[h].m_mutex);
+const StringPoolEntryType& entry = GetStringMapEntryFromKeyData (ccstr);
 return entry.getKey().size();
 }
 return 0;
@@ -46,17 +48,29 @@
 GetMangledCounterpart (const char *ccstr) const
 {
 if (ccstr)
+{
+const uint8_t h = hash (llvm::StringRef(ccstr));
+llvm::sys::SmartScopedReader rlock(m_string_pools[h].m_mutex);
 return GetStringMapEntryFromKeyData (ccstr).getValue();
+}
 return 0;
 }
 
 bool
 SetMangledCounterparts (const char *key_ccstr, const char *value_ccstr)
 {
 if (key_ccstr && value_ccstr)
 {
-GetStringMapEntryFromKeyData (key_ccstr).setValue(value_ccstr);
-GetStringMapEntryFromKeyData (value_ccstr).setValue(key_ccstr);
+{
+const uint8_t h = hash (llvm::StringRef(key_ccstr));
+llvm::sys::SmartScopedWriter wlock(m_string_pools[h].m_mutex);
+GetStringMapEntryFromKeyData (key_ccstr).setValue(value_ccstr);
+}
+{
+const uint8_t h = hash (llvm::StringRef(value_ccstr));
+llvm::sys::SmartScopedWriter wlock(m_string_pools[h].m_mutex);
+GetStringMapEntryFromKeyData (value_ccstr).setValue(key_ccstr);
+}
 return true;
 }
 return false;
@@ -83,7 +97,7 @@
 {
 if (string_ref.data())
 {
-uint8_t h = hash (string_ref);
+const uint8_t h = hash (string_ref);
 
 {
 llvm::sys::SmartScopedReader rlock(m_string_pools[h].m_mutex);
@@ -104,18 +118,29 @@
 {
 if (demangled_cstr)
 {
-llvm::StringRef string_ref (demangled_cstr);
-uint8_t h = hash (string_ref);
-llvm::sys::SmartScopedWriter wlock(m_string_pools[h].m_mutex);
+const char *demangled_ccstr = nullptr;
 
-// Make string pool entry with the mangled counterpart already set
-StringPoolEntryType& entry = *m_string_pools[h].m_string_map.insert (std::make_pair (string_ref, mangled_ccstr)).first;
+{
+llvm::StringRef string_ref (demangled_cstr);
+const uint8_t h = hash (string_ref);
+llvm::sys::SmartScopedWriter wlock(m_string_pools[h].m_mutex);
+
+// Make string pool entry with the mangled counterpart already set
+StringPoolEntryType& entry = *m_string_pools[h].m_string_map.insert (
+std::make_pair (string_ref, mangled_ccstr)).first;
+
+// Extract the const version of the demangled_cstr
+demangled_ccstr = entry.getKeyData();
+}
+
+{
+// Now assign the demangled const string as the counterpart of the
+// mangled const string...
+const uint8_t h = hash (llvm::StringRef(mangled_ccstr));
+llvm::sys::SmartScopedWriter wlock(m_string_pools[h].m_mutex);
+GetStringMapEntryFromKeyData (mangled_ccstr).setValue(demangled_ccstr);
+}
 
-// Extract the const version of the demangled_cstr
-const char *demangled_ccstr = entry.getKeyData();
-// Now assign the demangled const string as the counterpart of the
-// mangled const string...
-GetStringMapEntryFromKeyData (mangled_ccstr).setValue(demangled_ccstr);
 // Return the constant demangled C string
 return demangled_ccstr;
 }
@@ -153,7 +178,7 @@
 
 protected:
 uint8_t
-hash(const llvm::StringRef &s)
+hash(const llvm::StringRef &s) const
 {
 uint32_t h = llvm::HashString(s);
 return ((h >> 24) ^ (h >> 16) ^ (h >> 8) ^ h) & 0xff;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D13981: Disable the strict-aliasing warnings produced by gcc

2015-10-22 Thread Tamas Berghammer via lldb-commits
tberghammer created this revision.
tberghammer added reviewers: clayborg, brucem.
tberghammer added a subscriber: lldb-commits.

Disable the strict-aliasing warnings produced by gcc

GCC produce a lot of strict-aliasing warning for the LLDB codebase
what makes reading the compile output very difficult. This change
disable these warnings to reduce the noise as we already ignore them.

We should consider re-enabling the warning if we fix all (or most)
strict-aliasing violation first.

http://reviews.llvm.org/D13981

Files:
  cmake/modules/LLDBConfig.cmake

Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -210,6 +210,12 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
 endif ()
 
+check_cxx_compiler_flag("-Wno-strict-aliasing"
+CXX_SUPPORTS_NO_STRICT_ALIASING)
+if (CXX_SUPPORTS_NO_STRICT_ALIASING)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing")
+endif ()
+
 # Disable Clang warnings
 check_cxx_compiler_flag("-Wno-deprecated-register"
 CXX_SUPPORTS_NO_DEPRECATED_REGISTER)


Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -210,6 +210,12 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
 endif ()
 
+check_cxx_compiler_flag("-Wno-strict-aliasing"
+CXX_SUPPORTS_NO_STRICT_ALIASING)
+if (CXX_SUPPORTS_NO_STRICT_ALIASING)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing")
+endif ()
+
 # Disable Clang warnings
 check_cxx_compiler_flag("-Wno-deprecated-register"
 CXX_SUPPORTS_NO_DEPRECATED_REGISTER)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL250335: Fix codesign command with cmake.

2015-10-22 Thread Vadim Macagon via lldb-commits
enlight added a comment.

It seems like it should be possible to conditionally enable this using 
CMAKE_VERSION 
.
 However that just means anyone who's silly enough to use an older CMake 
version may run into the issue this patch attempts to address, so arguably the 
proper fix is to bump up the CMake version requirement instead. Should probably 
run this by lldb-dev first.


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL250335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-22 Thread Tamas Berghammer via lldb-commits
tberghammer updated this revision to Diff 38118.
tberghammer added a comment.

We already used some thread local storage in the same file to store the current 
Timer stack so I decided to move the depth to the same storage object (it is 
using the Host::ThreadLocalStorage* methods).

Originally I decided to go with the thread_local keyword because I expected it 
to be more efficient for integral types then the other methods and based on my 
understanding it should be supported since MSVC 2010 for integral types.


http://reviews.llvm.org/D13940

Files:
  include/lldb/Core/Timer.h
  source/Core/Timer.cpp

Index: source/Core/Timer.cpp
===
--- source/Core/Timer.cpp
+++ source/Core/Timer.cpp
@@ -21,12 +21,27 @@
 using namespace lldb_private;
 
 #define TIMER_INDENT_AMOUNT 2
-static bool g_quiet = true;
-uint32_t Timer::g_depth = 0;
-uint32_t Timer::g_display_depth = 0;
-FILE * Timer::g_file = NULL;
-typedef std::vector TimerStack;
-typedef std::map TimerCategoryMap;
+
+namespace
+{
+typedef std::map TimerCategoryMap;
+
+struct TimerStack
+{
+TimerStack() :
+m_depth(0)
+{}
+
+uint32_t m_depth;
+std::vector m_stack;
+};
+} // end of anonymous namespace
+
+std::atomic_bool Timer::g_quiet(true);
+std::atomic_uint Timer::g_display_depth(0);
+std::mutex Timer::g_file_mutex;
+FILE* Timer::g_file = nullptr;
+
 static lldb::thread_key_t g_key;
 
 static Mutex &
@@ -82,12 +97,18 @@
 m_total_ticks (0),
 m_timer_ticks (0)
 {
-if (g_depth++ < g_display_depth)
+TimerStack *stack = GetTimerStackForCurrentThread ();
+if (!stack)
+return;
+
+if (stack->m_depth++ < g_display_depth)
 {
 if (g_quiet == false)
 {
+std::lock_guard lock(g_file_mutex);
+
 // Indent
-::fprintf (g_file, "%*s", g_depth * TIMER_INDENT_AMOUNT, "");
+::fprintf (g_file, "%*s", stack->m_depth * TIMER_INDENT_AMOUNT, "");
 // Print formatted string
 va_list args;
 va_start (args, format);
@@ -100,19 +121,19 @@
 TimeValue start_time(TimeValue::Now());
 m_total_start = start_time;
 m_timer_start = start_time;
-TimerStack *stack = GetTimerStackForCurrentThread ();
-if (stack)
-{
-if (stack->empty() == false)
-stack->back()->ChildStarted (start_time);
-stack->push_back(this);
-}
+
+if (!stack->m_stack.empty())
+stack->m_stack.back()->ChildStarted (start_time);
+stack->m_stack.push_back(this);
 }
 }
 
-
 Timer::~Timer()
 {
+TimerStack *stack = GetTimerStackForCurrentThread ();
+if (!stack)
+return;
+
 if (m_total_start.IsValid())
 {
 TimeValue stop_time = TimeValue::Now();
@@ -127,26 +148,22 @@
 m_timer_start.Clear();
 }
 
-TimerStack *stack = GetTimerStackForCurrentThread ();
-if (stack)
-{
-assert (stack->back() == this);
-stack->pop_back();
-if (stack->empty() == false)
-stack->back()->ChildStopped(stop_time);
-}
+assert (stack->m_stack.back() == this);
+stack->m_stack.pop_back();
+if (stack->m_stack.empty() == false)
+stack->m_stack.back()->ChildStopped(stop_time);
 
 const uint64_t total_nsec_uint = GetTotalElapsedNanoSeconds();
 const uint64_t timer_nsec_uint = GetTimerElapsedNanoSeconds();
 const double total_nsec = total_nsec_uint;
 const double timer_nsec = timer_nsec_uint;
 
 if (g_quiet == false)
 {
-
+std::lock_guard lock(g_file_mutex);
 ::fprintf (g_file,
"%*s%.9f sec (%.9f sec)\n",
-   (g_depth - 1) *TIMER_INDENT_AMOUNT, "",
+   (stack->m_depth - 1) *TIMER_INDENT_AMOUNT, "",
total_nsec / 10.0,
timer_nsec / 10.0);
 }
@@ -156,8 +173,8 @@
 TimerCategoryMap &category_map = GetCategoryMap();
 category_map[m_category] += timer_nsec_uint;
 }
-if (g_depth > 0)
---g_depth;
+if (stack->m_depth > 0)
+--stack->m_depth;
 }
 
 uint64_t
Index: include/lldb/Core/Timer.h
===
--- include/lldb/Core/Timer.h
+++ include/lldb/Core/Timer.h
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "lldb/lldb-private.h"
 #include "lldb/Host/TimeValue.h"
 
@@ -84,9 +85,12 @@
 TimeValue m_timer_start;
 uint64_t m_total_ticks; // Total running time for this timer including when other timers below this are running
 uint64_t m_timer_ticks; // Ticks for this timer that do not include when other timers below this one are running
-static uint32_t g_depth;
-static uint32_t g_display_depth;
- 

Re: [Lldb-commits] [PATCH] D13981: Disable the strict-aliasing warnings produced by gcc

2015-10-22 Thread Pavel Labath via lldb-commits
labath added a subscriber: labath.
labath added a comment.

Could you also file a bug about that? most of these are real problems I think, 
and we should not forget them...


http://reviews.llvm.org/D13981



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13981: Disable the strict-aliasing warnings produced by gcc

2015-10-22 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

It might be worthwhile to have a "janitor" where we can not enable things like 
this so that it is more clear that this is something we'd like to clean up over 
time.

It would be pretty easy to just have a `if (NOT LLDB_JANITOR_MODE AND 
CXX_SUPPORTS_NO_STRICT_ALIASING)` check probably, but then we'd need docs to 
discuss `LLDB_JANITOR_MODE`.

Don't know.


http://reviews.llvm.org/D13981



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL250335: Fix codesign command with cmake.

2015-10-22 Thread Pavel Labath via lldb-commits
labath added a subscriber: labath.
labath added a comment.

I don't think we should bump the version over a trivial issue like this. cmake 
2.8 is still the default on alot of systems.
Wouldn't a well placed quote work also? Like, 
`FOO="${BAR}" codesign --force --end`
Or just putting the command into a separate script file?  We already execute a 
lot of scripts from cmake anyway...


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL250335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL250335: Fix codesign command with cmake.

2015-10-22 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

+1 to what @labath said.


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL250335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13968: [LLDB] Attempt to fix MSVC builds after rL250966

2015-10-22 Thread Siva Chandra via lldb-commits
sivachandra added a subscriber: sivachandra.
sivachandra added a comment.

If this fixes the windows build, can you please commit it ASAP?


Repository:
  rL LLVM

http://reviews.llvm.org/D13968



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13662: Make dwarf parsing multi-threaded

2015-10-22 Thread Tamas Berghammer via lldb-commits
tberghammer removed rL LLVM as the repository for this revision.
tberghammer updated this revision to Diff 38128.
tberghammer added a comment.

I tried out the implementation you suggests and made some measurements. The 
difference between the 2 implementation when attaching to LLDB is negligible 
(the total time spent in SymbolFileDWARF::Index differed by ~1%). The 
interesting part is that your implementation is faster for parsing C++ 
libraries (e.g. liblldb, libstdc++) while mine implementation is faster for 
parsing C libraries (libc, libm, libdl) and I don't understand why it is 
happening.

With the current measurements in place I don't feel strongly about any version, 
so if somebody have a strong preference then please let me know.

I plan to recommit this change after committing http://reviews.llvm.org/D13940 
as that one fixes the remaining race conditions related to this change I found 
so far with TSAN


http://reviews.llvm.org/D13662

Files:
  source/Plugins/SymbolFile/DWARF/NameToDIE.cpp
  source/Plugins/SymbolFile/DWARF/NameToDIE.h
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -50,6 +50,8 @@
 
 #include "lldb/Target/Language.h"
 
+#include "lldb/Utility/TaskPool.h"
+
 #include "DWARFASTParser.h"
 #include "DWARFCompileUnit.h"
 #include "DWARFDebugAbbrev.h"
@@ -2015,37 +2017,77 @@
 DWARFDebugInfo* debug_info = DebugInfo();
 if (debug_info)
 {
-uint32_t cu_idx = 0;
 const uint32_t num_compile_units = GetNumCompileUnits();
-for (cu_idx = 0; cu_idx < num_compile_units; ++cu_idx)
+std::vector function_basename_index(num_compile_units);
+std::vector function_fullname_index(num_compile_units);
+std::vector function_method_index(num_compile_units);
+std::vector function_selector_index(num_compile_units);
+std::vector objc_class_selectors_index(num_compile_units);
+std::vector global_index(num_compile_units);
+std::vector type_index(num_compile_units);
+std::vector namespace_index(num_compile_units);
+
+auto parser_fn = [this,
+  debug_info,
+  &function_basename_index,
+  &function_fullname_index,
+  &function_method_index,
+  &function_selector_index,
+  &objc_class_selectors_index,
+  &global_index,
+  &type_index,
+  &namespace_index](uint32_t cu_idx)
 {
 DWARFCompileUnit* dwarf_cu = debug_info->GetCompileUnitAtIndex(cu_idx);
+bool clear_dies = dwarf_cu->ExtractDIEsIfNeeded(false) > 1;
 
-bool clear_dies = dwarf_cu->ExtractDIEsIfNeeded (false) > 1;
+dwarf_cu->Index(function_basename_index[cu_idx],
+function_fullname_index[cu_idx],
+function_method_index[cu_idx],
+function_selector_index[cu_idx],
+objc_class_selectors_index[cu_idx],
+global_index[cu_idx],
+type_index[cu_idx],
+namespace_index[cu_idx]);
 
-dwarf_cu->Index (m_function_basename_index,
- m_function_fullname_index,
- m_function_method_index,
- m_function_selector_index,
- m_objc_class_selectors_index,
- m_global_index, 
- m_type_index,
- m_namespace_index);
-
 // Keep memory down by clearing DIEs if this generate function
 // caused them to be parsed
 if (clear_dies)
-dwarf_cu->ClearDIEs (true);
+dwarf_cu->ClearDIEs(true);
+
+return cu_idx;
+};
+
+TaskRunner task_runner;
+for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx)
+task_runner.AddTask(parser_fn, cu_idx);
+
+while (true)
+{
+std::future f = task_runner.WaitForNextCompletedTask();
+if (!f.valid())
+break;
+uint32_t cu_idx = f.get();
+
+m_function_basename_index.Append(function_basename_index[cu_idx]);
+m_function_fullname_index.Append(function_fullname_index[cu_idx]);
+m_function_method_index.Append(function_method_index[cu_idx]);
+m_function_selector_index.Append(function_selector_index[cu_idx]);
+m_objc_class_selectors_index.Append(objc_class_selectors_index[cu_idx]);
+m_global_

[Lldb-commits] [PATCH] D13985: Enable the libc++ tests on linux

2015-10-22 Thread Pavel Labath via lldb-commits
labath created this revision.
labath added reviewers: granata.enrico, tfiala.
labath added a subscriber: lldb-commits.

The list of loaded modules which skip_if_library_missing is depending on is not 
available on
linux until after we run the target. This causes the tests to be wrongfully 
skipped. This commit
moves the skip call after the run command.

http://reviews.llvm.org/D13985

Files:
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
  
test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py

Index: test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
===
--- test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
+++ test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
@@ -19,12 +19,12 @@
 self.build()
 self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
-
 lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.")
 
 self.runCmd("run", RUN_SUCCEEDED)
 
+lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
+
 # The stop reason of the thread should be breakpoint.
 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
 substrs = ['stopped',
Index: test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
===
--- test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
+++ test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
@@ -26,12 +26,12 @@
 self.build()
 self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
-
 lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1)
 
 self.runCmd("run", RUN_SUCCEEDED)
 
+lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
+
 # The stop reason of the thread should be breakpoint.
 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
 substrs = ['stopped',
Index: test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
===
--- test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
+++ test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
@@ -19,12 +19,12 @@
 self.build()
 self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
-
 bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line."))
 
 self.runCmd("run", RUN_SUCCEEDED)
 
+lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
+
 # The stop reason of the thread should be breakpoint.
 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
 substrs = ['stopped',
Index: test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
===
--- test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
+++ test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
@@ -19,12 +19,12 @@
 self.build()
 self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
-
 bkpt = self.targ

Re: [Lldb-commits] [PATCH] D13985: Enable the libc++ tests on linux

2015-10-22 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

LGTM.  Good catch!


http://reviews.llvm.org/D13985



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13985: Enable the libc++ tests on linux

2015-10-22 Thread Todd Fiala via lldb-commits
tfiala added a comment.

(I don't think you need to wait for Enrico, btw.)


http://reviews.llvm.org/D13985



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13964: Fix libstdc++ data formatters on Ubuntu 15.10 x86_64

2015-10-22 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Yeah, if you can make that happen, that sounds good to me.  This is a "if you 
have libc++, please build with it, otherwise skip this test"-kinda test... :-)


http://reviews.llvm.org/D13964



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13964: Fix libstdc++ data formatters on Ubuntu 15.10 x86_64

2015-10-22 Thread Todd Fiala via lldb-commits
tfiala closed this revision.
tfiala added a comment.

Forgot to mark this as closed:

Closed by commit:

  
  r250965 | tfiala | 2015-10-21 17:23:38 -0700 (Wed, 21 Oct 2015) | 4 lines
  
  Fix libstdc++ data formatters on Ubuntu 15.10 x86_64

Also, I forgot to mention that I only added the string formatter support for 
remote host (i.e. lldb-server/debugserver) connections.  For those systems 
using in-host attaching (I think *BSD), the string formatter will not display 
with host memory content.  It would be a smallish fix, but since I don't have a 
system to test that on, I didn't want to implement that.  The string formatter 
should fall back to printing the raw content in that case.


http://reviews.llvm.org/D13964



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13970: Add support for abstract domain sockets.

2015-10-22 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.

Looks good. At some point we should add these to the PluginMananger and have 
new instances found by having them register URL prefixes which match up with 
CreateInstance methods that are given the URL.


http://reviews.llvm.org/D13970



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13968: [LLDB] Attempt to fix MSVC builds after rL250966

2015-10-22 Thread Zachary Turner via lldb-commits
I would have done this last night but I didn't have a machine handy.  I'll
test it out now and commit if it fixes.  And yea, in the future please just
commit fixes.

On Thu, Oct 22, 2015 at 6:04 AM Siva Chandra  wrote:

> sivachandra added a subscriber: sivachandra.
> sivachandra added a comment.
>
> If this fixes the windows build, can you please commit it ASAP?
>
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D13968
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13968: [LLDB] Attempt to fix MSVC builds after rL250966

2015-10-22 Thread Zachary Turner via lldb-commits
zturner added a subscriber: zturner.
zturner added a comment.

I would have done this last night but I didn't have a machine handy.  I'll
test it out now and commit if it fixes.  And yea, in the future please just
commit fixes.


Repository:
  rL LLVM

http://reviews.llvm.org/D13968



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13602: [LLDB] Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.

2015-10-22 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.

Looks good. I would venture to say just checkin any clang tidy things that 
aren't changing code functionality without need for review.


Repository:
  rL LLVM

http://reviews.llvm.org/D13602



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13940: Fix race conditions in Core/Timer

2015-10-22 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks good.


http://reviews.llvm.org/D13940



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13662: Make dwarf parsing multi-threaded

2015-10-22 Thread Greg Clayton via lldb-commits
clayborg added a comment.

I would venture to say we should optimize for C++ since those libraries tend to 
be larger, but I will leave the decision to you.


http://reviews.llvm.org/D13662



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251031 - Attempt to fix MSVC builds after rL250966.

2015-10-22 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Oct 22 12:01:20 2015
New Revision: 251031

URL: http://llvm.org/viewvc/llvm-project?rev=251031&view=rev
Log:
Attempt to fix MSVC builds after rL250966.

Differential Revision: http://reviews.llvm.org/D13968

Modified:

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h?rev=251031&r1=251030&r2=251031&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
 Thu Oct 22 12:01:20 2015
@@ -14,18 +14,18 @@
 // C++ Includes
 #include 
 #include 
+
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-public.h"
 #include "lldb/Host/Mutex.h"
-
+#include "lldb/Expression/UtilityFunction.h"
 
 namespace lldb_private
 {
   
 class AppleObjCTrampolineHandler {
 public:
-
 AppleObjCTrampolineHandler (const lldb::ProcessSP &process_sp, 
 const lldb::ModuleSP &objc_module_sp);
 
@@ -44,7 +44,6 @@ public:
 return (addr == m_msg_forward_addr || addr == 
m_msg_forward_stret_addr);
 }
 
-
 struct DispatchFunction {
 public:
 typedef enum 
@@ -92,7 +91,6 @@ private:
 lldb::addr_t code_start;
 };
 
-
 class VTableRegion 
 {
 public:
@@ -189,7 +187,6 @@ private:
 lldb::break_id_t m_trampolines_changed_bp_id;
 region_collection m_regions;
 lldb::ModuleSP m_objc_module_sp;
-
 };
 
 static const DispatchFunction g_dispatch_functions[];
@@ -205,10 +202,8 @@ private:
 lldb::addr_t m_msg_forward_addr;
 lldb::addr_t m_msg_forward_stret_addr;
 std::unique_ptr m_vtables_ap;
-
- 
 };
 
-}  // using namespace lldb_private
+} // namespace lldb_private
 
-#endif // lldb_AppleObjCTrampolineHandler_h_
+#endif // lldb_AppleObjCTrampolineHandler_h_


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13968: [LLDB] Attempt to fix MSVC builds after rL250966

2015-10-22 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251031: Attempt to fix MSVC builds after rL250966. (authored 
by eugenezelenko).

Changed prior to commit:
  http://reviews.llvm.org/D13968?vs=38070&id=38143#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13968

Files:
  
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h

Index: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
===
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
@@ -14,18 +14,18 @@
 // C++ Includes
 #include 
 #include 
+
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-public.h"
 #include "lldb/Host/Mutex.h"
-
+#include "lldb/Expression/UtilityFunction.h"
 
 namespace lldb_private
 {
   
 class AppleObjCTrampolineHandler {
 public:
-
 AppleObjCTrampolineHandler (const lldb::ProcessSP &process_sp, 
 const lldb::ModuleSP &objc_module_sp);
 
@@ -44,7 +44,6 @@
 return (addr == m_msg_forward_addr || addr == 
m_msg_forward_stret_addr);
 }
 
-
 struct DispatchFunction {
 public:
 typedef enum 
@@ -92,7 +91,6 @@
 lldb::addr_t code_start;
 };
 
-
 class VTableRegion 
 {
 public:
@@ -189,7 +187,6 @@
 lldb::break_id_t m_trampolines_changed_bp_id;
 region_collection m_regions;
 lldb::ModuleSP m_objc_module_sp;
-
 };
 
 static const DispatchFunction g_dispatch_functions[];
@@ -205,10 +202,8 @@
 lldb::addr_t m_msg_forward_addr;
 lldb::addr_t m_msg_forward_stret_addr;
 std::unique_ptr m_vtables_ap;
-
- 
 };
 
-}  // using namespace lldb_private
+} // namespace lldb_private
 
-#endif // lldb_AppleObjCTrampolineHandler_h_
+#endif // lldb_AppleObjCTrampolineHandler_h_


Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
===
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
@@ -14,18 +14,18 @@
 // C++ Includes
 #include 
 #include 
+
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-public.h"
 #include "lldb/Host/Mutex.h"
-
+#include "lldb/Expression/UtilityFunction.h"
 
 namespace lldb_private
 {
   
 class AppleObjCTrampolineHandler {
 public:
-
 AppleObjCTrampolineHandler (const lldb::ProcessSP &process_sp, 
 const lldb::ModuleSP &objc_module_sp);
 
@@ -44,7 +44,6 @@
 return (addr == m_msg_forward_addr || addr == m_msg_forward_stret_addr);
 }
 
-
 struct DispatchFunction {
 public:
 typedef enum 
@@ -92,7 +91,6 @@
 lldb::addr_t code_start;
 };
 
-
 class VTableRegion 
 {
 public:
@@ -189,7 +187,6 @@
 lldb::break_id_t m_trampolines_changed_bp_id;
 region_collection m_regions;
 lldb::ModuleSP m_objc_module_sp;
-
 };
 
 static const DispatchFunction g_dispatch_functions[];
@@ -205,10 +202,8 @@
 lldb::addr_t m_msg_forward_addr;
 lldb::addr_t m_msg_forward_stret_addr;
 std::unique_ptr m_vtables_ap;
-
- 
 };
 
-}  // using namespace lldb_private
+} // namespace lldb_private
 
-#endif	// lldb_AppleObjCTrampolineHandler_h_
+#endif // lldb_AppleObjCTrampolineHandler_h_
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13970: Add support for abstract domain sockets.

2015-10-22 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment.

In http://reviews.llvm.org/D13970#273217, @clayborg wrote:

> Looks good. At some point we should add these to the PluginMananger and have 
> new instances found by having them register URL prefixes which match up with 
> CreateInstance methods that are given the URL.


Thank you for the idea - I was planning to have a kind of URL-based factory 
inside lldb-server/Acceptor and PluginManager looks as a way to go.
If we're going to make Socket class a plugin should we then move all 
implementations into source/Plugins/Socket folder?


http://reviews.llvm.org/D13970



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251034 - Add support for abstract domain sockets.

2015-10-22 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Thu Oct 22 12:50:33 2015
New Revision: 251034

URL: http://llvm.org/viewvc/llvm-project?rev=251034&view=rev
Log:
Add support for abstract domain sockets.

http://reviews.llvm.org/D13970


Added:
lldb/trunk/include/lldb/Host/linux/AbstractSocket.h
lldb/trunk/source/Host/linux/AbstractSocket.cpp
Modified:
lldb/trunk/include/lldb/Host/Socket.h
lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
lldb/trunk/include/lldb/Host/posix/DomainSocket.h
lldb/trunk/source/Host/CMakeLists.txt
lldb/trunk/source/Host/common/Socket.cpp
lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp
lldb/trunk/source/Host/posix/DomainSocket.cpp

Modified: lldb/trunk/include/lldb/Host/Socket.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Socket.h?rev=251034&r1=251033&r2=251034&view=diff
==
--- lldb/trunk/include/lldb/Host/Socket.h (original)
+++ lldb/trunk/include/lldb/Host/Socket.h Thu Oct 22 12:50:33 2015
@@ -45,7 +45,8 @@ public:
 {
 ProtocolTcp,
 ProtocolUdp,
-ProtocolUnixDomain
+ProtocolUnixDomain,
+ProtocolUnixAbstract
 } SocketProtocol;
 
 static const NativeSocket kInvalidSocketValue;
@@ -69,6 +70,8 @@ public:
 static Error UdpConnect(llvm::StringRef host_and_port, bool 
child_processes_inherit, Socket *&send_socket, Socket *&recv_socket);
 static Error UnixDomainConnect(llvm::StringRef host_and_port, bool 
child_processes_inherit, Socket *&socket);
 static Error UnixDomainAccept(llvm::StringRef host_and_port, bool 
child_processes_inherit, Socket *&socket);
+static Error UnixAbstractConnect(llvm::StringRef host_and_port, bool 
child_processes_inherit, Socket *&socket);
+static Error UnixAbstractAccept(llvm::StringRef host_and_port, bool 
child_processes_inherit, Socket *&socket);
 
 int GetOption (int level, int option_name, int &option_value);
 int SetOption (int level, int option_name, int option_value);

Added: lldb/trunk/include/lldb/Host/linux/AbstractSocket.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/linux/AbstractSocket.h?rev=251034&view=auto
==
--- lldb/trunk/include/lldb/Host/linux/AbstractSocket.h (added)
+++ lldb/trunk/include/lldb/Host/linux/AbstractSocket.h Thu Oct 22 12:50:33 2015
@@ -0,0 +1,28 @@
+//===-- AbstractSocket.h *- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#ifndef liblldb_AbstractSocket_h_
+#define liblldb_AbstractSocket_h_
+
+#include "lldb/Host/posix/DomainSocket.h"
+
+namespace lldb_private
+{
+class AbstractSocket: public DomainSocket
+{
+public:
+AbstractSocket(bool child_processes_inherit, Error &error);
+
+protected:
+size_t GetNameOffset() const override;
+void DeleteSocketFile(llvm::StringRef name) override;
+};
+}
+
+#endif // ifndef liblldb_AbstractSocket_h_

Modified: lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h?rev=251034&r1=251033&r2=251034&view=diff
==
--- lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h 
(original)
+++ lldb/trunk/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h Thu Oct 
22 12:50:33 2015
@@ -84,6 +84,8 @@ class ConnectionFileDescriptor : public
 
 lldb::ConnectionStatus NamedSocketAccept(const char *socket_name, Error 
*error_ptr);
 
+lldb::ConnectionStatus UnixAbstractSocketConnect(const char *socket_name, 
Error *error_ptr);
+
 lldb::IOObjectSP m_read_sp;
 lldb::IOObjectSP m_write_sp;
 

Modified: lldb/trunk/include/lldb/Host/posix/DomainSocket.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/posix/DomainSocket.h?rev=251034&r1=251033&r2=251034&view=diff
==
--- lldb/trunk/include/lldb/Host/posix/DomainSocket.h (original)
+++ lldb/trunk/include/lldb/Host/posix/DomainSocket.h Thu Oct 22 12:50:33 2015
@@ -22,6 +22,13 @@ namespace lldb_private
 Error Connect(llvm::StringRef name) override;
 Error Listen(llvm::StringRef name, int backlog) override;
 Error Accept(llvm::StringRef name, bool child_processes_inherit, 
Socket *&socket) override;
+
+protected:
+DomainSocket(SocketProtocol protocol, bool child_processes_inherit, 
Error &error);
+
+virtual size_t GetNameOffset() const;
+virtual void DeleteSoc

[Lldb-commits] [lldb] r251044 - Set device_id to host value only in case of adb protocol.

2015-10-22 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Thu Oct 22 14:17:32 2015
New Revision: 251044

URL: http://llvm.org/viewvc/llvm-project?rev=251044&view=rev
Log:
Set device_id to host value only in case of adb protocol.

Modified:
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp

lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp

Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp?rev=251044&r1=251043&r2=251044&view=diff
==
--- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp Thu Oct 22 
14:17:32 2015
@@ -196,7 +196,8 @@ PlatformAndroid::ConnectRemote(Args& arg
 return Error("URL is null.");
 if (!UriParser::Parse(url, scheme, host, port, path))
 return Error("Invalid URL: %s", url);
-m_device_id = host;
+if (scheme == "adb")
+m_device_id = host;
 
 auto error = PlatformLinux::ConnectRemote(args);
 if (error.Success())

Modified: 
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp?rev=251044&r1=251043&r2=251044&view=diff
==
--- 
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp 
Thu Oct 22 14:17:32 2015
@@ -126,7 +126,8 @@ PlatformAndroidRemoteGDBServer::ConnectR
 return Error("URL is null.");
 if (!UriParser::Parse (url, scheme, host, remote_port, path))
 return Error("Invalid URL: %s", url);
-m_device_id = host;
+if (scheme == "adb")
+m_device_id = host;
 
 std::string connect_url;
 auto error = MakeConnectURL (g_remote_platform_pid,


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251047 - Remove special case logic for finding 3rd party libs

2015-10-22 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Oct 22 14:55:18 2015
New Revision: 251047

URL: http://llvm.org/viewvc/llvm-project?rev=251047&view=rev
Log:
Remove special case logic for finding 3rd party libs

Modified:
lldb/trunk/lldb_shared_base.py
lldb/trunk/test/dotest.py

Modified: lldb/trunk/lldb_shared_base.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb_shared_base.py?rev=251047&r1=251046&r2=251047&view=diff
==
--- lldb/trunk/lldb_shared_base.py (original)
+++ lldb/trunk/lldb_shared_base.py Thu Oct 22 14:55:18 2015
@@ -10,6 +10,6 @@ def add_third_party_module_dirs(lldb_roo
 module_dirs = os.listdir(third_party_modules_dir)
 for module_dir in module_dirs:
 module_dir = os.path.join(third_party_modules_dir, module_dir)
-sys.path.append(module_dir)
+sys.path.insert(0, module_dir)
 lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
 add_third_party_module_dirs(lldb_root)

Modified: lldb/trunk/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=251047&r1=251046&r2=251047&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Thu Oct 22 14:55:18 2015
@@ -1116,14 +1116,9 @@ def setupSysPath():
 os.environ["LLDB_SRC"] = os.path.join(scriptPath, os.pardir)
 
 pluginPath = os.path.join(scriptPath, 'plugins')
-pexpectPath = os.path.join(scriptPath, 'pexpect-2.4')
 toolsLLDBMIPath = os.path.join(scriptPath, 'tools', 'lldb-mi')
 toolsLLDBServerPath = os.path.join(scriptPath, 'tools', 'lldb-server')
 
-# Put embedded pexpect at front of the load path so we ensure we
-# use that version.
-sys.path.insert(0, pexpectPath)
-
 # Insert script dir, plugin dir, lldb-mi dir and lldb-server dir to the 
sys.path.
 sys.path.insert(0, scriptPath)
 sys.path.insert(0, pluginPath)


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251054 - Fix Clang-tidy modernize-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.

2015-10-22 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Oct 22 14:59:21 2015
New Revision: 251054

URL: http://llvm.org/viewvc/llvm-project?rev=251054&view=rev
Log:
Fix Clang-tidy modernize-use-override warnings in some files in 
include/lldb/Interpreter and Host; other minor fixes.

Differential Revision: http://reviews.llvm.org/D13602

Modified:
lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h
lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h
lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
lldb/trunk/include/lldb/Interpreter/CommandHistory.h
lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
lldb/trunk/include/lldb/Interpreter/CommandObject.h
lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h
lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
lldb/trunk/include/lldb/Interpreter/CommandOptionValidators.h
lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h
lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h
lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h
lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h
lldb/trunk/include/lldb/Interpreter/OptionGroupOutputFile.h
lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h
lldb/trunk/include/lldb/Interpreter/OptionGroupString.h
lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h
lldb/trunk/include/lldb/Interpreter/OptionGroupUUID.h
lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
lldb/trunk/include/lldb/Interpreter/OptionGroupVariable.h
lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h
lldb/trunk/include/lldb/Interpreter/Options.h
lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h

Modified: lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h?rev=251054&r1=251053&r2=251054&view=diff
==
--- lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h (original)
+++ lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h Thu Oct 22 
14:59:21 2015
@@ -10,6 +10,10 @@
 #ifndef lldb_Host_MonitoringProcessLauncher_h_
 #define lldb_Host_MonitoringProcessLauncher_h_
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Host/ProcessLauncher.h"
 
 namespace lldb_private
@@ -20,11 +24,12 @@ class MonitoringProcessLauncher : public
   public:
 explicit MonitoringProcessLauncher(std::unique_ptr 
delegate_launcher);
 
-virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, 
Error &error);
+HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error 
&error) override;
 
   private:
 std::unique_ptr m_delegate_launcher;
 };
-}
 
-#endif
+} // namespace lldb_private
+
+#endif // lldb_Host_MonitoringProcessLauncher_h_

Modified: lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h?rev=251054&r1=251053&r2=251054&view=diff
==
--- lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h (original)
+++ lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h Thu Oct 22 14:59:21 
2015
@@ -10,6 +10,10 @@
 #ifndef lldb_Host_HostProcesPosix_h_
 #define lldb_Host_HostProcesPosix_h_
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/lldb-types.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Host/HostNativeProcessBase.h"
@@ -24,7 +28,7 @@ class HostProcessPosix : public HostNati
   public:
 HostProcessPosix();
 HostProcessPosix(lldb::process_t process);
-virtual ~HostProcessPosix();
+~HostProcessPosix() override;
 
 virtual Error Signal(int signo) const;
 static Error Signal(lldb::process_t process, int signo);
@@ -37,6 +41,7 @@ class HostProcessPosix : public HostNati
 
 HostThread StartMonitoring(HostProcess::MonitorCallback callback, void 
*callback_baton, bool monitor_signals) override;
 };
-}
 
-#endif
+} // namespace lldb_private
+
+#endif // lldb_Host_HostProcesPosix_h_

Modified: lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandCompletions.h?rev=251054&r1=251053&r2=251054&view=diff
==
--- lldb/trunk/include/lldb/Interpreter/CommandCompletions.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandCompletions.h Thu Oct 22 
14:59:21 2015
@@ -54,7 +54,6 @@ public:
 // so you can add custom enums starting from here in your Option class.
 // Also if you & in this bit the base code will not process the option.
 eCustomCompletion = (1u << 9)
-
 } CommonCompletionTypes;
 
   

Re: [Lldb-commits] [PATCH] D13602: [LLDB] Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.

2015-10-22 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251054: Fix Clang-tidy modernize-use-override warnings in 
some files in… (authored by eugenezelenko).

Changed prior to commit:
  http://reviews.llvm.org/D13602?vs=36981&id=38163#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13602

Files:
  lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h
  lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h
  lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
  lldb/trunk/include/lldb/Interpreter/CommandHistory.h
  lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
  lldb/trunk/include/lldb/Interpreter/CommandObject.h
  lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h
  lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
  lldb/trunk/include/lldb/Interpreter/CommandOptionValidators.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupOutputFile.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupString.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupUUID.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupVariable.h
  lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h
  lldb/trunk/include/lldb/Interpreter/Options.h
  lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h

Index: lldb/trunk/include/lldb/Interpreter/CommandHistory.h
===
--- lldb/trunk/include/lldb/Interpreter/CommandHistory.h
+++ lldb/trunk/include/lldb/Interpreter/CommandHistory.h
@@ -17,7 +17,6 @@
 
 // Other libraries and framework includes
 // Project includes
-
 #include "lldb/lldb-private.h"
 #include "lldb/Core/Stream.h"
 #include "lldb/Host/Mutex.h"
Index: lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
===
--- lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
+++ lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h
@@ -28,17 +28,15 @@
 class CommandObjectRegexCommand : public CommandObjectRaw
 {
 public:
-
 CommandObjectRegexCommand (CommandInterpreter &interpreter,
const char *name, 
const char *help, 
const char *syntax, 
uint32_t max_matches,
uint32_t completion_type_mask,
bool is_removable);
 
-virtual
-~CommandObjectRegexCommand ();
+~CommandObjectRegexCommand() override;
 
 bool
 IsRemovable () const override { return m_is_removable; }
@@ -83,4 +81,4 @@
 
 } // namespace lldb_private
 
-#endif  // liblldb_CommandObjectRegexCommand_h_
+#endif // liblldb_CommandObjectRegexCommand_h_
Index: lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
===
--- lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
@@ -1,4 +1,4 @@
-//===-- OptionGroupValueObjectDisplay.h ---*- C++ -*-===//
+//===-- OptionGroupValueObjectDisplay.h -*- C++ -*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -26,41 +26,38 @@
 class OptionGroupValueObjectDisplay : public OptionGroup
 {
 public:
-
 OptionGroupValueObjectDisplay ();
 
-virtual
-~OptionGroupValueObjectDisplay ();
+~OptionGroupValueObjectDisplay() override;
 
+uint32_t
+GetNumDefinitions() override;
 
-virtual uint32_t
-GetNumDefinitions ();
-
-virtual const OptionDefinition*
-GetDefinitions ();
+const OptionDefinition*
+GetDefinitions() override;
 
-virtual Error
-SetOptionValue (CommandInterpreter &interpreter,
-uint32_t option_idx,
-const char *option_value);
+Error
+SetOptionValue(CommandInterpreter &interpreter,
+   uint32_t option_idx,
+   const char *option_value) override;
 
-virtual void
-OptionParsingStarting (CommandInterpreter &interpreter);
+void
+OptionParsingStarting(CommandInterpreter &interpreter) override;
 
 bool
 AnyOptionWasSet () const
 {
-return show_types == true ||
-   no_summary_depth  != 0 ||
-   show_location == true ||
-   flat_output == true ||
-   use_objc == true ||
+return show_types ||
+ 

[Lldb-commits] [lldb] r251060 - Python 3 porting - Wrap returns from map() in list()

2015-10-22 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Oct 22 15:39:59 2015
New Revision: 251060

URL: http://llvm.org/viewvc/llvm-project?rev=251060&view=rev
Log:
Python 3 porting - Wrap returns from map() in list()

Under Python 2 this has no effect, since map() returns a list.
In Python 3 map() returns an iterable, so wrapping in a list is
necessary to keep the same semantics.

Modified:
lldb/trunk/test/dosep.py
lldb/trunk/test/dotest.py
lldb/trunk/test/lldbtest.py
lldb/trunk/test/lldbutil.py

Modified: lldb/trunk/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=251060&r1=251059&r2=251060&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Thu Oct 22 15:39:59 2015
@@ -921,7 +921,7 @@ def inprocess_exec_test_runner(test_work
 socket_thread.start()
 
 # Do the work.
-test_results = map(process_dir_mapper_inprocess, test_work_items)
+test_results = list(map(process_dir_mapper_inprocess, test_work_items))
 
 # If we have a listener channel, shut it down here.
 if RESULTS_LISTENER_CHANNEL is not None:

Modified: lldb/trunk/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=251060&r1=251059&r2=251060&view=diff
==
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Thu Oct 22 15:39:59 2015
@@ -857,7 +857,7 @@ def parseOptionsAndInitTestdirs():
 
 # Gather all the dirs passed on the command line.
 if len(args.args) > 0:
-testdirs = map(os.path.abspath, args.args)
+testdirs = list(map(os.path.abspath, args.args))
 # Shut off multiprocessing mode when test directories are specified.
 no_multiprocess_test_runner = True
 

Modified: lldb/trunk/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=251060&r1=251059&r2=251060&view=diff
==
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Thu Oct 22 15:39:59 2015
@@ -186,7 +186,7 @@ def SETTING_MSG(setting):
 
 def EnvArray():
 """Returns an env variable array from the os.environ map object."""
-return map(lambda k,v: k+"="+v, os.environ.keys(), os.environ.values())
+return list(map(lambda k,v: k+"="+v, os.environ.keys(), 
os.environ.values()))
 
 def line_number(filename, string_to_match):
 """Helper function to return the line number of the first matched 
string."""

Modified: lldb/trunk/test/lldbutil.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbutil.py?rev=251060&r1=251059&r2=251060&view=diff
==
--- lldb/trunk/test/lldbutil.py (original)
+++ lldb/trunk/test/lldbutil.py Thu Oct 22 15:39:59 2015
@@ -77,7 +77,7 @@ def int_to_bytearray(val, bytesize):
 return None
 
 packed = struct.pack(fmt, val)
-return bytearray(map(ord, packed))
+return bytearray(list(map(ord, packed)))
 
 def bytearray_to_int(bytes, bytesize):
 """Utility function to convert a bytearray into an integer.
@@ -607,7 +607,7 @@ def get_function_names(thread):
 def GetFuncName(i):
 return thread.GetFrameAtIndex(i).GetFunctionName()
 
-return map(GetFuncName, range(thread.GetNumFrames()))
+return list(map(GetFuncName, range(thread.GetNumFrames(
 
 
 def get_symbol_names(thread):
@@ -617,7 +617,7 @@ def get_symbol_names(thread):
 def GetSymbol(i):
 return thread.GetFrameAtIndex(i).GetSymbol().GetName()
 
-return map(GetSymbol, range(thread.GetNumFrames()))
+return list(map(GetSymbol, range(thread.GetNumFrames(
 
 
 def get_pc_addresses(thread):
@@ -627,7 +627,7 @@ def get_pc_addresses(thread):
 def GetPCAddress(i):
 return thread.GetFrameAtIndex(i).GetPCAddress()
 
-return map(GetPCAddress, range(thread.GetNumFrames()))
+return list(map(GetPCAddress, range(thread.GetNumFrames(
 
 
 def get_filenames(thread):
@@ -637,7 +637,7 @@ def get_filenames(thread):
 def GetFilename(i):
 return 
thread.GetFrameAtIndex(i).GetLineEntry().GetFileSpec().GetFilename()
 
-return map(GetFilename, range(thread.GetNumFrames()))
+return list(map(GetFilename, range(thread.GetNumFrames(
 
 
 def get_line_numbers(thread):
@@ -647,7 +647,7 @@ def get_line_numbers(thread):
 def GetLineNumber(i):
 return thread.GetFrameAtIndex(i).GetLineEntry().GetLine()
 
-return map(GetLineNumber, range(thread.GetNumFrames()))
+return list(map(GetLineNumber, range(thread.GetNumFrames(
 
 
 def get_module_names(thread):
@@ -657,7 +657,7 @@ def get_module_names(thread):
 def GetModuleName(i):
 return 
thread.GetFrameAtIndex(i).GetModule().GetFileSpec().GetFilename()
 
-return map(GetModuleName, range(thread.GetNumFrames()))
+ 

Re: [Lldb-commits] [Diffusion] rL250335: Fix codesign command with cmake.

2015-10-22 Thread Dawn Perchik via lldb-commits
dawn added a comment.

Please review http://reviews.llvm.org/D13995 for a proposed fix.


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL250335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251066 - Fix Clang-tidy modernize-use-override warnings in include/lldb/Disassembler and OperatingSystem; other minor fixes.

2015-10-22 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Thu Oct 22 16:24:37 2015
New Revision: 251066

URL: http://llvm.org/viewvc/llvm-project?rev=251066&view=rev
Log:
Fix Clang-tidy modernize-use-override warnings in include/lldb/Disassembler and 
OperatingSystem; other minor fixes.

Second attempt which should work for MSVC.

Modified:
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp
lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h

Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=251066&r1=251065&r2=251066&view=diff
==
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Thu Oct 
22 16:24:37 2015
@@ -7,8 +7,9 @@
 //
 
//===--===//
 
-#include "DisassemblerLLVMC.h"
-
+// C Includes
+// C++ Includes
+// Project includes
 #include "llvm-c/Disassembler.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
@@ -25,6 +26,8 @@
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/ADT/SmallString.h"
 
+// Other libraries and framework includes
+#include "DisassemblerLLVMC.h"
 
 #include "lldb/Core/Address.h"
 #include "lldb/Core/DataExtractor.h"
@@ -58,13 +61,10 @@ public:
 {
 }
 
-virtual
-~InstructionLLVMC ()
-{
-}
+~InstructionLLVMC() override = default;
 
-virtual bool
-DoesBranch ()
+bool
+DoesBranch() override
 {
 if (m_does_branch == eLazyBoolCalculate)
 {
@@ -100,8 +100,8 @@ public:
 return m_does_branch == eLazyBoolYes;
 }
 
-virtual bool
-HasDelaySlot ()
+bool
+HasDelaySlot() override
 {
 if (m_has_delay_slot == eLazyBoolCalculate)
 {
@@ -155,10 +155,10 @@ public:
 return llvm_disasm.m_disasm_ap.get();
 }
 
-virtual size_t
-Decode (const lldb_private::Disassembler &disassembler,
-const lldb_private::DataExtractor &data,
-lldb::offset_t data_offset)
+size_t
+Decode(const lldb_private::Disassembler &disassembler,
+   const lldb_private::DataExtractor &data,
+   lldb::offset_t data_offset) override
 {
 // All we have to do is read the opcode which can be easy for some
 // architectures
@@ -272,8 +272,8 @@ public:
 }
 }
 
-virtual void
-CalculateMnemonicOperandsAndComment (const lldb_private::ExecutionContext 
*exe_ctx)
+void
+CalculateMnemonicOperandsAndComment(const lldb_private::ExecutionContext 
*exe_ctx) override
 {
 DataExtractor data;
 const AddressClass address_class = GetAddressClass ();
@@ -452,8 +452,6 @@ protected:
 boolm_using_file_addr;
 };
 
-
-
 DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, 
const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC 
&owner):
 m_is_valid(true)
 {
@@ -521,9 +519,7 @@ DisassemblerLLVMC::LLVMCDisassembler::LL
 m_is_valid = false;
 }
 
-DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler()
-{
-}
+DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler() = default;
 
 uint64_t
 DisassemblerLLVMC::LLVMCDisassembler::GetMCInst (const uint8_t *opcode_data,
@@ -587,38 +583,6 @@ DisassemblerLLVMC::LLVMCDisassembler::Ha
 return m_instr_info_ap->get(mc_inst.getOpcode()).hasDelaySlot();
 }
 
-bool
-DisassemblerLLVMC::FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, 
const char *flavor)
-{
-llvm::Triple triple = arch.GetTriple();
-if (flavor == NULL || strcmp (flavor, "default") == 0)
-return true;
-
-if (triple.getArch() == llvm::Triple::x86 || triple.getArch() == 
llvm::Triple::x86_64)
-{
-if (strcmp (flavor, "intel") == 0 || strcmp (flavor, "att") == 0)
-return true;
-else
-return false;
-}
-else
-return false;
-}
-
-
-Disassembler *
-DisassemblerLLVMC::CreateInstance (const ArchSpec &arch, const char *flavor)
-{
-if (arch.GetTriple().getArch() != llvm::Triple::UnknownArch)
-{
-std::unique_ptr disasm_ap (new 
DisassemblerLLVMC(arch, flavor));
-
-if (disasm_ap.get() && disasm_ap->IsValid())
-return disasm_ap.release();
-}
-return NULL;
-}
-
 DisassemblerLLVMC::DisassemblerLLVMC (const ArchSpec &arch, const char 
*flavor_string) :
 Disassembler(arch, flavor_string),
 m_exe_ctx (NULL),
@@ -782,8 +746,19 @@ DisassemblerLLVMC::DisassemblerLLVMC (co
 }
 }
 
-DisassemblerLLVMC::~DisassemblerLLVMC()
+DisassemblerLLVMC::~DisassemblerLLVMC() = default;
+
+Di

[Lldb-commits] [PATCH] D13995: [cmake] Fix cmake build on OSX after r250335 for older versions of cmake

2015-10-22 Thread Dawn Perchik via lldb-commits
dawn created this revision.
dawn added reviewers: brucem, sas, krytarowski, enlight, labath.
dawn added a subscriber: lldb-commits.
dawn set the repository for this revision to rL LLVM.

Older versions of cmake don't support the -E env option which was added in 
r250335, causing the build to fail with:

[...]
[2632/2743] Linking CXX executable bin/debugserver
FAILED: : && /usr/bin/c++   -std=c++11 -stdlib=libc++ [...]
 -o bin/debugserver  lib/liblldbDebugserverCommon.a lib/liblldbUtility.a 
lib/liblldbDebugserverMacOSX_I386.a lib/liblldbDebugserverMacOSX_X86_64.a 
-framework Cocoa -Wl,-rpath,@executable_path/../lib && cd 
/Users/testuser/build/workspace/LLVM-Clang-LLDB_master_release_OSX/llvm/build_ninja/bin
 && /usr/local/Cellar/cmake/3.0.2/bin/cmake -E env 
CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
 codesign --force --sign lldb_codesign debugserver
CMake Error: cmake version 3.0.2
Usage: /usr/local/Cellar/cmake/3.0.2/bin/cmake -E [command] [arguments ...]
Available commands:
  chdir dir cmd [args]...   - run command in a given directory
[...]

This patch fixes this by invoking codesigning as it was before the commit if 
the cmake version is less than than 3.2.

Repository:
  rL LLVM

http://reviews.llvm.org/D13995

Files:
  tools/debugserver/source/MacOSX/CMakeLists.txt

Index: tools/debugserver/source/MacOSX/CMakeLists.txt
===
--- tools/debugserver/source/MacOSX/CMakeLists.txt
+++ tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -66,13 +66,23 @@
   OUTPUT_STRIP_TRAILING_WHITESPACE
   OUTPUT_VARIABLE CODESIGN_ALLOCATE
   )
-add_custom_command(TARGET debugserver
-  POST_BUILD
-  # --entitlements option removed, as it causes errors when debugging.
-  #was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements 
${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign 
${CODESIGN_IDENTITY} debugserver
-  COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} 
codesign --force --sign ${CODESIGN_IDENTITY} debugserver
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+# Older cmake versions don't support "-E env".
+if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2)
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed, as it causes errors when debugging.
+# was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign 
--entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist 
--force --sign ${CODESIGN_IDENTITY} debugserver
+COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign 
${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
   )
+else()
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed (see comment above).
+COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} 
codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+  )
+endif()
 
 install(TARGETS debugserver
   RUNTIME DESTINATION bin


Index: tools/debugserver/source/MacOSX/CMakeLists.txt
===
--- tools/debugserver/source/MacOSX/CMakeLists.txt
+++ tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -66,13 +66,23 @@
   OUTPUT_STRIP_TRAILING_WHITESPACE
   OUTPUT_VARIABLE CODESIGN_ALLOCATE
   )
-add_custom_command(TARGET debugserver
-  POST_BUILD
-  # --entitlements option removed, as it causes errors when debugging.
-  #was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver
-  COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+# Older cmake versions don't support "-E env".
+if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2)
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed, as it causes errors when debugging.
+# was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver
+COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
   )
+else()
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed (see comment above).
+COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+  )
+endif()
 
 install(TARGETS debugserver
   RUNTIME DESTINA

Re: [Lldb-commits] [PATCH] D13970: Add support for abstract domain sockets.

2015-10-22 Thread Greg Clayton via lldb-commits
clayborg added a comment.

In http://reviews.llvm.org/D13970#273267, @ovyalov wrote:

> In http://reviews.llvm.org/D13970#273217, @clayborg wrote:
>
> > Looks good. At some point we should add these to the PluginMananger and 
> > have new instances found by having them register URL prefixes which match 
> > up with CreateInstance methods that are given the URL.
>
>
> Thank you for the idea - I was planning to have a kind of URL-based factory 
> inside lldb-server/Acceptor and PluginManager looks as a way to go.
>  If we're going to make Socket class a plugin should we then move all 
> implementations into source/Plugins/Socket folder?


Yes.


http://reviews.llvm.org/D13970



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL250335: Fix codesign command with cmake.

2015-10-22 Thread Stephane Sezer via lldb-commits
sas added a comment.

Adding quotes doesn't work. I think the patch that @dawn linked is good enough 
even though the issue is still not fixed on older cmake versions.


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL250335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13995: [cmake] Fix cmake build on OSX after r250335 for older versions of cmake

2015-10-22 Thread Stephane Sezer via lldb-commits
sas accepted this revision.
sas added a comment.
This revision is now accepted and ready to land.

Sorry for introducing this bug. I think this is good.


Repository:
  rL LLVM

http://reviews.llvm.org/D13995



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251073 - [cmake] Fix cmake build on OSX after r250335 for older versions of cmake

2015-10-22 Thread Dawn Perchik via lldb-commits
Author: dperchik
Date: Thu Oct 22 17:48:52 2015
New Revision: 251073

URL: http://llvm.org/viewvc/llvm-project?rev=251073&view=rev
Log:
[cmake] Fix cmake build on OSX after r250335 for older versions of cmake

Reviewed by: sas
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13995

Modified:
lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt

Modified: lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt?rev=251073&r1=251072&r2=251073&view=diff
==
--- lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt Thu Oct 22 
17:48:52 2015
@@ -66,13 +66,23 @@ execute_process(
   OUTPUT_STRIP_TRAILING_WHITESPACE
   OUTPUT_VARIABLE CODESIGN_ALLOCATE
   )
-add_custom_command(TARGET debugserver
-  POST_BUILD
-  # --entitlements option removed, as it causes errors when debugging.
-  #was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements 
${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign 
${CODESIGN_IDENTITY} debugserver
-  COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} 
codesign --force --sign ${CODESIGN_IDENTITY} debugserver
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+# Older cmake versions don't support "-E env".
+if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2)
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed, as it causes errors when debugging.
+# was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign 
--entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist 
--force --sign ${CODESIGN_IDENTITY} debugserver
+COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign 
${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
   )
+else()
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed (see comment above).
+COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} 
codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+  )
+endif()
 
 install(TARGETS debugserver
   RUNTIME DESTINATION bin


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13995: [cmake] Fix cmake build on OSX after r250335 for older versions of cmake

2015-10-22 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251073: [cmake] Fix cmake build on OSX after r250335 for 
older versions of cmake (authored by dperchik).

Changed prior to commit:
  http://reviews.llvm.org/D13995?vs=38176&id=38185#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13995

Files:
  lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt

Index: lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
===
--- lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
+++ lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -66,13 +66,23 @@
   OUTPUT_STRIP_TRAILING_WHITESPACE
   OUTPUT_VARIABLE CODESIGN_ALLOCATE
   )
-add_custom_command(TARGET debugserver
-  POST_BUILD
-  # --entitlements option removed, as it causes errors when debugging.
-  #was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements 
${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign 
${CODESIGN_IDENTITY} debugserver
-  COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} 
codesign --force --sign ${CODESIGN_IDENTITY} debugserver
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+# Older cmake versions don't support "-E env".
+if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2)
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed, as it causes errors when debugging.
+# was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign 
--entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist 
--force --sign ${CODESIGN_IDENTITY} debugserver
+COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign 
${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+  )
+else()
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed (see comment above).
+COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} 
codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
   )
+endif()
 
 install(TARGETS debugserver
   RUNTIME DESTINATION bin


Index: lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
===
--- lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
+++ lldb/trunk/tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -66,13 +66,23 @@
   OUTPUT_STRIP_TRAILING_WHITESPACE
   OUTPUT_VARIABLE CODESIGN_ALLOCATE
   )
-add_custom_command(TARGET debugserver
-  POST_BUILD
-  # --entitlements option removed, as it causes errors when debugging.
-  #was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver
-  COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+# Older cmake versions don't support "-E env".
+if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.2)
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed, as it causes errors when debugging.
+# was: COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/../debugserver-entitlements.plist --force --sign ${CODESIGN_IDENTITY} debugserver
+COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+  )
+else()
+  add_custom_command(TARGET debugserver
+POST_BUILD
+# Note: --entitlements option removed (see comment above).
+COMMAND ${CMAKE_COMMAND} -E env CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${CODESIGN_IDENTITY} debugserver
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
   )
+endif()
 
 install(TARGETS debugserver
   RUNTIME DESTINATION bin
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [Diffusion] rL250335: Fix codesign command with cmake.

2015-10-22 Thread Dawn Perchik via lldb-commits
dawn accepted this commit.
dawn added a comment.

Breakage with older cmake versions fixed in svn r251073.


Users:
  sas (Author)
  dawn (Auditor)

http://reviews.llvm.org/rL250335



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251080 - Summary provider for char.

2015-10-22 Thread Dawn Perchik via lldb-commits
Author: dperchik
Date: Thu Oct 22 19:02:56 2015
New Revision: 251080

URL: http://llvm.org/viewvc/llvm-project?rev=251080&view=rev
Log:
Summary provider for char.

This patch enables type summary for 'char' type. Given:
char c = 'h';
Before this patch, c evaluates as:
(char) $0 = 'h'
After this patch, we get:
(char) $0 = 104 'h'
This change allows the formatting of character types in MI to be removed
and replaced with that in lldb, and can be useful when evaluating
non-printable characters.

Patch from evgeny.levi...@gmail.com
Reviewed by: granata.enrico
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13657

Modified:
lldb/trunk/include/lldb/API/SBTypeSummary.h
lldb/trunk/source/API/SBTypeSummary.cpp

Modified: lldb/trunk/include/lldb/API/SBTypeSummary.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeSummary.h?rev=251080&r1=251079&r2=251080&view=diff
==
--- lldb/trunk/include/lldb/API/SBTypeSummary.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeSummary.h Thu Oct 22 19:02:56 2015
@@ -69,6 +69,9 @@ namespace lldb {
 public:
 
 SBTypeSummary();
+
+// Native function summary formatter callback
+typedef bool (*FormatCallback) (SBValue, SBTypeSummaryOptions, 
SBStream&);
 
 static SBTypeSummary
 CreateWithSummaryString (const char* data,
@@ -81,6 +84,10 @@ namespace lldb {
 static SBTypeSummary
 CreateWithScriptCode (const char* data,
   uint32_t options = 0); // see lldb::eTypeOption 
values
+
+static SBTypeSummary
+CreateWithCallback (FormatCallback cb, 
+uint32_t options = 0);
 
 SBTypeSummary (const lldb::SBTypeSummary &rhs);
 

Modified: lldb/trunk/source/API/SBTypeSummary.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeSummary.cpp?rev=251080&r1=251079&r2=251080&view=diff
==
--- lldb/trunk/source/API/SBTypeSummary.cpp (original)
+++ lldb/trunk/source/API/SBTypeSummary.cpp Thu Oct 22 19:02:56 2015
@@ -146,6 +146,25 @@ SBTypeSummary::CreateWithScriptCode (con
 return SBTypeSummary(TypeSummaryImplSP(new ScriptSummaryFormat(options, 
"", data)));
 }
 
+SBTypeSummary
+SBTypeSummary::CreateWithCallback (FormatCallback cb, uint32_t options)
+{
+return SBTypeSummary(
+   TypeSummaryImplSP(
+   cb ? new CXXFunctionSummaryFormat(options,
+   [cb] (ValueObject& valobj, Stream& stm, const 
TypeSummaryOptions& opt) -> bool {
+BStream stream;
+if (!cb(SBValue(valobj.GetSP()), 
SBTypeSummaryOptions(&opt), stream))
+return false;
+stm.Write(stream.GetData(), stream.GetSize());
+return true;
+   },
+   "SBTypeSummary formatter callback"
+   ) : nullptr
+)
+);
+}
+
 SBTypeSummary::SBTypeSummary (const lldb::SBTypeSummary &rhs) :
 m_opaque_sp(rhs.m_opaque_sp)
 {


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-22 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251080: Summary provider for char. (authored by dperchik).

Changed prior to commit:
  http://reviews.llvm.org/D13657?vs=37487&id=38187#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13657

Files:
  lldb/trunk/include/lldb/API/SBTypeSummary.h
  lldb/trunk/source/API/SBTypeSummary.cpp

Index: lldb/trunk/source/API/SBTypeSummary.cpp
===
--- lldb/trunk/source/API/SBTypeSummary.cpp
+++ lldb/trunk/source/API/SBTypeSummary.cpp
@@ -146,6 +146,25 @@
 return SBTypeSummary(TypeSummaryImplSP(new ScriptSummaryFormat(options, 
"", data)));
 }
 
+SBTypeSummary
+SBTypeSummary::CreateWithCallback (FormatCallback cb, uint32_t options)
+{
+return SBTypeSummary(
+   TypeSummaryImplSP(
+   cb ? new CXXFunctionSummaryFormat(options,
+   [cb] (ValueObject& valobj, Stream& stm, const 
TypeSummaryOptions& opt) -> bool {
+BStream stream;
+if (!cb(SBValue(valobj.GetSP()), 
SBTypeSummaryOptions(&opt), stream))
+return false;
+stm.Write(stream.GetData(), stream.GetSize());
+return true;
+   },
+   "SBTypeSummary formatter callback"
+   ) : nullptr
+)
+);
+}
+
 SBTypeSummary::SBTypeSummary (const lldb::SBTypeSummary &rhs) :
 m_opaque_sp(rhs.m_opaque_sp)
 {
Index: lldb/trunk/include/lldb/API/SBTypeSummary.h
===
--- lldb/trunk/include/lldb/API/SBTypeSummary.h
+++ lldb/trunk/include/lldb/API/SBTypeSummary.h
@@ -69,6 +69,9 @@
 public:
 
 SBTypeSummary();
+
+// Native function summary formatter callback
+typedef bool (*FormatCallback) (SBValue, SBTypeSummaryOptions, 
SBStream&);
 
 static SBTypeSummary
 CreateWithSummaryString (const char* data,
@@ -81,6 +84,10 @@
 static SBTypeSummary
 CreateWithScriptCode (const char* data,
   uint32_t options = 0); // see lldb::eTypeOption 
values
+
+static SBTypeSummary
+CreateWithCallback (FormatCallback cb, 
+uint32_t options = 0);
 
 SBTypeSummary (const lldb::SBTypeSummary &rhs);
 


Index: lldb/trunk/source/API/SBTypeSummary.cpp
===
--- lldb/trunk/source/API/SBTypeSummary.cpp
+++ lldb/trunk/source/API/SBTypeSummary.cpp
@@ -146,6 +146,25 @@
 return SBTypeSummary(TypeSummaryImplSP(new ScriptSummaryFormat(options, "", data)));
 }
 
+SBTypeSummary
+SBTypeSummary::CreateWithCallback (FormatCallback cb, uint32_t options)
+{
+return SBTypeSummary(
+   TypeSummaryImplSP(
+   cb ? new CXXFunctionSummaryFormat(options,
+   [cb] (ValueObject& valobj, Stream& stm, const TypeSummaryOptions& opt) -> bool {
+BStream stream;
+if (!cb(SBValue(valobj.GetSP()), SBTypeSummaryOptions(&opt), stream))
+return false;
+stm.Write(stream.GetData(), stream.GetSize());
+return true;
+   },
+   "SBTypeSummary formatter callback"
+   ) : nullptr
+)
+);
+}
+
 SBTypeSummary::SBTypeSummary (const lldb::SBTypeSummary &rhs) :
 m_opaque_sp(rhs.m_opaque_sp)
 {
Index: lldb/trunk/include/lldb/API/SBTypeSummary.h
===
--- lldb/trunk/include/lldb/API/SBTypeSummary.h
+++ lldb/trunk/include/lldb/API/SBTypeSummary.h
@@ -69,6 +69,9 @@
 public:
 
 SBTypeSummary();
+
+// Native function summary formatter callback
+typedef bool (*FormatCallback) (SBValue, SBTypeSummaryOptions, SBStream&);
 
 static SBTypeSummary
 CreateWithSummaryString (const char* data,
@@ -81,6 +84,10 @@
 static SBTypeSummary
 CreateWithScriptCode (const char* data,
   uint32_t options = 0); // see lldb::eTypeOption values
+
+static SBTypeSummary
+CreateWithCallback (FormatCallback cb, 
+uint32_t options = 0);
 
 SBTypeSummary (const lldb::SBTypeSummary &rhs);
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251082 - [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-22 Thread Dawn Perchik via lldb-commits
Author: dperchik
Date: Thu Oct 22 19:23:53 2015
New Revision: 251082

URL: http://llvm.org/viewvc/llvm-project?rev=251082&view=rev
Log:
[lldb-mi] display summary for simple types + refactor (use lldb formatting for 
all cases)

Previously, lldb did not use type summaries for simple types with no children
(like function pointers).  This patch enables MI to use lldb type summaries for
evaluation of all types of objects, so MI own formatters are no longer needed.

Patch from evgeny.levi...@gmail.com
Reviewed by: abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13799

Modified:
lldb/trunk/test/tools/lldb-mi/data/TestMiData.py
lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.h
lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.h

Modified: lldb/trunk/test/tools/lldb-mi/data/TestMiData.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/data/TestMiData.py?rev=251082&r1=251081&r2=251082&view=diff
==
--- lldb/trunk/test/tools/lldb-mi/data/TestMiData.py (original)
+++ lldb/trunk/test/tools/lldb-mi/data/TestMiData.py Thu Oct 22 19:23:53 2015
@@ -33,8 +33,8 @@ class MiDataTestCase(lldbmi_testcase.MiT
 
 # Get an address for disassembling: use main
 self.runCmd("-data-evaluate-expression main")
-self.expect("\^done,value=\"0x[0-9a-f]+\"")
-addr = int(self.child.after.split("\"")[1], 16)
+self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`main at 
main.cpp:[0-9]+\)\"")
+addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
 
 # Test -data-disassemble: try to disassemble some address
 self.runCmd("-data-disassemble -s %#x -e %#x -- 0" % (addr, addr + 
0x10))
@@ -49,8 +49,8 @@ class MiDataTestCase(lldbmi_testcase.MiT
 
 # Get an address for disassembling: use hello_world
 self.runCmd("-data-evaluate-expression hello_world")
-self.expect("\^done,value=\"0x[0-9a-f]+\"")
-addr = int(self.child.after.split("\"")[1], 16)
+self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`hello_world\(\) at 
main.cpp:[0-9]+\)\"")
+addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
 
 # Test -data-disassemble: try to disassemble some address
 self.runCmd("-data-disassemble -s %#x -e %#x -- 0" % (addr, addr + 
0x10))
@@ -288,8 +288,8 @@ class MiDataTestCase(lldbmi_testcase.MiT
 
 # Get the address of main and its line
 self.runCmd("-data-evaluate-expression main")
-self.expect("\^done,value=\"0x[0-9a-f]+\"")
-addr = int(self.child.after.split("\"")[1], 16)
+self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`main at 
main.cpp:[0-9]+\)\"")
+addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
 line = line_number('main.cpp', '// FUNC_main')
 
 # Test that -data-info-line works for address

Modified: lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py?rev=251082&r1=251081&r2=251082&view=diff
==
--- lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py (original)
+++ lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py Thu Oct 22 19:23:53 
2015
@@ -32,8 +32,8 @@ class MiSymbolTestCase(lldbmi_testcase.M
 
 # Get address of main and its line
 self.runCmd("-data-evaluate-expression main")
-self.expect("\^done,value=\"0x[0-9a-f]+\"")
-addr = int(self.child.after.split("\"")[1], 16)
+self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`main at 
main.cpp:[0-9]+\)\"")
+addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
 line = line_number('main.cpp', '// FUNC_main')
 
 # Test that -symbol-list-lines works on valid data

Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp?rev=251082&r1=251081&r2=251082&view=diff
==
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp Thu Oct 22 19:23:53 2015
@@ -12,6 +12,11 @@
 #include "lldb/API/SBThread.h"
 #include "lldb/API/SBProcess.h"
 #include "lldb/API/SBCommandInterpreter.h"
+#include "lldb/API/SBTypeSummary.h"
+#include "lldb/API/SBTypeCategory.h"
+#include "lldb/API/SBTypeNameSpecifier.h"
+#include "lldb/API/SBStream.h"
+#include "lldb/API/SBType.h"
 
 // In-house headers:
 #include "MICmnLLDBDebugger.h"
@@ -24,6 +29,40 @@
 #include "MIUtilSingletonHelper.h"
 
 //++ 

+// MI

Re: [Lldb-commits] [PATCH] D13799: [lldb-mi] display summary for simple types + refactor (use lldb formatting for all cases)

2015-10-22 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251082: [lldb-mi] display summary for simple types + 
refactor (use lldb formatting… (authored by dperchik).

Changed prior to commit:
  http://reviews.llvm.org/D13799?vs=37888&id=38188#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13799

Files:
  lldb/trunk/test/tools/lldb-mi/data/TestMiData.py
  lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
  lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp
  lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.h
  lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
  lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.h

Index: lldb/trunk/test/tools/lldb-mi/data/TestMiData.py
===
--- lldb/trunk/test/tools/lldb-mi/data/TestMiData.py
+++ lldb/trunk/test/tools/lldb-mi/data/TestMiData.py
@@ -33,8 +33,8 @@
 
 # Get an address for disassembling: use main
 self.runCmd("-data-evaluate-expression main")
-self.expect("\^done,value=\"0x[0-9a-f]+\"")
-addr = int(self.child.after.split("\"")[1], 16)
+self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`main at main.cpp:[0-9]+\)\"")
+addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
 
 # Test -data-disassemble: try to disassemble some address
 self.runCmd("-data-disassemble -s %#x -e %#x -- 0" % (addr, addr + 0x10))
@@ -49,8 +49,8 @@
 
 # Get an address for disassembling: use hello_world
 self.runCmd("-data-evaluate-expression hello_world")
-self.expect("\^done,value=\"0x[0-9a-f]+\"")
-addr = int(self.child.after.split("\"")[1], 16)
+self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`hello_world\(\) at main.cpp:[0-9]+\)\"")
+addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
 
 # Test -data-disassemble: try to disassemble some address
 self.runCmd("-data-disassemble -s %#x -e %#x -- 0" % (addr, addr + 0x10))
@@ -288,8 +288,8 @@
 
 # Get the address of main and its line
 self.runCmd("-data-evaluate-expression main")
-self.expect("\^done,value=\"0x[0-9a-f]+\"")
-addr = int(self.child.after.split("\"")[1], 16)
+self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`main at main.cpp:[0-9]+\)\"")
+addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
 line = line_number('main.cpp', '// FUNC_main')
 
 # Test that -data-info-line works for address
Index: lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
===
--- lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
+++ lldb/trunk/test/tools/lldb-mi/symbol/TestMiSymbol.py
@@ -32,8 +32,8 @@
 
 # Get address of main and its line
 self.runCmd("-data-evaluate-expression main")
-self.expect("\^done,value=\"0x[0-9a-f]+\"")
-addr = int(self.child.after.split("\"")[1], 16)
+self.expect("\^done,value=\"0x[0-9a-f]+ \(a.out`main at main.cpp:[0-9]+\)\"")
+addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
 line = line_number('main.cpp', '// FUNC_main')
 
 # Test that -symbol-list-lines works on valid data
Index: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.h
===
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.h
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.h
@@ -93,7 +93,8 @@
 bool ClientSaveMask(const CMIUtilString &vClientName, const CMIUtilString &vBroadcasterClass, const MIuint vEventMask);
 bool ClientRemoveTheirMask(const CMIUtilString &vClientName, const CMIUtilString &vBroadcasterClass);
 bool ClientGetTheirMask(const CMIUtilString &vClientName, const CMIUtilString &vBroadcasterClass, MIuint &vwEventMask);
-
+bool LoadMIFormatters(lldb::SBTypeCategory miCategory);
+bool RegisterMISummaryProviders();
 // Overridden:
   private:
 // From CMICmnBase
Index: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp
===
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugger.cpp
@@ -12,6 +12,11 @@
 #include "lldb/API/SBThread.h"
 #include "lldb/API/SBProcess.h"
 #include "lldb/API/SBCommandInterpreter.h"
+#include "lldb/API/SBTypeSummary.h"
+#include "lldb/API/SBTypeCategory.h"
+#include "lldb/API/SBTypeNameSpecifier.h"
+#include "lldb/API/SBStream.h"
+#include "lldb/API/SBType.h"
 
 // In-house headers:
 #include "MICmnLLDBDebugger.h"
@@ -24,6 +29,40 @@
 #include "MIUtilSingletonHelper.h"
 
 //++ 
+// MI private summary providers
+static inline bool
+MI_char_summary_provider(lldb::SBValue value, lldb::SBTypeSummaryOptions options, lldb::SBStream &stream)
+{
+bool is_signed;
+if (!value.IsValid())
+return false;
+
+lldb::SBType 

[Lldb-commits] [lldb] r251083 - Fixed a typo in r251080.

2015-10-22 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Thu Oct 22 19:37:54 2015
New Revision: 251083

URL: http://llvm.org/viewvc/llvm-project?rev=251083&view=rev
Log:
Fixed a typo in r251080.

Modified:
lldb/trunk/source/API/SBTypeSummary.cpp

Modified: lldb/trunk/source/API/SBTypeSummary.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeSummary.cpp?rev=251083&r1=251082&r2=251083&view=diff
==
--- lldb/trunk/source/API/SBTypeSummary.cpp (original)
+++ lldb/trunk/source/API/SBTypeSummary.cpp Thu Oct 22 19:37:54 2015
@@ -153,7 +153,7 @@ SBTypeSummary::CreateWithCallback (Forma
TypeSummaryImplSP(
cb ? new CXXFunctionSummaryFormat(options,
[cb] (ValueObject& valobj, Stream& stm, const 
TypeSummaryOptions& opt) -> bool {
-BStream stream;
+SBStream stream;
 if (!cb(SBValue(valobj.GetSP()), 
SBTypeSummaryOptions(&opt), stream))
 return false;
 stm.Write(stream.GetData(), stream.GetSize());


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-22 Thread Sean Callanan via lldb-commits
This patch failed to compile.  I fixed it with r251083.

Sean

> On Oct 22, 2015, at 5:05 PM, Phabricator via lldb-commits 
>  wrote:
> 
> +BStream stream;

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13657: [lldb] char summary provider

2015-10-22 Thread Sean Callanan via lldb-commits
spyffe added a subscriber: spyffe.
spyffe added a comment.

This patch failed to compile.  I fixed it with r251083.

Sean


Repository:
  rL LLVM

http://reviews.llvm.org/D13657



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251084 - Log information about sections that didn't make it into the target's memory.

2015-10-22 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Thu Oct 22 19:39:09 2015
New Revision: 251084

URL: http://llvm.org/viewvc/llvm-project?rev=251084&view=rev
Log:
Log information about sections that didn't make it into the target's memory.

Modified:
lldb/trunk/source/Expression/IRExecutionUnit.cpp

Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=251084&r1=251083&r2=251084&view=diff
==
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Thu Oct 22 19:39:09 2015
@@ -432,6 +432,13 @@ IRExecutionUnit::GetRunnableInfo(Error &
 my_extractor.PutToLog(log, 0, my_buffer.GetByteSize(), 
record.m_process_address, 16, DataExtractor::TypeUInt8);
 }
 }
+else
+{
+record.dump(log);
+
+DataExtractor my_extractor ((const 
void*)record.m_host_address, record.m_size, lldb::eByteOrderBig, 8);
+my_extractor.PutToLog(log, 0, record.m_size, 
record.m_host_address, 16, DataExtractor::TypeUInt8);
+}
 }
 }
 
@@ -883,12 +890,13 @@ IRExecutionUnit::AllocationRecord::dump
 if (!log)
 return;
 
-log->Printf("[0x%llx+0x%llx]->0x%llx (alignment %d, section ID %d)",
+log->Printf("[0x%llx+0x%llx]->0x%llx (alignment %d, section ID %d, name 
%s)",
 (unsigned long long)m_host_address,
 (unsigned long long)m_size,
 (unsigned long long)m_process_address,
 (unsigned)m_alignment,
-(unsigned)m_section_id);
+(unsigned)m_section_id,
+m_name.c_str());
 }
 
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251086 - Fix one more place where we were using the old

2015-10-22 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Oct 22 19:59:31 2015
New Revision: 251086

URL: http://llvm.org/viewvc/llvm-project?rev=251086&view=rev
Log:
Fix one more place where we were using the old
name of the xpc service.
 

Modified:
lldb/trunk/source/Host/macosx/Host.mm

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=251086&r1=251085&r2=251086&view=diff
==
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Thu Oct 22 19:59:31 2015
@@ -1117,11 +1117,7 @@ LaunchProcessXPC(const char *exe_path, P
 const char *xpc_service  = nil;
 bool send_auth = false;
 AuthorizationExternalForm extForm;
-if ((requested_uid == UINT32_MAX) || (requested_uid == 
HostInfo::GetEffectiveUserID()))
-{
-xpc_service = "com.apple.lldb.launcherXPCService";
-}
-else if (requested_uid == 0)
+if (requested_uid == 0)
 {
 if (AuthorizationMakeExternalForm(authorizationRef, &extForm) == 
errAuthorizationSuccess)
 {
@@ -1137,12 +1133,12 @@ LaunchProcessXPC(const char *exe_path, P
 }
 return error;
 }
-xpc_service = "com.apple.lldb.launcherRootXPCService";
+xpc_service = LaunchUsingXPCRightName;
 }
 else
 {
 error.SetError(4, eErrorTypeGeneric);
-error.SetErrorStringWithFormat("Launching via XPC is only currently 
available for either the login user or root.");
+error.SetErrorStringWithFormat("Launching via XPC is only currently 
available for root.");
 if (log)
 {
 error.PutToLog(log, "%s", error.AsCString());


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251088 - Add arm64 FreeBSD ProcessMonitor register context

2015-10-22 Thread Ed Maste via lldb-commits
Author: emaste
Date: Thu Oct 22 20:10:42 2015
New Revision: 251088

URL: http://llvm.org/viewvc/llvm-project?rev=251088&view=rev
Log:
Add arm64 FreeBSD ProcessMonitor register context

Modified:
lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp?rev=251088&r1=251087&r2=251088&view=diff
==
--- lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp Thu Oct 22 
20:10:42 2015
@@ -39,6 +39,7 @@
 #include "RegisterContextPOSIXProcessMonitor_powerpc.h"
 #include "RegisterContextPOSIXProcessMonitor_x86.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_arm.h"
+#include "Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
@@ -160,6 +161,9 @@ FreeBSDThread::GetRegisterContext()
 assert(target_arch.GetTriple().getOS() == llvm::Triple::FreeBSD);
 switch (target_arch.GetMachine())
 {
+case llvm::Triple::aarch64:
+reg_interface = new RegisterContextFreeBSD_arm64(target_arch);
+break;
 case llvm::Triple::arm:
 reg_interface = new RegisterContextFreeBSD_arm(target_arch);
 break;


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251092 - Remove some tabs that snuck into debugserver-entitlements.plist, etc.

2015-10-22 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Oct 22 21:54:21 2015
New Revision: 251092

URL: http://llvm.org/viewvc/llvm-project?rev=251092&view=rev
Log:
Remove some tabs that snuck into debugserver-entitlements.plist, etc.

Modified:
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
lldb/trunk/tools/debugserver/source/debugserver-entitlements.plist

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=251092&r1=251091&r2=251092&view=diff
==
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Thu Oct 22 21:54:21 2015
@@ -5846,13 +5846,11 @@ RNBRemote::HandlePacket_qProcessInfo (co
 DNBLogThreadedIf (LOG_RNB_PROC, "LC_VERSION_MIN_MACOSX -> 
'ostype:macosx;'");
 break;
 
-#if defined (DT_VARIANT_PONDEROSA) || TARGET_OS_TV == 1
 case LC_VERSION_MIN_TVOS:
 os_handled = true;
 rep << "ostype:tvos;";
 DNBLogThreadedIf (LOG_RNB_PROC, "LC_VERSION_MIN_TVOS -> 
'ostype:tvos;'");
 break;
-#endif
 
 case LC_VERSION_MIN_WATCHOS:
 os_handled = true;

Modified: lldb/trunk/tools/debugserver/source/debugserver-entitlements.plist
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/debugserver-entitlements.plist?rev=251092&r1=251091&r2=251092&view=diff
==
--- lldb/trunk/tools/debugserver/source/debugserver-entitlements.plist 
(original)
+++ lldb/trunk/tools/debugserver/source/debugserver-entitlements.plist Thu Oct 
22 21:54:21 2015
@@ -2,22 +2,22 @@
 http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
 
 
-   com.apple.springboard.debugapplications
-   
-   com.apple.backboardd.launchapplications
-   
-   com.apple.backboardd.debugapplications
-   
+com.apple.springboard.debugapplications
+
+com.apple.backboardd.launchapplications
+
+com.apple.backboardd.debugapplications
+
 com.apple.frontboard.launchapplications
 
 com.apple.frontboard.debugapplications
 
-   run-unsigned-code
-   
-   seatbelt-profiles
-   
-   debugserver
-   
+run-unsigned-code
+
+seatbelt-profiles
+
+debugserver
+
 com.apple.diagnosticd.diagnostic
 
 com.apple.security.network.server


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits