[Lldb-commits] [lldb] r281913 - Xcode: support gtests that use the Inputs dir

2016-09-19 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Mon Sep 19 11:42:41 2016
New Revision: 281913

URL: http://llvm.org/viewvc/llvm-project?rev=281913&view=rev
Log:
Xcode: support gtests that use the Inputs dir

This change adds support for the gtests that require input data
in the Inputs files.  This is done through a new Xcode script
phase that runs the scripts/Xcode/prepare-gtest-run-dir.sh script.
That script simply copies the contents of all unittests/**/Inputs
dirs into ${TARGET_BUILD_DIR}/Inputs before running the test.

This change also renames the Xcode 'gtest-for-debugging' to
'gtest-build', and makes the gtest "build and run" target
depend on gtest-build.  This reduces replication within the
targets.  gtest .c/.cpp files now should only be added to
the gtest-build target.

Added:
lldb/trunk/scripts/Xcode/prepare-gtest-run-dir.sh   (with props)
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=281913&r1=281912&r2=281913&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Sep 19 11:42:41 2016
@@ -59,12 +59,6 @@
23059A121958B3B2007B8189 /* SBUnixSignals.h in Headers */ = 
{isa = PBXBuildFile; fileRef = 23059A111958B37B007B8189 /* SBUnixSignals.h */; 
settings = {ATTRIBUTES = (Public, ); }; };
230EC4591D63C3A7008DF59F /* CMakeLists.txt in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 230EC4571D63C3A7008DF59F /* CMakeLists.txt */; };
230EC45B1D63C3BA008DF59F /* ThreadPlanCallOnFunctionExit.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 230EC4581D63C3A7008DF59F /* 
ThreadPlanCallOnFunctionExit.cpp */; };
-   2326CF441BDD643700A5CEAC /* liblldb-core.a in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; };
-   2326CF491BDD67D800A5CEAC /* libncurses.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 2326CF471BDD67C100A5CEAC /* libncurses.dylib */; 
};
-   2326CF4B1BDD681800A5CEAC /* libz.dylib in Frameworks */ = {isa 
= PBXBuildFile; fileRef = 2326CF4A1BDD681800A5CEAC /* libz.dylib */; };
-   2326CF4D1BDD684B00A5CEAC /* libedit.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 2326CF4C1BDD684B00A5CEAC /* libedit.dylib */; };
-   2326CF4F1BDD687800A5CEAC /* libpanel.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 2326CF4E1BDD687800A5CEAC /* libpanel.dylib */; };
-   2326CF521BDD693B00A5CEAC /* EditlineTest.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 2326CF511BDD693B00A5CEAC /* EditlineTest.cpp */; 
};
232CB615191E00CD00EF39FC /* NativeBreakpoint.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 232CB60B191E00CC00EF39FC /* 
NativeBreakpoint.cpp */; };
232CB617191E00CD00EF39FC /* NativeBreakpointList.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 232CB60D191E00CC00EF39FC /* 
NativeBreakpointList.cpp */; };
232CB619191E00CD00EF39FC /* NativeProcessProtocol.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 232CB60F191E00CC00EF39FC /* 
NativeProcessProtocol.cpp */; };
@@ -74,9 +68,6 @@
233B007F1960CB280090E598 /* ProcessLaunchInfo.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 233B007E1960CB280090E598 /* 
ProcessLaunchInfo.cpp */; };
236124A41986B4E2004EFC37 /* IOObject.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 236124A21986B4E2004EFC37 /* IOObject.cpp */; };
236124A51986B4E2004EFC37 /* Socket.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 236124A31986B4E2004EFC37 /* Socket.cpp */; };
-   2370A3861D66C594000E7BE6 /* GDBRemoteClientBaseTest.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 2370A37D1D66C587000E7BE6 /* 
GDBRemoteClientBaseTest.cpp */; };
-   2370A3871D66C594000E7BE6 /* 
GDBRemoteCommunicationClientTest.cpp in Sources */ = {isa = PBXBuildFile; 
fileRef = 2370A37E1D66C587000E7BE6 /* GDBRemoteCommunicationClientTest.cpp */; 
};
-   2370A3881D66C594000E7BE6 /* GDBRemoteTestUtils.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 2370A37F1D66C587000E7BE6 /* 
GDBRemoteTestUtils.cpp */; };
2374D7461D4BAA1D005C9575 /* CMakeLists.txt in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 2374D7431D4BAA1D005C9575 /* CMakeLists.txt */; };
2374D7521D4BB299005C9575 /* GDBRemoteClientBase.h in CopyFiles 
*/ = {isa = PBXBuildFile; fileRef = 2374D74F1D4BB299005C9575 /* 
GDBRemoteClientBase.h */; };
2374D7531D4BB2FF005C9575 /* GDBRemoteClientBase.cpp in Sources 
*/ = {isa = PBXBuildFile; fileRef = 2374D74E1D4BB299005C9575 /* 
GDBRemoteClientBase.cpp */; };
@@ -87,25 +78,10 @@
238F2BA81D2C85FA001FF92A /* StructuredDataDarwinLog.cpp in 
Sou

Re: [Lldb-commits] [PATCH] D24711: [lldb-mi] Fix implementation for a few mi commands

2016-09-19 Thread Aetf via lldb-commits
aetf added a comment.

Okay, tests should go to `packages/Python/lldbsuite/test/tools/lldb-mi`, right? 
I need to get familiar with them first.


Repository:
  rL LLVM

https://reviews.llvm.org/D24711



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


[Lldb-commits] [PATCH] D24711: [lldb-mi] Fix implementation for a few mi commands

2016-09-19 Thread Aetf via lldb-commits
aetf created this revision.
aetf added a reviewer: ki.stfu.
aetf added a subscriber: lldb-commits.
Herald added a subscriber: ki.stfu.

Some of the mi commands implemented in lldb-mi are incomplete/not confirming to 
the spec.
- `gdb-show` and `gdb-set` doesn't support getting/setting `disassembly-flavor`
- `environment-cd` should also change the working directory for inferior
- debugger CLI output should be printed as console-stream-output record, rather 
than dump directly
to stdout
- `target-select` should provide inner error message in mi response

Related bug report:
- https://llvm.org/bugs/show_bug.cgi?id=28026
- https://llvm.org/bugs/show_bug.cgi?id=28718
- https://llvm.org/bugs/show_bug.cgi?id=30265

https://reviews.llvm.org/D24711

Files:
  tools/lldb-mi/MICmdCmdEnviro.cpp
  tools/lldb-mi/MICmdCmdGdbSet.cpp
  tools/lldb-mi/MICmdCmdGdbSet.h
  tools/lldb-mi/MICmdCmdGdbShow.cpp
  tools/lldb-mi/MICmdCmdGdbShow.h
  tools/lldb-mi/MICmdCmdMiscellanous.cpp
  tools/lldb-mi/MICmdCmdTarget.cpp
  tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
  tools/lldb-mi/MICmnMIOutOfBandRecord.h

Index: tools/lldb-mi/MICmnMIOutOfBandRecord.h
===
--- tools/lldb-mi/MICmnMIOutOfBandRecord.h
+++ tools/lldb-mi/MICmnMIOutOfBandRecord.h
@@ -66,6 +66,8 @@
 eOutOfBand_TargetModuleLoaded,
 eOutOfBand_TargetModuleUnloaded,
 eOutOfBand_TargetStreamOutput
+eOutOfBand_ConsoleStreamOutput,
+eOutOfBand_LogStreamOutput
   };
 
   // Methods:
Index: tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
===
--- tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
+++ tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
@@ -48,6 +48,10 @@
 return "library-unloaded";
   case CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput:
 return "";
+  case CMICmnMIOutOfBandRecord::eOutOfBand_ConsoleStreamOutput:
+return "";
+  case CMICmnMIOutOfBandRecord::eOutOfBand_LogStreamOutput:
+return "";
   }
   assert(false && "unknown CMICmnMIOutofBandRecord::OutOfBand_e");
   return NULL;
@@ -86,6 +90,10 @@
 return "=";
   case CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput:
 return "@";
+  case CMICmnMIOutOfBandRecord::eOutOfBand_ConsoleStreamOutput:
+return "~";
+  case CMICmnMIOutOfBandRecord::eOutOfBand_LogStreamOutput:
+return "&";
   }
   assert(false && "unknown CMICmnMIOutofBandRecord::OutOfBand_e");
   return NULL;
Index: tools/lldb-mi/MICmdCmdTarget.cpp
===
--- tools/lldb-mi/MICmdCmdTarget.cpp
+++ tools/lldb-mi/MICmdCmdTarget.cpp
@@ -123,6 +123,7 @@
 
   // Verify that we have managed to connect successfully
   lldb::SBStream errMsg;
+  error.GetDescription(errMsg);
   if (!process.IsValid()) {
 SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_PLUGIN),
m_cmdData.strMiCmd.c_str(),
Index: tools/lldb-mi/MICmdCmdMiscellanous.cpp
===
--- tools/lldb-mi/MICmdCmdMiscellanous.cpp
+++ tools/lldb-mi/MICmdCmdMiscellanous.cpp
@@ -496,14 +496,22 @@
 //--
 bool CMICmdCmdInterpreterExec::Acknowledge() {
   if (m_lldbResult.GetOutputSize() > 0) {
-CMIUtilString strMsg(m_lldbResult.GetOutput());
-strMsg = strMsg.StripCREndOfLine();
-CMICmnStreamStdout::TextToStdout(strMsg);
+const CMIUtilString line(m_lldbResult.GetOutput());
+const bool bEscapeQuotes(true);
+CMICmnMIValueConst miValueConst(line.Escape(bEscapeQuotes));
+CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_ConsoleStreamOutput, miValueConst);
+const bool bOk = CMICmnStreamStdout::TextToStdout(miOutOfBandRecord.GetString());
+if (!bOk)
+  return MIstatus::failure;
   }
   if (m_lldbResult.GetErrorSize() > 0) {
-CMIUtilString strMsg(m_lldbResult.GetError());
-strMsg = strMsg.StripCREndOfLine();
-CMICmnStreamStderr::LLDBMsgToConsole(strMsg);
+const CMIUtilString line(m_lldbResult.GetError());
+const bool bEscapeQuotes(true);
+CMICmnMIValueConst miValueConst(line.Escape(bEscapeQuotes));
+CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_LogStreamOutput, miValueConst);
+const bool bOk = CMICmnStreamStdout::TextToStdout(miOutOfBandRecord.GetString());
+if (!bOk)
+  return MIstatus::failure;
   }
 
   const CMICmnMIResultRecord miRecordResult(
Index: tools/lldb-mi/MICmdCmdGdbShow.h
===
--- tools/lldb-mi/MICmdCmdGdbShow.h
+++ tools/lldb-mi/MICmdCmdGdbShow.h
@@ -78,6 +78,7 @@
   bool OptionFnTargetAsync(const CMIUtilString::VecString_t &vrWords);
   bool OptionFnPrint(const CMIUtilString::VecString_t &vrWords);
   bool OptionFnLanguage(const CMIUtilString::VecString_t &vrWords);
+  bool OptionFnDisassemblyFlavor(const CMIUtilString::VecString_t &vrWords);
   bool OptionFnFallback(const CMIUt

Re: [Lldb-commits] [PATCH] D23977: Support of lldb on Kfreebsd

2016-09-19 Thread Todd Fiala via lldb-commits
tfiala added a comment.

@sylvestre.ledru, I think this will be ready to go if you can convert that 
check to a CMake built-in check.  Maybe you can pass that along to Pino Toscano?


https://reviews.llvm.org/D23977



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


Re: [Lldb-commits] [PATCH] D20835: Mark the current column when displaying the context of the current breakpoint on the terminal.

2016-09-19 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Coming back to this today.


https://reviews.llvm.org/D20835



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


[Lldb-commits] [lldb] r281919 - Fix more functions in Args to use StringRef.

2016-09-19 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Mon Sep 19 12:54:06 2016
New Revision: 281919

URL: http://llvm.org/viewvc/llvm-project?rev=281919&view=rev
Log:
Fix more functions in Args to use StringRef.

This patch also marks the const char* versions as =delete to prevent
their use.  This has the potential to cause build breakages on some
platforms which I can't compile.  I have tested on Windows, Linux,
and OSX.  Best practices for fixing broken callsites are outlined in
Args.h in a comment above the deleted function declarations.

Eventually we can remove these =delete declarations, but for now they
are important to make sure that all implicit conversions from
const char * are manually audited to make sure that they do not invoke a
conversion from nullptr.

Modified:
lldb/trunk/include/lldb/Interpreter/Args.h
lldb/trunk/source/API/SBPlatform.cpp
lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectLog.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Commands/CommandObjectMultiword.cpp
lldb/trunk/source/Commands/CommandObjectPlatform.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/trunk/source/Host/linux/Host.cpp
lldb/trunk/source/Host/windows/Host.cpp
lldb/trunk/source/Interpreter/Args.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Interpreter/CommandObject.cpp
lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp
lldb/trunk/source/Interpreter/OptionValueBoolean.cpp
lldb/trunk/source/Interpreter/OptionValueDictionary.cpp
lldb/trunk/source/Interpreter/Property.cpp

lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/ProcessInfo.cpp
lldb/trunk/source/Target/ProcessLaunchInfo.cpp
lldb/trunk/unittests/Interpreter/TestArgs.cpp

Modified: lldb/trunk/include/lldb/Interpreter/Args.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=281919&r1=281918&r2=281919&view=diff
==
--- lldb/trunk/include/lldb/Interpreter/Args.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Args.h Mon Sep 19 12:54:06 2016
@@ -179,13 +179,53 @@ public:
   /// @return
   /// The NULL terminated C string of the copy of \a arg_cstr.
   //--
-  // TODO: Convert this function to use a StringRef.
-  const char *AppendArgument(const char *arg_cstr, char quote_char = '\0');
+  llvm::StringRef AppendArgument(llvm::StringRef arg_str,
+ char quote_char = '\0');
 
   void AppendArguments(const Args &rhs);
 
   void AppendArguments(const char **argv);
 
+  // Delete const char* versions of StringRef functions.  Normally this would
+  // not
+  // be necessary, as const char * is implicitly convertible to StringRef.
+  // However,
+  // since the use of const char* is so pervasive, and since StringRef will
+  // assert
+  // if you try to construct one from nullptr, this allows the compiler to 
catch
+  // instances of the function being invoked with a const char *, allowing us 
to
+  // replace them with explicit conversions at each call-site.  Once StringRef
+  // use becomes more pervasive, there will be fewer implicit conversions
+  // because
+  // we will be using StringRefs across the whole pipeline, so we won't have to
+  // have
+  // this "glue" that converts between the two, and at that point it becomes
+  // easy
+  // to just make sure you don't pass nullptr into the function.
+  // Call-site fixing methodology:
+  //   1. If you know the string cannot be null (e.g. it's a const char[], or
+  //   it's
+  //  been checked for null), use llvm::StringRef(ptr).
+  //   2. If you don't know if it can be null (e.g. it's returned from a
+  //   function
+  //  whose semantics are unclear), use
+  //  llvm::StringRef::withNullAsEmpty(ptr).
+  //   3. If it's .c_str() of a std::string, just pass the std::string 
directly.
+  //   4. If it's .str().c_str() of a String

[Lldb-commits] [lldb] r281922 - Try to fix freebsd and android builds.

2016-09-19 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Mon Sep 19 13:03:54 2016
New Revision: 281922

URL: http://llvm.org/viewvc/llvm-project?rev=281922&view=rev
Log:
Try to fix freebsd and android builds.

Modified:
lldb/trunk/source/Host/freebsd/Host.cpp
lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp

Modified: lldb/trunk/source/Host/freebsd/Host.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/freebsd/Host.cpp?rev=281922&r1=281921&r2=281922&view=diff
==
--- lldb/trunk/source/Host/freebsd/Host.cpp (original)
+++ lldb/trunk/source/Host/freebsd/Host.cpp Mon Sep 19 13:03:54 2016
@@ -102,7 +102,7 @@ GetFreeBSDProcessArgs(const ProcessInsta
 
   cstr = data.GetCStr(&offset);
   if (cstr)
-proc_args.AppendArgument(cstr);
+proc_args.AppendArgument(llvm::StringRef(cstr));
   else
 return true;
 }

Modified: lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp?rev=281922&r1=281921&r2=281922&view=diff
==
--- lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp (original)
+++ lldb/trunk/source/Host/linux/ProcessLauncherLinux.cpp Mon Sep 19 13:03:54 
2016
@@ -36,7 +36,7 @@ static void FixupEnvironment(Args &env)
   for (const char **args = env.GetConstArgumentVector(); *args; ++args)
 if (::strncmp(path, *args, path_len) == 0)
   return;
-  env.AppendArgument("PATH=/system/bin");
+  env.AppendArgument(llvm::StringRef("PATH=/system/bin"));
 #endif
 }
 


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


Re: [Lldb-commits] [PATCH] D24284: [lldb] Read modules from memory when a local copy is not available

2016-09-19 Thread walter erquinigo via lldb-commits
wallace updated this revision to Diff 71853.
wallace added a comment.

s/NULL/nullptr/


https://reviews.llvm.org/D24284

Files:
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h

Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
===
--- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
@@ -50,6 +50,10 @@
const lldb_private::FileSpec *file,
lldb::offset_t file_offset, lldb::offset_t length);
 
+  ObjectFilePECOFF(const lldb::ModuleSP &module_sp,
+   lldb::DataBufferSP &header_data_sp,
+   const lldb::ProcessSP &process_sp, lldb::addr_t header_addr);
+
   ~ObjectFilePECOFF() override;
 
   //--
@@ -131,29 +135,31 @@
 bool
 IsThumb();
 
-protected:
-  bool NeedsEndianSwap() const;
-
-  typedef struct dos_header { // DOS .EXE header
-uint16_t e_magic; // Magic number
-uint16_t e_cblp;  // Bytes on last page of file
-uint16_t e_cp;// Pages in file
-uint16_t e_crlc;  // Relocations
-uint16_t e_cparhdr;   // Size of header in paragraphs
-uint16_t e_minalloc;  // Minimum extra paragraphs needed
-uint16_t e_maxalloc;  // Maximum extra paragraphs needed
-uint16_t e_ss;// Initial (relative) SS value
-uint16_t e_sp;// Initial SP value
-uint16_t e_csum;  // Checksum
-uint16_t e_ip;// Initial IP value
-uint16_t e_cs;// Initial (relative) CS value
-uint16_t e_lfarlc;// File address of relocation table
-uint16_t e_ovno;  // Overlay number
-uint16_t e_res[4];// Reserved words
-uint16_t e_oemid; // OEM identifier (for e_oeminfo)
-uint16_t e_oeminfo;   // OEM information; e_oemid specific
-uint16_t e_res2[10];  // Reserved words
-uint32_t e_lfanew;// File address of new exe header
+lldb_private::DataExtractor ReadImageData(uint32_t offset, size_t size);
+
+  protected:
+bool NeedsEndianSwap() const;
+
+typedef struct dos_header { // DOS .EXE header
+  uint16_t e_magic; // Magic number
+  uint16_t e_cblp;  // Bytes on last page of file
+  uint16_t e_cp;// Pages in file
+  uint16_t e_crlc;  // Relocations
+  uint16_t e_cparhdr;   // Size of header in paragraphs
+  uint16_t e_minalloc;  // Minimum extra paragraphs needed
+  uint16_t e_maxalloc;  // Maximum extra paragraphs needed
+  uint16_t e_ss;// Initial (relative) SS value
+  uint16_t e_sp;// Initial SP value
+  uint16_t e_csum;  // Checksum
+  uint16_t e_ip;// Initial IP value
+  uint16_t e_cs;// Initial (relative) CS value
+  uint16_t e_lfarlc;// File address of relocation table
+  uint16_t e_ovno;  // Overlay number
+  uint16_t e_res[4];// Reserved words
+  uint16_t e_oemid; // OEM identifier (for e_oeminfo)
+  uint16_t e_oeminfo;   // OEM information; e_oemid specific
+  uint16_t e_res2[10];  // Reserved words
+  uint32_t e_lfanew;// File address of new exe header
   } dos_header_t;
 
   typedef struct coff_header {
Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
===
--- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -10,10 +10,12 @@
 #include "ObjectFilePECOFF.h"
 #include "WindowsMiniDump.h"
 
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/COFF.h"
 
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/DataBuffer.h"
+#include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -83,7 +85,15 @@
 ObjectFile *ObjectFilePECOFF::CreateMemoryInstance(
 const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
 const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) {
-  return NULL;
+  if (!data_sp || !ObjectFilePECOFF::MagicBytesMatch(data_sp)) {
+return nullptr;
+  }
+  auto objfile_ap = llvm::make_unique(
+  module_sp, data_sp, process_sp, header_addr);
+  if (objfile_ap.get() && objfile_ap->ParseHeader()) {
+return objfile_ap.release();
+  }
+  return nullptr;
 }
 
 size_t ObjectFilePECOFF::GetModuleSpecifications(
@@ -164,6 +174,18 @@
   ::memset(&m_coff_header_opt, 0, sizeof(m_coff_header_opt));
 }
 
+ObjectFilePECOFF::ObjectFilePECOFF(const lldb::ModuleSP &module_sp,
+   DataBufferSP &header_data_sp,
+   const lldb::ProcessSP &process_sp,
+   

Re: [Lldb-commits] [PATCH] D24284: [lldb] Read modules from memory when a local copy is not available

2016-09-19 Thread walter erquinigo via lldb-commits
wallace updated this revision to Diff 71855.
wallace added a comment.

rebase


https://reviews.llvm.org/D24284

Files:
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h

Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
===
--- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
@@ -50,6 +50,10 @@
const lldb_private::FileSpec *file,
lldb::offset_t file_offset, lldb::offset_t length);
 
+  ObjectFilePECOFF(const lldb::ModuleSP &module_sp,
+   lldb::DataBufferSP &header_data_sp,
+   const lldb::ProcessSP &process_sp, lldb::addr_t header_addr);
+
   ~ObjectFilePECOFF() override;
 
   //--
@@ -128,29 +132,31 @@
 
   uint32_t GetPluginVersion() override;
 
-protected:
-  bool NeedsEndianSwap() const;
-
-  typedef struct dos_header { // DOS .EXE header
-uint16_t e_magic; // Magic number
-uint16_t e_cblp;  // Bytes on last page of file
-uint16_t e_cp;// Pages in file
-uint16_t e_crlc;  // Relocations
-uint16_t e_cparhdr;   // Size of header in paragraphs
-uint16_t e_minalloc;  // Minimum extra paragraphs needed
-uint16_t e_maxalloc;  // Maximum extra paragraphs needed
-uint16_t e_ss;// Initial (relative) SS value
-uint16_t e_sp;// Initial SP value
-uint16_t e_csum;  // Checksum
-uint16_t e_ip;// Initial IP value
-uint16_t e_cs;// Initial (relative) CS value
-uint16_t e_lfarlc;// File address of relocation table
-uint16_t e_ovno;  // Overlay number
-uint16_t e_res[4];// Reserved words
-uint16_t e_oemid; // OEM identifier (for e_oeminfo)
-uint16_t e_oeminfo;   // OEM information; e_oemid specific
-uint16_t e_res2[10];  // Reserved words
-uint32_t e_lfanew;// File address of new exe header
+  lldb_private::DataExtractor ReadImageData(uint32_t offset, size_t size);
+
+  protected:
+bool NeedsEndianSwap() const;
+
+typedef struct dos_header { // DOS .EXE header
+  uint16_t e_magic; // Magic number
+  uint16_t e_cblp;  // Bytes on last page of file
+  uint16_t e_cp;// Pages in file
+  uint16_t e_crlc;  // Relocations
+  uint16_t e_cparhdr;   // Size of header in paragraphs
+  uint16_t e_minalloc;  // Minimum extra paragraphs needed
+  uint16_t e_maxalloc;  // Maximum extra paragraphs needed
+  uint16_t e_ss;// Initial (relative) SS value
+  uint16_t e_sp;// Initial SP value
+  uint16_t e_csum;  // Checksum
+  uint16_t e_ip;// Initial IP value
+  uint16_t e_cs;// Initial (relative) CS value
+  uint16_t e_lfarlc;// File address of relocation table
+  uint16_t e_ovno;  // Overlay number
+  uint16_t e_res[4];// Reserved words
+  uint16_t e_oemid; // OEM identifier (for e_oeminfo)
+  uint16_t e_oeminfo;   // OEM information; e_oemid specific
+  uint16_t e_res2[10];  // Reserved words
+  uint32_t e_lfanew;// File address of new exe header
   } dos_header_t;
 
   typedef struct coff_header {
Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
===
--- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -10,10 +10,12 @@
 #include "ObjectFilePECOFF.h"
 #include "WindowsMiniDump.h"
 
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/COFF.h"
 
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/DataBuffer.h"
+#include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -83,7 +85,15 @@
 ObjectFile *ObjectFilePECOFF::CreateMemoryInstance(
 const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
 const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) {
-  return NULL;
+  if (!data_sp || !ObjectFilePECOFF::MagicBytesMatch(data_sp)) {
+return nullptr;
+  }
+  auto objfile_ap = llvm::make_unique(
+  module_sp, data_sp, process_sp, header_addr);
+  if (objfile_ap.get() && objfile_ap->ParseHeader()) {
+return objfile_ap.release();
+  }
+  return nullptr;
 }
 
 size_t ObjectFilePECOFF::GetModuleSpecifications(
@@ -161,6 +171,18 @@
   ::memset(&m_coff_header_opt, 0, sizeof(m_coff_header_opt));
 }
 
+ObjectFilePECOFF::ObjectFilePECOFF(const lldb::ModuleSP &module_sp,
+   DataBufferSP &header_data_sp,
+   const lldb::ProcessSP &process_sp,
+ 

[Lldb-commits] [lldb] r281926 - Fix compilation of unit tests.

2016-09-19 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Mon Sep 19 13:32:23 2016
New Revision: 281926

URL: http://llvm.org/viewvc/llvm-project?rev=281926&view=rev
Log:
Fix compilation of unit tests.

Modified:
lldb/trunk/unittests/Interpreter/TestArgs.cpp

Modified: lldb/trunk/unittests/Interpreter/TestArgs.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Interpreter/TestArgs.cpp?rev=281926&r1=281925&r2=281926&view=diff
==
--- lldb/trunk/unittests/Interpreter/TestArgs.cpp (original)
+++ lldb/trunk/unittests/Interpreter/TestArgs.cpp Mon Sep 19 13:32:23 2016
@@ -65,41 +65,39 @@ TEST(ArgsTest, TestAppendArg) {
 
 TEST(ArgsTest, StringToBoolean) {
   bool success = false;
-  EXPECT_TRUE(Args::StringToBoolean("true", false, nullptr));
-  EXPECT_TRUE(Args::StringToBoolean("on", false, nullptr));
-  EXPECT_TRUE(Args::StringToBoolean("yes", false, nullptr));
-  EXPECT_TRUE(Args::StringToBoolean("1", false, nullptr));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("true"), false, nullptr));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("on"), false, nullptr));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("yes"), false, nullptr));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("1"), false, nullptr));
 
-  EXPECT_TRUE(Args::StringToBoolean("true", false, &success));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("true"), false, &success));
   EXPECT_TRUE(success);
-  EXPECT_TRUE(Args::StringToBoolean("on", false, &success));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("on"), false, &success));
   EXPECT_TRUE(success);
-  EXPECT_TRUE(Args::StringToBoolean("yes", false, &success));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("yes"), false, &success));
   EXPECT_TRUE(success);
-  EXPECT_TRUE(Args::StringToBoolean("1", false, &success));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("1"), false, &success));
   EXPECT_TRUE(success);
 
-  EXPECT_FALSE(Args::StringToBoolean("false", true, nullptr));
-  EXPECT_FALSE(Args::StringToBoolean("off", true, nullptr));
-  EXPECT_FALSE(Args::StringToBoolean("no", true, nullptr));
-  EXPECT_FALSE(Args::StringToBoolean("0", true, nullptr));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("false"), true, nullptr));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("off"), true, nullptr));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("no"), true, nullptr));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("0"), true, nullptr));
 
-  EXPECT_FALSE(Args::StringToBoolean("false", true, &success));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("false"), true, 
&success));
   EXPECT_TRUE(success);
-  EXPECT_FALSE(Args::StringToBoolean("off", true, &success));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("off"), true, &success));
   EXPECT_TRUE(success);
-  EXPECT_FALSE(Args::StringToBoolean("no", true, &success));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("no"), true, &success));
   EXPECT_TRUE(success);
-  EXPECT_FALSE(Args::StringToBoolean("0", true, &success));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("0"), true, &success));
   EXPECT_TRUE(success);
 
-  EXPECT_FALSE(Args::StringToBoolean("10", false, &success));
+  EXPECT_FALSE(Args::StringToBoolean(llvm::StringRef("10"), false, &success));
   EXPECT_FALSE(success);
-  EXPECT_TRUE(Args::StringToBoolean("10", true, &success));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef("10"), true, &success));
   EXPECT_FALSE(success);
-  EXPECT_TRUE(Args::StringToBoolean("", true, &success));
-  EXPECT_FALSE(success);
-  EXPECT_TRUE(Args::StringToBoolean(nullptr, true, &success));
+  EXPECT_TRUE(Args::StringToBoolean(llvm::StringRef(""), true, &success));
   EXPECT_FALSE(success);
 }
 
@@ -124,30 +122,32 @@ TEST(ArgsTest, StringToScriptLanguage) {
   bool success = false;
 
   EXPECT_EQ(lldb::eScriptLanguageDefault,
-Args::StringToScriptLanguage("default", lldb::eScriptLanguageNone,
- nullptr));
+Args::StringToScriptLanguage(llvm::StringRef("default"),
+ lldb::eScriptLanguageNone, nullptr));
   EXPECT_EQ(lldb::eScriptLanguagePython,
-Args::StringToScriptLanguage("python", lldb::eScriptLanguageNone,
- nullptr));
+Args::StringToScriptLanguage(llvm::StringRef("python"),
+ lldb::eScriptLanguageNone, nullptr));
   EXPECT_EQ(lldb::eScriptLanguageNone,
-Args::StringToScriptLanguage("none", lldb::eScriptLanguagePython,
- nullptr));
+Args::StringToScriptLanguage(llvm::StringRef("none"),
+ lldb::eScriptLanguagePython, 
nullptr));
 
   EXPECT_EQ(lldb::eScriptLanguageDefault,
-Args::StringToScriptLanguage("default", lldb::eScriptLanguageNone,
-   

Re: [Lldb-commits] [PATCH] D23977: Support of lldb on Kfreebsd

2016-09-19 Thread Ed Maste via lldb-commits
emaste requested changes to this revision.
emaste added a reviewer: emaste.
emaste added a comment.
This revision now requires changes to proceed.

Two requested changes called out in comments above


https://reviews.llvm.org/D23977



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


Re: [Lldb-commits] [PATCH] D24610: LLDB Arm Watchpoints: Use single hardware watchpoint slot to watch multiple bytes where possible

2016-09-19 Thread Muhammad Omair Javaid via lldb-commits
omjavaid added a comment.

Answers to comments. I will upload a updated patch after corrections and 
updates.



Comment at: 
packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/main.c:23
@@ +22,3 @@
+{
+printf("About to write byteArray[%d] ...\n", i); // About to write 
byteArray
+

labath wrote:
> zturner wrote:
> > What's up with all the double spaced source code?  Is this intentional?
> Indeed. The spaces seem superfluous.
Agreed. Will be removed in next iteration.


Comment at: 
source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp:513-521
@@ -513,1 +512,11 @@
+
+  // Find out how many bytes we need to watch after 4-byte alignment boundary.
+  uint8_t watch_size = (addr & 0x03) + size;
+
+  // We cannot watch zero or more than 4 bytes after 4-byte alignment boundary.
+  if (size == 0 || watch_size > 4)
+return LLDB_INVALID_INDEX32;
+
+  // Strip away last two bits of address for byte/half-word/word selection.
+  addr &= ~((lldb::addr_t)3);
 

labath wrote:
> zturner wrote:
> > This block of code is a bit confusing to me.  Is this equivalent to:
> > 
> > ```
> > lldb::addr_t start = llvm::alignDown(addr, 4);
> > lldb::addr_t end = addr + size;
> > if (start == end || (end-start)>4)
> >   return LLDB_INVALID_INDEX32;
> > ```
> I am not sure this is much clearer, especially, as we will later need a 
> separate varaible for `end-start` anyway.
> 
> +1 for `llvm::alignDown` though.
There is significant performance difference when we choose addr = addr & 
(~0x03); over llvm::alignDown

It will eventually effect responsiveness if we keep increasing code size like 
this. 

Even if we use -Os then alignDown is squeezed down to 8-9 instructions. I havnt 
tried clang though.

Instructions needed for addr = addr & (~0x03):
  4008bd:   48 8b 45 e8 mov-0x18(%rbp),%rax
  4008c1:   48 83 e0 fc and$0xfffc,%rax
  4008c5:   48 89 45 e8 mov%rax,-0x18(%rbp)

Call penalty for llvm::alignDown
400918: ba 00 00 00 00  mov$0x0,%edx
  40091d:   48 89 cemov%rcx,%rsi
  400920:   48 89 c7mov%rax,%rdi
  400923:   e8 ae 00 00 00  callq  4009d6 <_Z9alignDownmmm>
  400928:   49 89 c4mov%rax,%r12
  40092b:   48 8b 5d d8 mov-0x28(%rbp),%rbx

Disassembly for llvm::alignDown
004009d6 <_Z9alignDownmmm>:
  4009d6:   55  push   %rbp
  4009d7:   48 89 e5mov%rsp,%rbp
  4009da:   48 89 7d f8 mov%rdi,-0x8(%rbp)
  4009de:   48 89 75 f0 mov%rsi,-0x10(%rbp)
  4009e2:   48 89 55 e8 mov%rdx,-0x18(%rbp)
  4009e6:   48 8b 45 e8 mov-0x18(%rbp),%rax
  4009ea:   ba 00 00 00 00  mov$0x0,%edx
  4009ef:   48 f7 75 f0 divq   -0x10(%rbp)
  4009f3:   48 89 55 e8 mov%rdx,-0x18(%rbp)
  4009f7:   48 8b 45 f8 mov-0x8(%rbp),%rax
  4009fb:   48 2b 45 e8 sub-0x18(%rbp),%rax
  4009ff:   ba 00 00 00 00  mov$0x0,%edx
  400a04:   48 f7 75 f0 divq   -0x10(%rbp)
  400a08:   48 0f af 45 f0  imul   -0x10(%rbp),%rax
  400a0d:   48 89 c2mov%rax,%rdx
  400a10:   48 8b 45 e8 mov-0x18(%rbp),%rax
  400a14:   48 01 d0add%rdx,%rax
  400a17:   5d  pop%rbp
  400a18:   c3  retq   
  400a19:   0f 1f 80 00 00 00 00nopl   0x0(%rax)

Number of instructions generated for alignDown with gcc -Os

  400892:   48 8b 6c 24 08  mov0x8(%rsp),%rbp
  400897:   48 8b 4c 24 10  mov0x10(%rsp),%rcx
  40089c:   31 d2   xor%edx,%edx
  40089e:   be c2 0a 40 00  mov$0x400ac2,%esi
  4008a3:   bf a0 11 60 00  mov$0x6011a0,%edi
  4008a8:   48 89 e8mov%rbp,%rax
  4008ab:   48 f7 f1div%rcx
  4008ae:   48 0f af c1 imul   %rcx,%rax
  4008b2:   48 89 c3mov%rax,%rbx


Comment at: source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp:552
@@ -559,1 +551,3 @@
 
+  uint8_t current_watch_size, new_watch_size;
+  // Calculate overall size width to be watched by current hardware watchpoint 
slot.

labath wrote:
> Looks much better. Any reason for not using `NextPowerOf2` ? Among other 
> things, it is self-documenting, so you do not need the comment above that.
so llvm::NextPowerOf2 doesnt serve the intended behaviour.

llvm::NextPowerOf2 returns 2 for 1, 4 for 2 or 3, and 8 for 4.

We just want to make sure that our new_size is a power of 2 if its already not 
which will only be the case if size turns out to be 3.


Re: [Lldb-commits] [PATCH] D22831: [LLDB] Documentation for SBAddress class

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Please rebase from trunk and run Clang-format.


Repository:
  rL LLVM

https://reviews.llvm.org/D22831



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


[Lldb-commits] [lldb] r281942 - Convert 3 more functions to use a StringRef.

2016-09-19 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Mon Sep 19 16:56:59 2016
New Revision: 281942

URL: http://llvm.org/viewvc/llvm-project?rev=281942&view=rev
Log:
Convert 3 more functions to use a StringRef.

This converts Args::Unshift, Args::AddOrReplaceEnvironmentVariable,
and Args::ContainsEnvironmentVariable to use StringRefs.  The code
is also simplified somewhat as a result.

Modified:
lldb/trunk/include/lldb/Interpreter/Args.h
lldb/trunk/source/Interpreter/Args.cpp
lldb/trunk/source/Interpreter/CommandAlias.cpp
lldb/trunk/source/Interpreter/CommandInterpreter.cpp
lldb/trunk/source/Interpreter/CommandObject.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp

Modified: lldb/trunk/include/lldb/Interpreter/Args.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=281942&r1=281941&r2=281942&view=diff
==
--- lldb/trunk/include/lldb/Interpreter/Args.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Args.h Mon Sep 19 16:56:59 2016
@@ -187,32 +187,30 @@ public:
   void AppendArguments(const char **argv);
 
   // Delete const char* versions of StringRef functions.  Normally this would
-  // not
-  // be necessary, as const char * is implicitly convertible to StringRef.
-  // However,
-  // since the use of const char* is so pervasive, and since StringRef will
-  // assert
-  // if you try to construct one from nullptr, this allows the compiler to 
catch
-  // instances of the function being invoked with a const char *, allowing us 
to
-  // replace them with explicit conversions at each call-site.  Once StringRef
-  // use becomes more pervasive, there will be fewer implicit conversions
-  // because
-  // we will be using StringRefs across the whole pipeline, so we won't have to
-  // have
-  // this "glue" that converts between the two, and at that point it becomes
-  // easy
-  // to just make sure you don't pass nullptr into the function.
+  // not be necessary, as const char * is implicitly convertible to StringRef.
+  // However, since the use of const char* is so pervasive, and since StringRef
+  // will assert if you try to construct one from nullptr, this allows the
+  // compiler to catch instances of the function being invoked with a
+  // const char *, allowing us to replace them with explicit conversions at 
each
+  // call-site.  This ensures that no callsites slip through the cracks where
+  // we would be trying to implicitly convert from nullptr, since it will force
+  // us to evaluate and explicitly convert each one.
+  //
+  // Once StringRef use becomes more pervasive, there will be fewer
+  // implicit conversions because we will be using StringRefs across the whole
+  // pipeline, so we won't have to have this "glue" that converts between the
+  // two, and at that point it becomes easy to just make sure you don't pass
+  // nullptr into the function on the odd occasion that you do pass a
+  // const char *.
   // Call-site fixing methodology:
   //   1. If you know the string cannot be null (e.g. it's a const char[], or
-  //   it's
-  //  been checked for null), use llvm::StringRef(ptr).
+  //  it's been checked for null), use llvm::StringRef(ptr).
   //   2. If you don't know if it can be null (e.g. it's returned from a
-  //   function
-  //  whose semantics are unclear), use
+  //  function whose semantics are unclear), use
   //  llvm::StringRef::withNullAsEmpty(ptr).
   //   3. If it's .c_str() of a std::string, just pass the std::string 
directly.
   //   4. If it's .str().c_str() of a StringRef, just pass the StringRef
-  //   directly.
+  //  directly.
   void ReplaceArgumentAtIndex(size_t, const char *, char = '\0') = delete;
   void AppendArgument(const char *arg_str, char quote_char = '\0') = delete;
   void InsertArgumentAtIndex(size_t, const char *, char = '\0') = delete;
@@ -225,6 +223,10 @@ public:
   static uint32_t StringToGenericRegister(const char *) = delete;
   static bool StringToVersion(const char *, uint32_t &, uint32_t &,
   uint32_t &) = delete;
+  const char *Unshift(const char *, char = '\0') = delete;
+  void AddOrReplaceEnvironmentVariable(const char *, const char *) = delete;
+  bool ContainsEnvironmentVariable(const char *,
+   size_t * = nullptr) const = delete;
 
   //--
   /// Insert the argument value at index \a idx to \a arg_cstr.
@@ -315,7 +317,7 @@ public:
   /// @return
   /// A pointer to the copy of \a arg_cstr that was made.
   //--
-  const char *Unshift(const char *arg_cstr, char quote_char = '\0');
+  llvm::StringRef Unshift(llvm::StringRef arg_str, char quote_char = '\0');
 
   //--

[Lldb-commits] [lldb] r281943 - Fixed the build by changing a couple of const char *s to StringRefs.

2016-09-19 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Mon Sep 19 17:06:12 2016
New Revision: 281943

URL: http://llvm.org/viewvc/llvm-project?rev=281943&view=rev
Log:
Fixed the build by changing a couple of const char *s to StringRefs.

Modified:
lldb/trunk/source/Host/macosx/Host.mm
lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=281943&r1=281942&r2=281943&view=diff
==
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Mon Sep 19 17:06:12 2016
@@ -806,7 +806,7 @@ static bool GetMacOSXProcessArgs(const P
   for (int i = 0; i < static_cast(argc); ++i) {
 cstr = data.GetCStr(&offset);
 if (cstr)
-  proc_args.AppendArgument(cstr);
+  proc_args.AppendArgument(llvm::StringRef(cstr));
   }
 
   Args &proc_env = process_info.GetEnvironmentEntries();
@@ -824,7 +824,7 @@ static bool GetMacOSXProcessArgs(const P
 llvm::Triple::MacOSX);
 }
 
-proc_env.AppendArgument(cstr);
+proc_env.AppendArgument(llvm::StringRef(cstr));
   }
   return true;
 }
@@ -1379,7 +1379,8 @@ Error Host::ShellExpandArguments(Process
   if (!str_sp)
 continue;
 
-  launch_info.GetArguments().AppendArgument(str_sp->GetValue().c_str());
+  launch_info.GetArguments().AppendArgument(
+  llvm::StringRef(str_sp->GetValue().c_str()));
 }
   }
 

Modified: lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm?rev=281943&r1=281942&r2=281943&view=diff
==
--- lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm (original)
+++ lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm Mon Sep 19 17:06:12 2016
@@ -88,7 +88,8 @@ bool HostInfoMacOSX::GetOSVersion(uint32
   NSString *version_value = [version_info objectForKey:@"ProductVersion"];
   const char *version_str = [version_value UTF8String];
   if (version_str)
-Args::StringToVersion(version_str, g_major, g_minor, g_update);
+Args::StringToVersion(llvm::StringRef(version_str), g_major, g_minor,
+  g_update);
 }
   }
 

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=281943&r1=281942&r2=281943&view=diff
==
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp 
(original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Mon 
Sep 19 17:06:12 2016
@@ -1123,8 +1123,9 @@ Error GDBRemoteCommunication::StartDebug
 __FUNCTION__, error.AsCString());
   return error;
 }
-debugserver_args.AppendArgument("--named-pipe");
-debugserver_args.AppendArgument(named_pipe_path.c_str());
+debugserver_args.AppendArgument(llvm::StringRef("--named-pipe"));
+debugserver_args.AppendArgument(
+llvm::StringRef(named_pipe_path.c_str()));
 #else
 // Binding to port zero, we need to figure out what port it ends up
 // using using an unnamed pipe...
@@ -1191,7 +1192,7 @@ Error GDBRemoteCommunication::StartDebug
 if (env_debugserver_log_flags) {
   ::snprintf(arg_cstr, sizeof(arg_cstr), "--log-flags=%s",
  env_debugserver_log_flags);
-  debugserver_args.AppendArgument(arg_cstr);
+  debugserver_args.AppendArgument(llvm::StringRef(arg_cstr));
 }
 #else
 const char *env_debugserver_log_channels =


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


Re: [Lldb-commits] [PATCH] D23948: Remove unused variable

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r280283.


https://reviews.llvm.org/D23948



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


Re: [Lldb-commits] [PATCH] D23950: Remove unused local variable

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r280283.


https://reviews.llvm.org/D23950



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


Re: [Lldb-commits] [PATCH] D23951: Remove unused any_found local variable

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r280283.


https://reviews.llvm.org/D23951



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


Re: [Lldb-commits] [PATCH] D23952: Remove unused frame_zero_id local variable

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r280283.


https://reviews.llvm.org/D23952



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


Re: [Lldb-commits] [PATCH] D18848: Add PDBASTParser and parse type information from PDB

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r266392.


https://reviews.llvm.org/D18848



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


[Lldb-commits] [PATCH] D24749: [CMake] Initial support for LLDB.framework

2016-09-19 Thread Chris Bieneman via lldb-commits
beanz created this revision.
beanz added reviewers: zturner, tfiala.
beanz added a subscriber: lldb-commits.
Herald added subscribers: mgorny, beanz.

This patch adds a CMake option LLDB_BUILD_FRAMEWORK, which builds libLLDB as a 
macOS framework instead of as a *nix shared library.

With this patch any LLDB executable that has the INCLUDE_IN_FRAMEWORK option 
set will be built into the Framework's resources directory, and a symlink to 
the exeuctable will be placed under the build directory's bin folder. Creating 
the symlinks allows users to run commands from the build directory without 
altering the workflow.

The framework generated by this patch passes the LLDB test suite, but has not 
been tested beyond that. It is not expected to be fully ready to ship, but it 
is a first step.

With this patch binaries that are placed inside the framework aren't being 
properly installed. Fixing that would increase the patch size significantly, so 
I'd like to do that in a follow-up.

https://reviews.llvm.org/D24749

Files:
  CMakeLists.txt
  cmake/LLDBDependencies.cmake
  cmake/modules/AddLLDB.cmake
  cmake/modules/LLDBConfig.cmake
  scripts/CMakeLists.txt
  scripts/Python/finishSwigPythonLLDB.py
  source/API/CMakeLists.txt
  tools/argdumper/CMakeLists.txt
  tools/darwin-debug/CMakeLists.txt
  tools/debugserver/source/MacOSX/CMakeLists.txt
  tools/lldb-server/CMakeLists.txt

Index: tools/lldb-server/CMakeLists.txt
===
--- tools/lldb-server/CMakeLists.txt
+++ tools/lldb-server/CMakeLists.txt
@@ -25,7 +25,7 @@
 
 include(../../cmake/LLDBDependencies.cmake)
 
-add_lldb_executable(lldb-server
+add_lldb_executable(lldb-server INCLUDE_IN_FRAMEWORK
 Acceptor.cpp
 lldb-gdbserver.cpp
 lldb-platform.cpp
Index: tools/debugserver/source/MacOSX/CMakeLists.txt
===
--- tools/debugserver/source/MacOSX/CMakeLists.txt
+++ tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -36,7 +36,7 @@
   lldbDebugserverMacOSX_DarwinLog
   )
 
-add_lldb_executable(debugserver
+add_lldb_executable(debugserver INCLUDE_IN_FRAMEWORK
   HasAVX.s
   CFBundle.cpp
   CFString.cpp
@@ -69,23 +69,14 @@
 OUTPUT_STRIP_TRAILING_WHITESPACE
 OUTPUT_VARIABLE CODESIGN_ALLOCATE
 )
-  # 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 ${LLDB_CODESIGN_IDENTITY} debugserver
-  COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign --force --sign ${LLDB_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 ${LLDB_CODESIGN_IDENTITY} debugserver
-  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
-)
-  endif()
+  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 ${LLDB_CODESIGN_IDENTITY}
+$
+WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+  )
 endif()
 
 install(TARGETS debugserver
Index: tools/darwin-debug/CMakeLists.txt
===
--- tools/darwin-debug/CMakeLists.txt
+++ tools/darwin-debug/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_lldb_executable(lldb-launcher
+add_lldb_executable(lldb-launcher INCLUDE_IN_FRAMEWORK
   darwin-debug.cpp
   )
 
Index: tools/argdumper/CMakeLists.txt
===
--- tools/argdumper/CMakeLists.txt
+++ tools/argdumper/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_lldb_executable(lldb-argdumper
+add_lldb_executable(lldb-argdumper INCLUDE_IN_FRAMEWORK
   argdumper.cpp
   )
 
Index: source/API/CMakeLists.txt
===
--- source/API/CMakeLists.txt
+++ source/API/CMakeLists.txt
@@ -6,6 +6,12 @@
 # for liblldb to link against
 include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
 
+option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
+
+if (LLDB_BUILD_FRAMEWORK AND NOT APPLE)
+  message(FATAL_ERROR "LLDB.framework cannot be generated unless targeting Apple platforms.")
+endif()
+
 add_lldb_library(liblldb SHARED
   SBAddress.cpp
   SBAttachInfo.cpp
@@ -120,3 +126,11 @@
 endif()
 target_link_libraries(liblldb PRIVATE ${LLDB_SYSTEM_LIBS})
 
+if(LLDB_BUILD_FRAMEWORK)
+  set_target_properties(liblldb PROPERTIES
+ 

Re: [Lldb-commits] [PATCH] D17521: Update website for building and testing on Windows

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r261795.


https://reviews.llvm.org/D17521



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


Re: [Lldb-commits] [PATCH] D16477: Make all x86 target builds on MSVC use the amd64_x86 toolchain

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r258738.


https://reviews.llvm.org/D16477



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


Re: [Lldb-commits] [PATCH] D16149: Delete char const** swig typemaps

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r257670.


https://reviews.llvm.org/D16149



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


Re: [Lldb-commits] [PATCH] D15723: Allow test decorators to use lists (and not_in(list)) for arches

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.

Committed in r256283. Please specify Differential revision in commit message.


https://reviews.llvm.org/D15723



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


Re: [Lldb-commits] [PATCH] D15582: Improve error handling for `f s #`

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r256251. Please specify Differential revision in commit message.


https://reviews.llvm.org/D15582



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


Re: [Lldb-commits] [PATCH] D24749: [CMake] Initial support for LLDB.framework

2016-09-19 Thread Zachary Turner via lldb-commits
zturner added inline comments.


Comment at: scripts/Python/finishSwigPythonLLDB.py:397
@@ -396,3 +396,3 @@
 strBuildDir = os.path.join("..", "..", "..", "..")
-strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile))
+strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile))
 

Was this line intentional?


Comment at: source/API/CMakeLists.txt:9
@@ -8,1 +8,3 @@
 
+option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
+

Is there any reason to have this off when building on OSX?  Is there any value 
in having it not be an option at all, but just if you're on Darwin, you just 
always get a Framework?


https://reviews.llvm.org/D24749



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


Re: [Lldb-commits] [PATCH] D17152: Improve ReadRegister for RegisterContextWindowsx86

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r260559.


https://reviews.llvm.org/D17152



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


Re: [Lldb-commits] [PATCH] D15723: Allow test decorators to use lists (and not_in(list)) for arches

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r256283.


https://reviews.llvm.org/D15723



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


Re: [Lldb-commits] [PATCH] D13679: Fix TestTargetAPI.py test for users who use Swig 3.0.5 or greater.

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r250188.


https://reviews.llvm.org/D13679



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


Re: [Lldb-commits] [PATCH] D10103: Fix inferior's i/o connections to its console window on Windows 7

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r238629.


https://reviews.llvm.org/D10103



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


Re: [Lldb-commits] [PATCH] D9535: Don't attempt dsym tests on Windows

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r236620.


https://reviews.llvm.org/D9535



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


Re: [Lldb-commits] [PATCH] D9753: Enable debugging of multithreaded programs on Windows.

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r237392.


https://reviews.llvm.org/D9753



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


Re: [Lldb-commits] [PATCH] D8937: Add logging plugin for Winodows

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r234607.


https://reviews.llvm.org/D8937



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


Re: [Lldb-commits] [PATCH] D8494: Fix lld command on Windows for many tests

2016-09-19 Thread Eugene Zelenko via lldb-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko closed this revision.
Eugene.Zelenko added a comment.

Committed in r233416.


https://reviews.llvm.org/D8494



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


[Lldb-commits] Buildbot numbers for the week of 9/04/2016 - 9/10/201

2016-09-19 Thread Galina Kistanova via lldb-commits
Hello everyone,

Below are some buildbot numbers for the week of 9/04/2016 - 9/10/2016.

Please see the same data in attached csv files:

The longest time each builder was red during the last week;
"Status change ratio" by active builder (percent of builds that changed the
builder status from greed to red or from red to green);
Count of commits by project;
Number of completed builds, failed builds and average build time for
successful builds per active builder;
Average waiting time for a revision to get build result per active builder
(response time).

Thanks

Galina


The longest time each builder was red during the last week:

 buildername|  was_red
+---
 sanitizer-x86_64-linux-autoconf| 63:10:34
 clang-x64-ninja-win7   | 59:00:46
 clang-ppc64le-linux-multistage | 56:49:27
 clang-hexagon-elf  | 56:32:00
 clang-x86-win2008-selfhost | 56:13:02
 clang-x86-windows-msvc2015 | 42:34:12
 llvm-mips-linux| 39:25:19
 sanitizer-x86_64-linux-bootstrap   | 38:35:50
 clang-cmake-thumbv7-a15| 37:55:23
 sanitizer-x86_64-linux-fast| 37:45:14
 clang-cmake-armv7-a15-selfhost-neon| 34:39:46
 clang-cmake-armv7-a15-selfhost | 31:47:04
 sanitizer-ppc64be-linux| 27:13:18
 clang-native-arm-lnt   | 26:48:38
 clang-ppc64le-linux-lnt| 26:24:42
 lldb-x86_64-darwin-13.4| 26:23:31
 clang-cmake-armv7-a15-full | 26:18:16
 clang-ppc64be-linux-lnt| 26:07:43
 clang-cmake-armv7-a15  | 26:06:27
 lldb-x86_64-ubuntu-14.04-android   | 25:56:42
 clang-cmake-mipsel | 25:27:09
 lldb-windows7-android  | 25:23:08
 clang-cmake-thumbv7-a15-full-sh| 24:42:18
 sanitizer-ppc64le-linux| 24:11:00
 clang-s390x-linux  | 23:19:49
 clang-3stage-ubuntu| 21:11:37
 clang-cmake-aarch64-full   | 19:47:59
 clang-cuda-build   | 19:31:48
 clang-cmake-aarch64-quick  | 18:21:31
 clang-with-lto-ubuntu  | 17:53:41
 lldb-x86_64-ubuntu-14.04-cmake | 17:19:15
 clang-native-aarch64-full  | 11:55:16
 lldb-amd64-ninja-netbsd7   | 09:03:13
 lldb-x86_64-ubuntu-14.04-buildserver   | 07:25:11
 libcxx-libcxxabi-x86_64-linux-ubuntu-ubsan | 05:30:18
 lldb-amd64-ninja-freebsd11 | 05:02:41
 clang-ppc64be-linux| 05:00:40
 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx03 | 04:56:22
 llvm-hexagon-elf   | 04:55:47
 libcxx-libcxxabi-libunwind-arm-linux-noexceptions  | 04:48:42
 libcxx-libcxxabi-libunwind-arm-linux   | 04:43:26
 clang-cmake-mips   | 04:18:34
 clang-x86_64-debian-fast   | 03:39:44
 clang-ppc64be-linux-multistage | 02:59:40
 clang-ppc64le-linux| 02:33:50
 sanitizer-x86_64-linux-fuzzer  | 02:19:10
 clang-x86_64-linux-selfhost-modules| 02:10:07
 sanitizer-x86_64-linux | 02:09:23
 lld-x86_64-darwin13| 02:05:51
 lld-x86_64-win7| 01:57:02
 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast   | 01:55:39
 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast | 01:52:12
 perf-x86_64-penryn-O3-polly-parallel-fast  | 01:49:43
 perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable | 01:48:19
 llvm-sphinx-docs   | 01:48:00
 perf-x86_64-penryn-O3-polly-unprofitable   | 01:47:49
 clang-cmake-aarch64-42vma  | 01:46:20
 libcxx-libcxxabi-x86_64-linux-ubuntu-msan  | 01:39:04
 sanitizer-windows  | 01:28:02
 libcxx-libcxxabi-x86_64-linu

[Lldb-commits] Buildbot numbers for the week of 9/11/2016 - 9/17/2016

2016-09-19 Thread Galina Kistanova via lldb-commits
Hello everyone,

Below are some buildbot numbers for the last week of 9/11/2016 - 9/17/2016.

Please see the same data in attached csv files:

The longest time each builder was red during the last week;
"Status change ratio" by active builder (percent of builds that changed the
builder status from greed to red or from red to green);
Count of commits by project;
Number of completed builds, failed builds and average build time for
successful builds per active builder;
Average waiting time for a revision to get build result per active builder
(response time).

Thanks

Galina


The longest time each builder was red during the last week:

 buildername|  was_red
+---
 sanitizer-x86_64-linux-bootstrap   | 90:23:46
 sanitizer-x86_64-linux-fast| 51:27:30
 sanitizer-x86_64-linux | 34:46:47
 clang-cmake-mipsel | 30:58:03
 clang-with-lto-ubuntu  | 30:33:33
 clang-x86-win2008-selfhost | 27:13:22
 clang-x64-ninja-win7   | 23:42:33
 sanitizer-ppc64le-linux| 20:19:40
 sanitizer-windows  | 18:24:47
 clang-cmake-thumbv7-a15-full-sh| 17:55:50
 perf-x86_64-penryn-O3-polly-before-vectorizer-detect-only  | 17:52:21
 perf-x86_64-penryn-O3-polly-before-vectorizer  | 17:39:45
 perf-x86_64-penryn-O3  | 15:38:52
 clang-3stage-ubuntu| 14:55:01
 sanitizer-x86_64-linux-fuzzer  | 13:39:51
 perf-x86_64-penryn-O3-polly| 13:27:32
 lldb-windows7-android  | 12:14:17
 clang-native-aarch64-full  | 11:27:17
 lldb-x86_64-ubuntu-14.04-buildserver   | 11:11:23
 polly-amd64-linux  | 11:10:13
 clang-ppc64be-linux-multistage | 11:07:03
 perf-x86_64-penryn-O3-polly-parallel-fast  | 10:53:44
 perf-x86_64-penryn-O3-polly-unprofitable   | 10:53:03
 sanitizer-ppc64be-linux| 10:48:16
 perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable | 10:40:27
 lldb-x86_64-ubuntu-14.04-cmake | 10:35:07
 clang-ppc64le-linux-lnt| 10:13:21
 clang-ppc64le-linux| 10:11:45
 clang-ppc64be-linux-lnt| 09:53:59
 clang-ppc64be-linux| 09:53:34
 clang-ppc64le-linux-multistage | 09:52:18
 clang-cmake-armv7-a15-selfhost-neon| 09:45:15
 clang-x86_64-linux-selfhost-modules| 09:19:24
 clang-cmake-armv7-a15-selfhost | 07:05:34
 perf-x86_64-penryn-O3-polly-fast   | 05:47:48
 clang-x86-windows-msvc2015 | 04:34:53
 libcxx-libcxxabi-libunwind-arm-linux-noexceptions  | 04:24:06
 lldb-amd64-ninja-netbsd7   | 04:21:29
 clang-cmake-armv7-a15-full | 04:01:50
 clang-cmake-armv7-a15  | 03:47:55
 clang-cmake-thumbv7-a15| 03:47:24
 clang-cmake-mips   | 03:46:28
 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast   | 03:29:31
 clang-bpf-build| 03:19:29
 clang-cmake-aarch64-full   | 03:12:06
 llvm-sphinx-docs   | 03:10:17
 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast | 02:51:02
 llvm-mips-linux| 02:43:07
 clang-native-arm-lnt   | 02:42:00
 clang-x86_64-debian-fast   | 02:26:27
 clang-cmake-aarch64-quick  | 01:52:25
 clang-sphinx-docs  | 01:41:27
 clang-cuda-build   | 01:33:27
 clang-s390x-linux  | 01:33:06
 llvm-hexagon-elf   | 01:32:57
 clang-hexagon-elf  | 01:32:38
 libcxx-libcxxabi-x86_64-linux-debian   | 01:28:40
 lldb-x86_64-ubuntu-14.04-android   | 01:28:02
 clang-atom-d525-fedora-rel | 01:16:38
 lldb-x86_64-darwin-13.4

Re: [Lldb-commits] [PATCH] D24749: [CMake] Initial support for LLDB.framework

2016-09-19 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a subscriber: labath.
tfiala added a comment.
This revision is now accepted and ready to land.

LGTM.

Chris - you might want to add @labath to this as well.



Comment at: source/API/CMakeLists.txt:9
@@ -8,1 +8,3 @@
 
+option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
+

zturner wrote:
> Is there any reason to have this off when building on OSX?  Is there any 
> value in having it not be an option at all, but just if you're on Darwin, you 
> just always get a Framework?
I mentioned to Chris that I wasn't sure if the Google folks (or maybe Dawn) 
that build with the CMake build might want to keep it building the old way.

I'd be all for only building only the framework way with CMake if nobody else 
particularly cared.  That would simplify things.  But I don't want to force it 
if anybody else cares.

Our goal is to get the CMake-based build producing the same exact thing as our 
Xcode-based build.


https://reviews.llvm.org/D24749



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


Re: [Lldb-commits] [PATCH] D24749: [CMake] Initial support for LLDB.framework

2016-09-19 Thread Zachary Turner via lldb-commits
Unless someone has a strong desire to keep it and it adds necessary
functionality I would vote for removing it. It can always be maintained
downstream. That being said, let's wait and see if anyone chimes in.

I also want to test this tomorrow to make sure nothing breaks.

Just to be clear, if i were to apply this on mac into a canonical
llvm-style directory hierarchy and run ninja check-lldb, is that supposed
to work?
On Mon, Sep 19, 2016 at 6:36 PM Todd Fiala  wrote:

> tfiala accepted this revision.
> tfiala added a subscriber: labath.
> tfiala added a comment.
> This revision is now accepted and ready to land.
>
> LGTM.
>
> Chris - you might want to add @labath to this as well.
>
>
> 
> Comment at: source/API/CMakeLists.txt:9
> @@ -8,1 +8,3 @@
>
> +option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
> +
> 
> zturner wrote:
> > Is there any reason to have this off when building on OSX?  Is there any
> value in having it not be an option at all, but just if you're on Darwin,
> you just always get a Framework?
> I mentioned to Chris that I wasn't sure if the Google folks (or maybe
> Dawn) that build with the CMake build might want to keep it building the
> old way.
>
> I'd be all for only building only the framework way with CMake if nobody
> else particularly cared.  That would simplify things.  But I don't want to
> force it if anybody else cares.
>
> Our goal is to get the CMake-based build producing the same exact thing as
> our Xcode-based build.
>
>
> https://reviews.llvm.org/D24749
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D24749: [CMake] Initial support for LLDB.framework

2016-09-19 Thread Todd Fiala via lldb-commits
On Mon, Sep 19, 2016 at 7:39 PM, Zachary Turner  wrote:

> Unless someone has a strong desire to keep it and it adds necessary
> functionality I would vote for removing it.


I think it's fine to remove the other support if nobody else has a good
reason to want to keep it, but we're not to that point yet.  We are going
to want to keep the switch on and default to the existing cmake macOS build
until Chris completes the work here.  This change as is is not ready for
prime time.  It's needs full-on verification against our existing Xcode
build, and I think Chris mentioned he has other bits he needs to do to make
it complete.


> It can always be maintained downstream. That being said, let's wait and
> see if anyone chimes in.
>
> I also want to test this tomorrow to make sure nothing breaks.
>
>
Yeah, this also needs checking on Linux.  I can do that tomorrow if Pavel
doesn't get to it first.


> Just to be clear, if i were to apply this on mac into a canonical
> llvm-style directory hierarchy and run ninja check-lldb, is that supposed
> to work?
> On Mon, Sep 19, 2016 at 6:36 PM Todd Fiala  wrote:
>
>> tfiala accepted this revision.
>> tfiala added a subscriber: labath.
>> tfiala added a comment.
>> This revision is now accepted and ready to land.
>>
>> LGTM.
>>
>> Chris - you might want to add @labath to this as well.
>>
>>
>> 
>> Comment at: source/API/CMakeLists.txt:9
>> @@ -8,1 +8,3 @@
>>
>> +option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
>> +
>> 
>> zturner wrote:
>> > Is there any reason to have this off when building on OSX?  Is there
>> any value in having it not be an option at all, but just if you're on
>> Darwin, you just always get a Framework?
>> I mentioned to Chris that I wasn't sure if the Google folks (or maybe
>> Dawn) that build with the CMake build might want to keep it building the
>> old way.
>>
>> I'd be all for only building only the framework way with CMake if nobody
>> else particularly cared.  That would simplify things.  But I don't want to
>> force it if anybody else cares.
>>
>> Our goal is to get the CMake-based build producing the same exact thing
>> as our Xcode-based build.
>>
>>
>> https://reviews.llvm.org/D24749
>>
>>
>>
>>


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