[Lldb-commits] [lldb] [llvm] [clang] [BOLT] Fix unconditional output of boltedcollection in merge-fdata (PR #78653)

2024-01-18 Thread Davide Italiano via lldb-commits

https://github.com/dcci commented:

LG

https://github.com/llvm/llvm-project/pull/78653
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 0cceb54 - [TestPtrRefsObjC] Prefer `command script import`.

2020-08-14 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-08-14T15:31:02-07:00
New Revision: 0cceb54366b406649fdfe7bb11b133ab96f3cd70

URL: 
https://github.com/llvm/llvm-project/commit/0cceb54366b406649fdfe7bb11b133ab96f3cd70
DIFF: 
https://github.com/llvm/llvm-project/commit/0cceb54366b406649fdfe7bb11b133ab96f3cd70.diff

LOG: [TestPtrRefsObjC] Prefer `command script import`.

Added: 


Modified: 
lldb/test/API/lang/objc/ptr_refs/TestPtrRefsObjC.py

Removed: 




diff  --git a/lldb/test/API/lang/objc/ptr_refs/TestPtrRefsObjC.py 
b/lldb/test/API/lang/objc/ptr_refs/TestPtrRefsObjC.py
index 390a07c4718a..ca543eb91967 100644
--- a/lldb/test/API/lang/objc/ptr_refs/TestPtrRefsObjC.py
+++ b/lldb/test/API/lang/objc/ptr_refs/TestPtrRefsObjC.py
@@ -44,6 +44,6 @@ def test_ptr_refs(self):
 
 frame = thread.GetFrameAtIndex(0)
 
-self.runCmd("script import lldb.macosx.heap")
+self.runCmd("command script import lldb.macosx.heap")
 self.expect("ptr_refs self", substrs=["malloc", "stack"])
 



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


[Lldb-commits] [lldb] 8fcfe28 - [TestPtrRefs] Prefer `command script import`.

2020-08-14 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-08-14T15:30:31-07:00
New Revision: 8fcfe2862fd4fde4793e232cfeebe6c5540c80a5

URL: 
https://github.com/llvm/llvm-project/commit/8fcfe2862fd4fde4793e232cfeebe6c5540c80a5
DIFF: 
https://github.com/llvm/llvm-project/commit/8fcfe2862fd4fde4793e232cfeebe6c5540c80a5.diff

LOG: [TestPtrRefs] Prefer `command script import`.

Added: 


Modified: 
lldb/test/API/functionalities/ptr_refs/TestPtrRefs.py

Removed: 




diff  --git a/lldb/test/API/functionalities/ptr_refs/TestPtrRefs.py 
b/lldb/test/API/functionalities/ptr_refs/TestPtrRefs.py
index 41216bbce2e5..6a392a0a756e 100644
--- a/lldb/test/API/functionalities/ptr_refs/TestPtrRefs.py
+++ b/lldb/test/API/functionalities/ptr_refs/TestPtrRefs.py
@@ -44,5 +44,5 @@ def test_ptr_refs(self):
 
 frame = thread.GetFrameAtIndex(0)
 
-self.runCmd("script import lldb.macosx.heap")
+self.runCmd("command script import lldb.macosx.heap")
 self.expect("ptr_refs my_ptr", substrs=["malloc", "stack"])



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


[Lldb-commits] [lldb] 5760575 - [debugserver/Apple Silicon] Handoff connections when attaching to translated processes

2020-07-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-30T16:21:05-07:00
New Revision: 57605758b5de3726eec1d6e587de1003af1ab5b7

URL: 
https://github.com/llvm/llvm-project/commit/57605758b5de3726eec1d6e587de1003af1ab5b7
DIFF: 
https://github.com/llvm/llvm-project/commit/57605758b5de3726eec1d6e587de1003af1ab5b7.diff

LOG: [debugserver/Apple Silicon] Handoff connections when attaching to 
translated processes

When we detect a process that the native debugserver cannot handle,
handoff the connection fd to the translated debugserver.

Added: 


Modified: 
lldb/tools/debugserver/source/DNB.cpp
lldb/tools/debugserver/source/debugserver.cpp

Removed: 




diff  --git a/lldb/tools/debugserver/source/DNB.cpp 
b/lldb/tools/debugserver/source/DNB.cpp
index 0830ea36a91a..3c1cd85dc310 100644
--- a/lldb/tools/debugserver/source/DNB.cpp
+++ b/lldb/tools/debugserver/source/DNB.cpp
@@ -442,6 +442,39 @@ nub_process_t DNBProcessAttach(nub_process_t attach_pid,
   if (err_str && err_len > 0)
 err_str[0] = '\0';
 
+  if (getenv("LLDB_DEBUGSERVER_PATH") == NULL) {
+int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID,
+ static_cast(attach_pid)};
+struct kinfo_proc processInfo;
+size_t bufsize = sizeof(processInfo);
+if (sysctl(mib, (unsigned)(sizeof(mib) / sizeof(int)), ,
+   , NULL, 0) == 0 &&
+bufsize > 0) {
+
+  if ((processInfo.kp_proc.p_flag & P_TRANSLATED) == P_TRANSLATED) {
+const char *translated_debugserver =
+"/Library/Apple/usr/libexec/oah/debugserver";
+char fdstr[16];
+char pidstr[16];
+extern int communication_fd;
+
+if (communication_fd == -1) {
+  fprintf(stderr, "Trying to attach to a translated process with the "
+  "native debugserver, exiting...\n");
+  exit(1);
+}
+
+snprintf(fdstr, sizeof(fdstr), "--fd=%d", communication_fd);
+snprintf(pidstr, sizeof(pidstr), "--attach=%d", attach_pid);
+execl(translated_debugserver, "--native-regs", "--setsid", fdstr,
+  "--handoff-attach-from-native", pidstr, (char *)0);
+DNBLogThreadedIf(LOG_PROCESS, "Failed to launch debugserver for "
+ "translated process: ", errno, strerror(errno));
+__builtin_trap();
+  }
+}
+  }
+
   pid_t pid = INVALID_NUB_PROCESS;
   MachProcessSP processSP(new MachProcess);
   if (processSP.get()) {

diff  --git a/lldb/tools/debugserver/source/debugserver.cpp 
b/lldb/tools/debugserver/source/debugserver.cpp
index 42205dedf4bb..410ea7c310fa 100644
--- a/lldb/tools/debugserver/source/debugserver.cpp
+++ b/lldb/tools/debugserver/source/debugserver.cpp
@@ -878,6 +878,8 @@ static struct option g_long_options[] = {
// -F localhost:1234 -- /bin/ls"
 {NULL, 0, NULL, 0}};
 
+int communication_fd = -1;
+
 // main
 int main(int argc, char *argv[]) {
   // If debugserver is launched with DYLD_INSERT_LIBRARIES, unset it so we
@@ -944,7 +946,6 @@ int main(int argc, char *argv[]) {
   int ch;
   int long_option_index = 0;
   int debug = 0;
-  int communication_fd = -1;
   std::string compile_options;
   std::string waitfor_pid_name; // Wait for a process that starts with this 
name
   std::string attach_pid_name;



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


[Lldb-commits] [lldb] b1a6d37 - [PlatformMacOSX] Remove unused variable. NFC.

2020-07-20 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-20T14:50:59-07:00
New Revision: b1a6d373d5e0adbaa1ed70a9cadcfa84420a449f

URL: 
https://github.com/llvm/llvm-project/commit/b1a6d373d5e0adbaa1ed70a9cadcfa84420a449f
DIFF: 
https://github.com/llvm/llvm-project/commit/b1a6d373d5e0adbaa1ed70a9cadcfa84420a449f.diff

LOG: [PlatformMacOSX] Remove unused variable. NFC.

Added: 


Modified: 
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h

Removed: 




diff  --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h 
b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
index c383dd97daf8..30b11eb37684 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
@@ -79,8 +79,6 @@ class PlatformMacOSX : public PlatformDarwin {
 private:
   PlatformMacOSX(const PlatformMacOSX &) = delete;
   const PlatformMacOSX =(const PlatformMacOSX &) = delete;
-
-  int m_num_arches = 0;
 };
 
 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMMACOSX_H



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


[Lldb-commits] [lldb] cd05406 - [testsuite] Adapt lldb-server base test helper to run on arm64

2020-07-20 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-20T14:38:13-07:00
New Revision: cd05406b105334b01f0eae141e7e05d6fb4a2ecb

URL: 
https://github.com/llvm/llvm-project/commit/cd05406b105334b01f0eae141e7e05d6fb4a2ecb
DIFF: 
https://github.com/llvm/llvm-project/commit/cd05406b105334b01f0eae141e7e05d6fb4a2ecb.diff

LOG: [testsuite] Adapt lldb-server base test helper to run on arm64

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Removed: 




diff  --git 
a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
index d702d8ee6820..71e6fdd8857f 100644
--- 
a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ 
b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -1537,7 +1537,7 @@ def single_step_only_steps_one_instruction(
 g_c2_address = int(context.get("g_c2_address"), 16)
 
 # Set a breakpoint at the given address.
-if self.getArchitecture() == "arm":
+if self.getArchitecture().startswith("arm"):
 # TODO: Handle case when setting breakpoint in thumb code
 BREAKPOINT_KIND = 4
 else:
@@ -1601,8 +1601,18 @@ def single_step_only_steps_one_instruction(
 # variable value
 if re.match("s390x", arch):
 expected_step_count = 2
+# ARM64 requires "4" instructions: 2 to compute the address (adrp, 
add),
+# one to materialize the constant (mov) and the store
+if re.match("arm64", arch):
+expected_step_count = 4
+
 self.assertEqual(step_count, expected_step_count)
 
+# ARM64: Once addresses and constants are materialized, only one
+# instruction is needed.
+if re.match("arm64", arch):
+expected_step_count = 1
+
 # Verify we hit the next state.
 args["expected_g_c1"] = "0"
 args["expected_g_c2"] = "0"



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


[Lldb-commits] [lldb] 001c8e1 - [PlatformDarwin] Add support for Apple Silicon.

2020-07-20 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-20T14:11:19-07:00
New Revision: 001c8e1fd9f09d3de9ff6e64bdac4b8ca681dfb4

URL: 
https://github.com/llvm/llvm-project/commit/001c8e1fd9f09d3de9ff6e64bdac4b8ca681dfb4
DIFF: 
https://github.com/llvm/llvm-project/commit/001c8e1fd9f09d3de9ff6e64bdac4b8ca681dfb4.diff

LOG: [PlatformDarwin] Add support for Apple Silicon.

Gets another large chunk of the testsuite to pass.

Added: 


Modified: 
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h

Removed: 




diff  --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp 
b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index d31559bc9018..baa9d7b50ad6 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -570,12 +570,23 @@ bool 
PlatformDarwin::ARMGetSupportedArchitectureAtIndex(uint32_t idx,
 #define OSNAME "watchos"
 #elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1
 #define OSNAME "bridgeos"
-#elif defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1
-#define OSNAME "macosx"
 #else
 #define OSNAME "ios"
 #endif
 
+#if TARGET_OS_OSX
+  if (IsHost()) {
+if (idx == 0) {
+  arch.SetTriple("arm64e-apple-macosx");
+  return true;
+} else if (idx == 1) {
+  arch.SetTriple("arm64-apple-macosx");
+  return true;
+}
+return false;
+  }
+#endif
+
   const ArchSpec::Core system_core = system_arch.GetCore();
   switch (system_core) {
   default:

diff  --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp 
b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
index 0b7f898ee0d3..93860c257979 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
@@ -282,7 +282,33 @@ PlatformMacOSX::GetFileWithUUID(const 
lldb_private::FileSpec _file,
 bool PlatformMacOSX::GetSupportedArchitectureAtIndex(uint32_t idx,
  ArchSpec ) {
 #if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
-  return ARMGetSupportedArchitectureAtIndex(idx, arch);
+  // macOS for ARM64 support both native and translated x86_64 processes
+  if (!m_num_arm_arches || idx < m_num_arm_arches) {
+bool res = ARMGetSupportedArchitectureAtIndex(idx, arch);
+if (res)
+  return true;
+if (!m_num_arm_arches)
+  m_num_arm_arches = idx;
+  }
+
+  // We can't use x86GetSupportedArchitectureAtIndex() because it uses
+  // the system architecture for some of its return values and also
+  // has a 32bits variant.
+  if (idx == m_num_arm_arches) {
+arch.SetTriple("x86_64-apple-macosx");
+return true;
+  } else if (idx == m_num_arm_arches + 1) {
+arch.SetTriple("x86_64-apple-ios-macabi");
+return true;
+  } else if (idx == m_num_arm_arches + 2) {
+arch.SetTriple("arm64-apple-ios");
+return true;
+  } else if (idx == m_num_arm_arches + 3) {
+arch.SetTriple("arm64e-apple-ios");
+return true;
+  }
+
+  return false;
 #else
   return x86GetSupportedArchitectureAtIndex(idx, arch);
 #endif

diff  --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h 
b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
index 30b11eb37684..c383dd97daf8 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
@@ -79,6 +79,8 @@ class PlatformMacOSX : public PlatformDarwin {
 private:
   PlatformMacOSX(const PlatformMacOSX &) = delete;
   const PlatformMacOSX =(const PlatformMacOSX &) = delete;
+
+  int m_num_arches = 0;
 };
 
 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMMACOSX_H



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


[Lldb-commits] [lldb] 61cf9f4 - [ObjectFilePECOFF] Try to avoid unaligned access.

2020-07-14 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-14T18:53:23-07:00
New Revision: 61cf9f4e723bd9522757931706b208a1357c30ba

URL: 
https://github.com/llvm/llvm-project/commit/61cf9f4e723bd9522757931706b208a1357c30ba
DIFF: 
https://github.com/llvm/llvm-project/commit/61cf9f4e723bd9522757931706b208a1357c30ba.diff

LOG: [ObjectFilePECOFF] Try to avoid unaligned access.

Fixes an UBSAN error.

Added: 


Modified: 
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp

Removed: 




diff  --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp 
b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 39808cdec790..d606b49130c4 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -656,7 +656,7 @@ Symtab *ObjectFilePECOFF::GetSymtab() {
   // because it is used as offset 0 to encode a NULL string.
   uint32_t *strtab_data_start = const_cast(
   reinterpret_cast(strtab_data.GetDataStart()));
-  strtab_data_start[0] = 0;
+  ::memset(_data_start[0], 0, sizeof(uint32_t));
 
   offset = 0;
   std::string symbol_name;



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


[Lldb-commits] [lldb] 3f2d880 - [ObjC] Wrap namespace-global structs in an anonymous namespace to avoid ODR violations

2020-07-14 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-14T11:26:20-07:00
New Revision: 3f2d880a932970d19bfed88c6900d50c9c3bc203

URL: 
https://github.com/llvm/llvm-project/commit/3f2d880a932970d19bfed88c6900d50c9c3bc203
DIFF: 
https://github.com/llvm/llvm-project/commit/3f2d880a932970d19bfed88c6900d50c9c3bc203.diff

LOG: [ObjC] Wrap namespace-global structs in an anonymous namespace to avoid 
ODR violations



Differential Revision:  https://reviews.llvm.org/D83796

Added: 


Modified: 
lldb/source/Plugins/Language/ObjC/NSArray.cpp
lldb/source/Plugins/Language/ObjC/NSDictionary.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Language/ObjC/NSArray.cpp 
b/lldb/source/Plugins/Language/ObjC/NSArray.cpp
index e1c789ce26d8..8d648d8a0861 100644
--- a/lldb/source/Plugins/Language/ObjC/NSArray.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSArray.cpp
@@ -98,42 +98,46 @@ class GenericNSArrayMSyntheticFrontEnd : public 
NSArrayMSyntheticFrontEndBase {
 };
   
 namespace Foundation1010 {
-  struct DataDescriptor_32 {
-uint32_t _used;
-uint32_t _offset;
-uint32_t _size : 28;
-uint64_t _priv1 : 4;
-uint32_t _priv2;
-uint32_t _data;
-  };
-  
-  struct DataDescriptor_64 {
-uint64_t _used;
-uint64_t _offset;
-uint64_t _size : 60;
-uint64_t _priv1 : 4;
-uint32_t _priv2;
-uint64_t _data;
-  };
+  namespace {
+struct DataDescriptor_32 {
+  uint32_t _used;
+  uint32_t _offset;
+  uint32_t _size : 28;
+  uint64_t _priv1 : 4;
+  uint32_t _priv2;
+  uint32_t _data;
+};
+
+struct DataDescriptor_64 {
+  uint64_t _used;
+  uint64_t _offset;
+  uint64_t _size : 60;
+  uint64_t _priv1 : 4;
+  uint32_t _priv2;
+  uint64_t _data;
+};
+  }
   
   using NSArrayMSyntheticFrontEnd =
   GenericNSArrayMSyntheticFrontEnd;
 }
   
 namespace Foundation1428 {
-  struct DataDescriptor_32 {
-uint32_t _used;
-uint32_t _offset;
-uint32_t _size;
-uint32_t _data;
-  };
-  
-  struct DataDescriptor_64 {
-uint64_t _used;
-uint64_t _offset;
-uint64_t _size;
-uint64_t _data;
-  };
+  namespace {
+struct DataDescriptor_32 {
+  uint32_t _used;
+  uint32_t _offset;
+  uint32_t _size;
+  uint32_t _data;
+};
+
+struct DataDescriptor_64 {
+  uint64_t _used;
+  uint64_t _offset;
+  uint64_t _size;
+  uint64_t _data;
+};
+  }
   
   using NSArrayMSyntheticFrontEnd =
   GenericNSArrayMSyntheticFrontEnd;

diff  --git a/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp 
b/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
index e4e51de9ddfc..3dc07678f92f 100644
--- a/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
@@ -278,64 +278,67 @@ namespace Foundation1100 {
 }
   
 namespace Foundation1428 {
-  struct DataDescriptor_32 {
-uint32_t _used : 26;
-uint32_t _kvo : 1;
-uint32_t _size;
-uint32_t _buffer;
-uint64_t GetSize() { return _size; }
-  };
-  
-  struct DataDescriptor_64 {
-uint64_t _used : 58;
-uint32_t _kvo : 1;
-uint64_t _size;
-uint64_t _buffer;
-uint64_t GetSize() { return _size; }
-  };
-  
-  
-  
+  namespace {
+struct DataDescriptor_32 {
+  uint32_t _used : 26;
+  uint32_t _kvo : 1;
+  uint32_t _size;
+  uint32_t _buffer;
+  uint64_t GetSize() { return _size; }
+};
+
+struct DataDescriptor_64 {
+  uint64_t _used : 58;
+  uint32_t _kvo : 1;
+  uint64_t _size;
+  uint64_t _buffer;
+  uint64_t GetSize() { return _size; }
+};
+  }
+
   using NSDictionaryMSyntheticFrontEnd =
 GenericNSDictionaryMSyntheticFrontEnd;
 }
   
 namespace Foundation1437 {
-  static const uint64_t NSDictionaryCapacities[] = {
-  0, 3, 7, 13, 23, 41, 71, 127, 191, 251, 383, 631, 1087, 1723,
-  2803, 4523, 7351, 11959, 19447, 31231, 50683, 81919, 132607,
-  214519, 346607, 561109, 907759, 1468927, 2376191, 3845119,
-  6221311, 10066421, 16287743, 26354171, 42641881, 68996069,
-  111638519, 180634607, 292272623, 472907251
-  };
-  
-  static const size_t NSDictionaryNumSizeBuckets = 
sizeof(NSDictionaryCapacities) / sizeof(uint64_t);
-  
-  struct DataDescriptor_32 {
-uint32_t _buffer;
-uint32_t _muts;
-uint32_t _used : 25;
-uint32_t _kvo : 1;
-uint32_t _szidx : 6;
+  namespace {
+static const uint64_t NSDictionaryCapacities[] = {
+0, 3, 7, 13, 23, 41, 71, 127, 191, 251, 383, 631, 1087, 1723,
+2803, 4523, 7351, 11959, 19447, 31231, 50683, 81919, 132607,
+214519, 346607, 561109, 907759, 1468927, 2376191, 3845119,
+6221311, 10066421, 16287743, 26354171, 42641881, 68996069,
+111638519, 180634607, 292272623, 472907251
+};
+
+static const size_t NSDictionaryNumSizeBuckets =
+sizeof(NSDictionaryCapacities) / sizeof(uint64_t);
+
+

[Lldb-commits] [lldb] 27d52cd - Revert "[lldb/API] Overwrite variables with SBLaunchInfo::SetEnvironment(append=true)"

2020-07-08 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-08T13:09:24-07:00
New Revision: 27d52cd86a2cf82214b71519dffd450c54cf87ae

URL: 
https://github.com/llvm/llvm-project/commit/27d52cd86a2cf82214b71519dffd450c54cf87ae
DIFF: 
https://github.com/llvm/llvm-project/commit/27d52cd86a2cf82214b71519dffd450c54cf87ae.diff

LOG: Revert "[lldb/API] Overwrite variables with 
SBLaunchInfo::SetEnvironment(append=true)"

This reverts commit 695b33a56919af8873eecb47cb83fa17a271e99f beacuse
it broke the macOS bot.

Added: 


Modified: 
lldb/source/API/SBLaunchInfo.cpp
lldb/test/API/python_api/sbenvironment/TestSBEnvironment.py

Removed: 




diff  --git a/lldb/source/API/SBLaunchInfo.cpp 
b/lldb/source/API/SBLaunchInfo.cpp
index cda8134c9853..ba13072e8f9b 100644
--- a/lldb/source/API/SBLaunchInfo.cpp
+++ b/lldb/source/API/SBLaunchInfo.cpp
@@ -190,10 +190,9 @@ void SBLaunchInfo::SetEnvironment(const SBEnvironment 
, bool append) {
   LLDB_RECORD_METHOD(void, SBLaunchInfo, SetEnvironment,
  (const lldb::SBEnvironment &, bool), env, append);
   Environment  = env.ref();
-  if (append) {
-for (auto  : refEnv)
-  m_opaque_sp->GetEnvironment().insert_or_assign(KV.first(), KV.second);
-  } else
+  if (append)
+m_opaque_sp->GetEnvironment().insert(refEnv.begin(), refEnv.end());
+  else
 m_opaque_sp->GetEnvironment() = refEnv;
   m_opaque_sp->RegenerateEnvp();
 }

diff  --git a/lldb/test/API/python_api/sbenvironment/TestSBEnvironment.py 
b/lldb/test/API/python_api/sbenvironment/TestSBEnvironment.py
index 6389854ce58f..c1937f985e28 100644
--- a/lldb/test/API/python_api/sbenvironment/TestSBEnvironment.py
+++ b/lldb/test/API/python_api/sbenvironment/TestSBEnvironment.py
@@ -53,11 +53,6 @@ def test_launch_info(self):
 launch_info.SetEnvironment(env, append=True)
 self.assertEqual(launch_info.GetEnvironment().GetNumValues(), 
env_count + 1)
 
-env.Set("FOO", "baz", overwrite=True)
-launch_info.SetEnvironment(env, append=True)
-self.assertEqual(launch_info.GetEnvironment().GetNumValues(), 
env_count + 1)
-self.assertEqual(launch_info.GetEnvironment().Get("FOO"), "baz")
-
 # Make sure we can replace the launchInfo's environment
 env.Clear()
 env.Set("BAR", "foo", overwrite=True)
@@ -125,11 +120,6 @@ def test_creating_and_modifying_environment(self):
 env.SetEntries(entries, append=False)
 self.assertEqualEntries(env, ["X=x", "Y=y"])
 
-entries.Clear()
-entries.AppendList(["X=y", "Y=x"], 2)
-env.SetEntries(entries, append=True)
-self.assertEqualEntries(env, ["X=y", "Y=x"])
-
 # Test clear
 env.Clear()
 self.assertEqualEntries(env, [])



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


[Lldb-commits] [lldb] 4dba3f4 - [dotest] Log a warning when --server and --out-of-tree-debugserver are set

2020-07-07 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-07T15:03:08-07:00
New Revision: 4dba3f4e030a906f9ec7e940dfc4a57b94374154

URL: 
https://github.com/llvm/llvm-project/commit/4dba3f4e030a906f9ec7e940dfc4a57b94374154
DIFF: 
https://github.com/llvm/llvm-project/commit/4dba3f4e030a906f9ec7e940dfc4a57b94374154.diff

LOG: [dotest] Log a warning when --server and --out-of-tree-debugserver are set

Suggested by Vedant.

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/dotest.py

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/test/dotest.py 
b/lldb/packages/Python/lldbsuite/test/dotest.py
index f13f445aaa9f..f9975b27c475 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -363,6 +363,9 @@ def parseOptionsAndInitTestdirs():
 args.executable)
 sys.exit(-1)
 
+if args.server and args.out_of_tree_debugserver:
+logging.warning('Both --server and --out-of-tree-debugserver are set')
+
 if args.server and not args.out_of_tree_debugserver:
 os.environ['LLDB_DEBUGSERVER_PATH'] = args.server
 



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


[Lldb-commits] [lldb] 5832473 - Do not set LLDB_DEBUGSERVER_PATH if --out-of-tree-debugserver is passed.

2020-07-07 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-07-07T15:01:21-07:00
New Revision: 5832473dcf4e5b22c9eb6381fb291be92f431208

URL: 
https://github.com/llvm/llvm-project/commit/5832473dcf4e5b22c9eb6381fb291be92f431208
DIFF: 
https://github.com/llvm/llvm-project/commit/5832473dcf4e5b22c9eb6381fb291be92f431208.diff

LOG: Do not set LLDB_DEBUGSERVER_PATH if --out-of-tree-debugserver is passed.

This gets rid of some surprising interplay between the flags.
Mainly needed because of Rosetta debugserver & Apple Silicon.

Differential Revision:  https://reviews.llvm.org/D82804

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/dotest.py

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/test/dotest.py 
b/lldb/packages/Python/lldbsuite/test/dotest.py
index 2b8185a18b77..f13f445aaa9f 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -363,7 +363,7 @@ def parseOptionsAndInitTestdirs():
 args.executable)
 sys.exit(-1)
 
-if args.server:
+if args.server and not args.out_of_tree_debugserver:
 os.environ['LLDB_DEBUGSERVER_PATH'] = args.server
 
 if args.excluded:



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


[Lldb-commits] [lldb] 983a4b5 - Skip arm-(fp|gp)-read.test on Darwin.

2020-06-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-30T12:53:20-07:00
New Revision: 983a4b520ea384ac978cbfc40bb956fbb98cd735

URL: 
https://github.com/llvm/llvm-project/commit/983a4b520ea384ac978cbfc40bb956fbb98cd735
DIFF: 
https://github.com/llvm/llvm-project/commit/983a4b520ea384ac978cbfc40bb956fbb98cd735.diff

LOG: Skip arm-(fp|gp)-read.test on Darwin.

Our assembler doesn't seem to grok floating point literals.



Added: 


Modified: 
lldb/test/Shell/Register/arm-fp-read.test
lldb/test/Shell/Register/arm-gp-read.test

Removed: 




diff  --git a/lldb/test/Shell/Register/arm-fp-read.test 
b/lldb/test/Shell/Register/arm-fp-read.test
index 538d6af54dcf..116fa7aa0df5 100644
--- a/lldb/test/Shell/Register/arm-fp-read.test
+++ b/lldb/test/Shell/Register/arm-fp-read.test
@@ -1,4 +1,4 @@
-# REQUIRES: native && target-arm
+# REQUIRES: native && target-arm && !system-darwin
 # RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/arm-fp-read.cpp -o %t
 # RUN: %lldb -b -s %s %t | FileCheck %s
 process launch

diff  --git a/lldb/test/Shell/Register/arm-gp-read.test 
b/lldb/test/Shell/Register/arm-gp-read.test
index bcb289b880a7..9f8461842e9b 100644
--- a/lldb/test/Shell/Register/arm-gp-read.test
+++ b/lldb/test/Shell/Register/arm-gp-read.test
@@ -1,4 +1,4 @@
-# REQUIRES: native && target-arm
+# REQUIRES: native && target-arm && !system-darwin
 # RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/arm-gp-read.cpp -o %t
 # RUN: %lldb -b -s %s %t | FileCheck %s
 process launch



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


[Lldb-commits] [lldb] 4f1f253 - [TestReturnValue] Skip based on architecutre, not platform.

2020-06-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-30T12:48:23-07:00
New Revision: 4f1f253ce509ebc20e1f7a2d8bb6885366b155f2

URL: 
https://github.com/llvm/llvm-project/commit/4f1f253ce509ebc20e1f7a2d8bb6885366b155f2
DIFF: 
https://github.com/llvm/llvm-project/commit/4f1f253ce509ebc20e1f7a2d8bb6885366b155f2.diff

LOG: [TestReturnValue] Skip based on architecutre, not platform.

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/decorators.py
lldb/test/API/functionalities/return-value/TestReturnValue.py

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/test/decorators.py 
b/lldb/packages/Python/lldbsuite/test/decorators.py
index 0ef2f931542c..ec084184cd65 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -411,14 +411,15 @@ def expectedFailureOS(
 debug_info=debug_info)
 
 
-def expectedFailureDarwin(bugnumber=None, compilers=None, debug_info=None):
+def expectedFailureDarwin(bugnumber=None, compilers=None, debug_info=None, 
archs=None):
 # For legacy reasons, we support both "darwin" and "macosx" as OS X
 # triples.
 return expectedFailureOS(
 lldbplatform.darwin_all,
 bugnumber,
 compilers,
-debug_info=debug_info)
+debug_info=debug_info,
+archs=archs)
 
 
 def expectedFailureAndroid(bugnumber=None, api_levels=None, archs=None):

diff  --git a/lldb/test/API/functionalities/return-value/TestReturnValue.py 
b/lldb/test/API/functionalities/return-value/TestReturnValue.py
index 24aa504a593c..08293ca48b95 100644
--- a/lldb/test/API/functionalities/return-value/TestReturnValue.py
+++ b/lldb/test/API/functionalities/return-value/TestReturnValue.py
@@ -165,7 +165,7 @@ def test_with_python(self):
 archs=["i386"])
 @expectedFailureAll(compiler=["gcc"], archs=["x86_64", "i386"])
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-@skipIfDarwinEmbedded #  ABIMacOSX_arm64 doesn't 
get structs this big correctly
+@expectedFailureDarwin(archs=["arm64"]) #  
ABIMacOSX_arm64 doesn't get structs this big correctly
 def test_vector_values(self):
 self.build()
 exe = self.getBuildArtifact("a.out")



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


[Lldb-commits] [lldb] 300bbbc - [ProcessGDBRemote] Get rid of an unused function.

2020-06-29 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-29T12:39:09-07:00
New Revision: 300bbbcb707ad08200543735326982664136d3bc

URL: 
https://github.com/llvm/llvm-project/commit/300bbbcb707ad08200543735326982664136d3bc
DIFF: 
https://github.com/llvm/llvm-project/commit/300bbbcb707ad08200543735326982664136d3bc.diff

LOG: [ProcessGDBRemote] Get rid of an unused function.

The define was wrong. I could've fixed it, but given this is
unused I decided to drop the function altogether.

Added: 


Modified: 
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp 
b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 39e97c92e343..ff263fa16258 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -189,21 +189,6 @@ static const ProcessKDPPropertiesSP 
() {
 #define HIGH_PORT (49151u)
 #endif
 
-#if defined(__APPLE__) &&  
\
-(defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
-static bool rand_initialized = false;
-
-static inline uint16_t get_random_port() {
-  if (!rand_initialized) {
-time_t seed = time(NULL);
-
-rand_initialized = true;
-srand(seed);
-  }
-  return (rand() % (HIGH_PORT - LOW_PORT)) + LOW_PORT;
-}
-#endif
-
 ConstString ProcessGDBRemote::GetPluginNameStatic() {
   static ConstString g_name("gdb-remote");
   return g_name;



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


[Lldb-commits] [lldb] c7eb06a - [test] XFail TestStepNoDebug based on arch rather than OS

2020-06-25 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-25T16:23:59-07:00
New Revision: c7eb06a880522867e7df3f025056f6c5b10d0eca

URL: 
https://github.com/llvm/llvm-project/commit/c7eb06a880522867e7df3f025056f6c5b10d0eca
DIFF: 
https://github.com/llvm/llvm-project/commit/c7eb06a880522867e7df3f025056f6c5b10d0eca.diff

LOG: [test] XFail TestStepNoDebug based on arch rather than OS

Added: 


Modified: 
lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py 
b/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
index e166848f853f..92036b2f215a 100644
--- a/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
+++ b/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
@@ -48,7 +48,7 @@ def test_step_over_with_python(self):
 "3.9"],
 archs=["i386"],
 bugnumber="llvm.org/pr28549")
-@expectedFailureAll(oslist=["ios", "tvos", "bridgeos"], 
bugnumber="")  # lldb doesn't step past last source 
line in function on arm64
+@expectedFailureAll(archs=["arm64"], 
bugnumber="")  # lldb doesn't step past last source 
line in function on arm64
 @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
 bugnumber="llvm.org/pr44057")
 def test_step_in_with_python(self):



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


[Lldb-commits] [lldb] 38135b2 - [test] XFail TestSigtrampUnwind based on arch rather than OS

2020-06-25 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-25T16:22:52-07:00
New Revision: 38135b2a7fff008093c0ca020855373f33ec9b12

URL: 
https://github.com/llvm/llvm-project/commit/38135b2a7fff008093c0ca020855373f33ec9b12
DIFF: 
https://github.com/llvm/llvm-project/commit/38135b2a7fff008093c0ca020855373f33ec9b12.diff

LOG: [test] XFail TestSigtrampUnwind based on arch rather than OS

Added: 


Modified: 
lldb/test/API/functionalities/unwind/sigtramp/TestSigtrampUnwind.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/unwind/sigtramp/TestSigtrampUnwind.py 
b/lldb/test/API/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
index bf19cacac06d..3ee86f786133 100644
--- a/lldb/test/API/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
+++ b/lldb/test/API/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
@@ -17,7 +17,7 @@ class SigtrampUnwind(TestBase):
 # On 
diff erent platforms the "_sigtramp" and "__kill" frames are likely to be 
diff erent.
 # This test could probably be adapted to run on linux/*bsd easily enough.
 @skipUnlessDarwin
-@expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], 
bugnumber="")  # lldb skips 1 frame on arm64 above 
_sigtramp
+@expectedFailureAll(archs=["arm64"], 
bugnumber="")  # lldb skips 1 frame on arm64 above 
_sigtramp
 def test(self):
 """Test that we can backtrace correctly with _sigtramp on the stack"""
 self.build()



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


[Lldb-commits] [lldb] d358ec4 - [lldb/test] Skip TestBreakpointThumbCodesection on arm64.

2020-06-25 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-25T16:20:27-07:00
New Revision: d358ec463943878936080064d1c43afd8798aaf0

URL: 
https://github.com/llvm/llvm-project/commit/d358ec463943878936080064d1c43afd8798aaf0
DIFF: 
https://github.com/llvm/llvm-project/commit/d358ec463943878936080064d1c43afd8798aaf0.diff

LOG: [lldb/test] Skip TestBreakpointThumbCodesection on arm64.

This test relies on thumb, which is a 32-bits feature only.

Added: 


Modified: 

lldb/test/API/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py

Removed: 




diff  --git 
a/lldb/test/API/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py
 
b/lldb/test/API/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py
index 0726369b6765..d472b79fb87a 100644
--- 
a/lldb/test/API/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py
+++ 
b/lldb/test/API/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py
@@ -15,6 +15,7 @@ class TestBreakpointThumbCodesection(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipIf(archs=no_match(["arm"]))
+@skipIf(archs=["arm64"])
 @skipIfDarwinEmbedded   # codegen on darwin always defaults to thumb for 
armv7/armv7k targets
 def test_breakpoint(self):
 self.build()



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


[Lldb-commits] [lldb] 0df7be2 - [lldb/test] XFAIL TestHWBreakMultiThread on arch rather platform.

2020-06-25 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-25T16:21:23-07:00
New Revision: 0df7be234412e60fbbaaf8c181fe2dfb3a2c1cc3

URL: 
https://github.com/llvm/llvm-project/commit/0df7be234412e60fbbaaf8c181fe2dfb3a2c1cc3
DIFF: 
https://github.com/llvm/llvm-project/commit/0df7be234412e60fbbaaf8c181fe2dfb3a2c1cc3.diff

LOG: [lldb/test] XFAIL TestHWBreakMultiThread on arch rather platform.

Added: 


Modified: 

lldb/test/API/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
 
b/lldb/test/API/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
index a4a1d9effbe1..bca7b278631f 100644
--- 
a/lldb/test/API/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
+++ 
b/lldb/test/API/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
@@ -36,7 +36,7 @@ def test_hw_break_set_disable_multi_thread_linux(self):
 # architectures.
 @skipUnlessDarwin
 @skipIfOutOfTreeDebugserver
-@skipIfDarwinEmbedded
+@expectedFailureAll(archs=["arm64"])
 def test_hw_break_set_delete_multi_thread_macos(self):
 self.build()
 self.setTearDownCleanup()
@@ -46,7 +46,7 @@ def test_hw_break_set_delete_multi_thread_macos(self):
 # architectures.
 @skipUnlessDarwin
 @skipIfOutOfTreeDebugserver
-@skipIfDarwinEmbedded
+@expectedFailureAll(archs=["arm64"])
 def test_hw_break_set_disable_multi_thread_macos(self):
 self.build()
 self.setTearDownCleanup()



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


[Lldb-commits] [lldb] 47ac453 - [HostInfoMacOS] Parse correctly the triple for Apple Silicon.

2020-06-24 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-24T16:37:21-07:00
New Revision: 47ac45332e25c89d0ced5108c667fe92cf0f509a

URL: 
https://github.com/llvm/llvm-project/commit/47ac45332e25c89d0ced5108c667fe92cf0f509a
DIFF: 
https://github.com/llvm/llvm-project/commit/47ac45332e25c89d0ced5108c667fe92cf0f509a.diff

LOG: [HostInfoMacOS] Parse correctly the triple for Apple Silicon.

Again, debugging doesn't work on the new platform without this, so
it's implicitly covered by the testsuite.

Added: 


Modified: 
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm

Removed: 




diff  --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm 
b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index 8d8db2f246a7..60eacb1e49b2 100644
--- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -276,6 +276,9 @@ static void ParseOSVersion(llvm::VersionTuple , 
NSString *Key) {
 #elif defined(TARGET_OS_WATCHOS) && TARGET_OS_WATCHOS == 1
 arch_32.GetTriple().setOS(llvm::Triple::WatchOS);
 arch_64.GetTriple().setOS(llvm::Triple::WatchOS);
+#elif defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1
+arch_32.GetTriple().setOS(llvm::Triple::MacOSX);
+arch_64.GetTriple().setOS(llvm::Triple::MacOSX);
 #else
 arch_32.GetTriple().setOS(llvm::Triple::IOS);
 arch_64.GetTriple().setOS(llvm::Triple::IOS);



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


[Lldb-commits] [lldb] 2010444 - [Apple Silicon] Handle macOS in PlatformDarwin

2020-06-24 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-24T16:35:36-07:00
New Revision: 2010444e5e5f2a310334e98d7a65667ed78d23ab

URL: 
https://github.com/llvm/llvm-project/commit/2010444e5e5f2a310334e98d7a65667ed78d23ab
DIFF: 
https://github.com/llvm/llvm-project/commit/2010444e5e5f2a310334e98d7a65667ed78d23ab.diff

LOG: [Apple Silicon] Handle macOS in PlatformDarwin

This makes "target create /bin/ls" properly detect which platform
is needed when running lldb. Covered by many tests in the suite.

Added: 


Modified: 
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp 
b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 85cd000d8787..f5ec08a1a199 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -546,6 +546,8 @@ bool 
PlatformDarwin::ARMGetSupportedArchitectureAtIndex(uint32_t idx,
 #define OSNAME "watchos"
 #elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1
 #define OSNAME "bridgeos"
+#elif defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1
+#define OSNAME "macosx"
 #else
 #define OSNAME "ios"
 #endif



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


[Lldb-commits] [lldb] 58de2a3 - [ProcessGDBRemote] Placate the Windows buildbot.

2020-06-24 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-24T13:23:49-07:00
New Revision: 58de2a3851391dd9fa675ea6bcd26072a0638829

URL: 
https://github.com/llvm/llvm-project/commit/58de2a3851391dd9fa675ea6bcd26072a0638829
DIFF: 
https://github.com/llvm/llvm-project/commit/58de2a3851391dd9fa675ea6bcd26072a0638829.diff

LOG: [ProcessGDBRemote] Placate the Windows buildbot.

I'm probably going to rewrite this function anyway, but, in
the meanwhile.

Added: 


Modified: 
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp 
b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index ebc9586dfa5d..d2b72de03eac 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -17,7 +17,9 @@
 #include 
 #endif
 #include 
+#ifdef defined(__APPLE__)
 #include 
+#endif
 #include 
 #include 
 



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


[Lldb-commits] [lldb] b4fdddf - [Apple Silicon] Debugging of process under Rosetta is supported.

2020-06-24 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-24T12:25:01-07:00
New Revision: b4fdddf971b191aa9a6643ab637b87bc1d686254

URL: 
https://github.com/llvm/llvm-project/commit/b4fdddf971b191aa9a6643ab637b87bc1d686254
DIFF: 
https://github.com/llvm/llvm-project/commit/b4fdddf971b191aa9a6643ab637b87bc1d686254.diff

LOG: [Apple Silicon] Debugging of process under Rosetta is supported.

Remove this early exit. It's vestigial from the ppc -> Intel transition,
but it doesn't apply anymore.

Added: 


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

Removed: 




diff  --git a/lldb/source/Host/macosx/objcxx/Host.mm 
b/lldb/source/Host/macosx/objcxx/Host.mm
index 045ba7f3671f..1635132a154e 100644
--- a/lldb/source/Host/macosx/objcxx/Host.mm
+++ b/lldb/source/Host/macosx/objcxx/Host.mm
@@ -631,8 +631,7 @@ static bool 
GetMacOSXProcessUserAndGroup(ProcessInstanceInfo _info) {
 kinfo.kp_proc.p_pid == 0 ||  // Skip kernel (kernel pid is zero)
 kinfo.kp_proc.p_stat == SZOMB || // Zombies are bad, they like 
brains...
 kinfo.kp_proc.p_flag & P_TRACED ||   // Being debugged?
-kinfo.kp_proc.p_flag & P_WEXIT ||// Working on exiting?
-kinfo.kp_proc.p_flag & P_TRANSLATED) // Skip translated ppc (Rosetta)
+kinfo.kp_proc.p_flag & P_WEXIT)
   continue;
 
 ProcessInstanceInfo process_info;



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


[Lldb-commits] [lldb] fd19ddb - [Apple Silicon] Initial support for Rosetta

2020-06-24 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-24T12:19:21-07:00
New Revision: fd19ddb8f2a2b082f492fc59f7f360adf3495701

URL: 
https://github.com/llvm/llvm-project/commit/fd19ddb8f2a2b082f492fc59f7f360adf3495701
DIFF: 
https://github.com/llvm/llvm-project/commit/fd19ddb8f2a2b082f492fc59f7f360adf3495701.diff

LOG: [Apple Silicon] Initial support for Rosetta

Translated processes talk with a different debugserver, shipped with
macOS 11. This patch detects whether a process is translated and
attaches to the correct debugserver implementation.
It's the first patch of a series. Tested on the lldb test suite.

Differential Revision:  https://reviews.llvm.org/D82491

Added: 


Modified: 
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp 
b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index c673a16b348c..ebc9586dfa5d 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -17,6 +17,7 @@
 #include 
 #endif
 #include 
+#include 
 #include 
 #include 
 
@@ -3432,6 +3433,23 @@ Status ProcessGDBRemote::LaunchAndConnectToDebugserver(
 std::bind(MonitorDebugserverProcess, this_wp, _1, _2, _3, _4), false);
 debugserver_launch_info.SetUserID(process_info.GetUserID());
 
+#if defined(__APPLE__)
+// On macOS 11, we need to support x86_64 applications translated to
+// arm64. We check whether a binary is translated and spawn the correct
+// debugserver accordingly.
+int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID,
+  static_cast(process_info.GetProcessID()) };
+struct kinfo_proc processInfo;
+size_t bufsize = sizeof(processInfo);
+if (sysctl(mib, (unsigned)(sizeof(mib)/sizeof(int)), ,
+   , NULL, 0) == 0 && bufsize > 0) {
+  if (processInfo.kp_proc.p_flag & P_TRANSLATED) {
+FileSpec 
rosetta_debugserver("/Library/Apple/usr/libexec/oah/debugserver");
+debugserver_launch_info.SetExecutableFile(rosetta_debugserver, false);
+  }
+}
+#endif
+
 int communication_fd = -1;
 #ifdef USE_SOCKETPAIR_FOR_LOCAL_CONNECTION
 // Use a socketpair on non-Windows systems for security and performance



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


[Lldb-commits] [lldb] 33ece57 - Generalize TestFormattersBoolRefPtr to work on Apple Silicon.

2020-06-23 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-23T12:45:31-07:00
New Revision: 33ece57241d8ad46cb91eca483f05515849a85e5

URL: 
https://github.com/llvm/llvm-project/commit/33ece57241d8ad46cb91eca483f05515849a85e5
DIFF: 
https://github.com/llvm/llvm-project/commit/33ece57241d8ad46cb91eca483f05515849a85e5.diff

LOG: Generalize TestFormattersBoolRefPtr to work on Apple Silicon.

Added: 


Modified: 

lldb/test/API/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
 
b/lldb/test/API/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
index 25ecdef5948c..7435409939e4 100644
--- 
a/lldb/test/API/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
+++ 
b/lldb/test/API/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
@@ -50,14 +50,14 @@ def cleanup():
 # Execute the cleanup function during test case tear down.
 self.addTearDownHook(cleanup)
 
-isiOS = (lldbplatformutil.getPlatform() == 'ios' or 
lldbplatformutil.getPlatform() == 'watchos')
+isArm = 'arm' in self.getArchitecture()
 
 # Now check that we use the right summary for BOOL&
 self.expect('frame variable yes_ref',
 substrs=['YES'])
 self.expect('frame variable no_ref',
 substrs=['NO'])
-if not(isiOS):
+if not(isArm):
 self.expect('frame variable unset_ref', substrs=['12'])
 
 # Now check that we use the right summary for BOOL*
@@ -65,7 +65,7 @@ def cleanup():
 substrs=['YES'])
 self.expect('frame variable no_ptr',
 substrs=['NO'])
-if not(isiOS):
+if not(isArm):
 self.expect('frame variable unset_ptr', substrs=['12'])
 
 # Now check that we use the right summary for BOOL
@@ -73,5 +73,5 @@ def cleanup():
 substrs=['YES'])
 self.expect('frame variable no',
 substrs=['NO'])
-if not(isiOS):
+if not(isArm):
 self.expect('frame variable unset', substrs=['12'])



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


[Lldb-commits] [lldb] 63d5970 - [ObjectFileMachO] Check for TARGET_EMBEDDED instead of listing architectures.

2020-06-23 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-23T12:37:45-07:00
New Revision: 63d597093cccbb8d4962cf490e2d754a73a77e64

URL: 
https://github.com/llvm/llvm-project/commit/63d597093cccbb8d4962cf490e2d754a73a77e64
DIFF: 
https://github.com/llvm/llvm-project/commit/63d597093cccbb8d4962cf490e2d754a73a77e64.diff

LOG: [ObjectFileMachO] Check for TARGET_EMBEDDED instead of listing 
architectures.

Now that Apple Silicon is a thing, we need to generalize the check.

Added: 


Modified: 
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Removed: 




diff  --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp 
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index bc4017b86f07..cbcac7b464e6 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -2596,8 +2596,7 @@ size_t ObjectFileMachO::ParseSymtab() {
   typedef std::set IndirectSymbols;
   IndirectSymbols indirect_symbol_names;
 
-#if defined(__APPLE__) &&  
\
-(defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
+#if defined(__APPLE__) && TARGET_OS_EMBEDDED
 
   // Some recent builds of the dyld_shared_cache (hereafter: DSC) have been
   // optimized by moving LOCAL symbols out of the memory mapped portion of



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


[Lldb-commits] [lldb] 3c79212 - [Host] Check for TARGET_OS_EMBEDDED instead of listing architectures.

2020-06-23 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-23T12:27:21-07:00
New Revision: 3c79212319d878b07ef259d735b52b379f774e25

URL: 
https://github.com/llvm/llvm-project/commit/3c79212319d878b07ef259d735b52b379f774e25
DIFF: 
https://github.com/llvm/llvm-project/commit/3c79212319d878b07ef259d735b52b379f774e25.diff

LOG: [Host] Check for TARGET_OS_EMBEDDED instead of listing architectures.

With the advent of Apple Silicon, checking for the architectures
specifically is not correct anymore. This code is only supposed to
run on embedded devices (iPhones et similia), so mark it accordingly.

Added: 


Modified: 
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm

Removed: 




diff  --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm 
b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index fd88d0c31de6..8d8db2f246a7 100644
--- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -136,7 +136,7 @@ static void ParseOSVersion(llvm::VersionTuple , 
NSString *Key) {
   size_t framework_pos = raw_path.find("LLDB.framework");
   if (framework_pos != std::string::npos) {
 framework_pos += strlen("LLDB.framework");
-#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
+#if TARGET_OS_EMBEDDED
 // Shallow bundle
 raw_path.resize(framework_pos);
 #else



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


[Lldb-commits] [lldb] 2276bb4 - [debugserver] Initial support for Apple Silicon.

2020-06-23 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-23T10:47:16-07:00
New Revision: 2276bb48be0175f96b1494ca67b7921f0d4e87d8

URL: 
https://github.com/llvm/llvm-project/commit/2276bb48be0175f96b1494ca67b7921f0d4e87d8
DIFF: 
https://github.com/llvm/llvm-project/commit/2276bb48be0175f96b1494ca67b7921f0d4e87d8.diff

LOG: [debugserver] Initial support for Apple Silicon.

Set the correct os type in the arch triple when running macOS.
Debugserver currently always assumes macOS == x86_64. This patch
generalizes the support to make sure it works on a different
architecture.

Differential Revision:  https://reviews.llvm.org/D82394

Added: 


Modified: 
lldb/tools/debugserver/source/RNBRemote.cpp

Removed: 




diff  --git a/lldb/tools/debugserver/source/RNBRemote.cpp 
b/lldb/tools/debugserver/source/RNBRemote.cpp
index 5f066bda4227..8a3045564aaf 100644
--- a/lldb/tools/debugserver/source/RNBRemote.cpp
+++ b/lldb/tools/debugserver/source/RNBRemote.cpp
@@ -4908,6 +4908,8 @@ rnb_err_t RNBRemote::HandlePacket_qHostInfo(const char 
*p) {
 strm << "ostype:watchos;";
 #elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1
 strm << "ostype:bridgeos;";
+#elif defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1
+strm << "ostype:macosx;";
 #else
 strm << "ostype:ios;";
 #endif
@@ -6336,7 +6338,7 @@ rnb_err_t RNBRemote::HandlePacket_qProcessInfo(const char 
*p) {
   if (addr_size > 0) {
 rep << "ptrsize:" << std::dec << addr_size << ';';
 
-#if (defined(__x86_64__) || defined(__i386__))
+#if defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1
 // Try and get the OS type by looking at the load commands in the main
 // executable and looking for a LC_VERSION_MIN load command. This is the
 // most reliable way to determine the "ostype" value when on desktop.
@@ -6366,7 +6368,7 @@ rnb_err_t RNBRemote::HandlePacket_qProcessInfo(const char 
*p) {
 load_command_addr = load_command_addr + lc.cmdsize;
   }
 }
-#endif // when compiling this on x86 targets
+#endif // TARGET_OS_OSX
   }
 
   // If we weren't able to find the OS in a LC_VERSION_MIN load command, try
@@ -6383,6 +6385,8 @@ rnb_err_t RNBRemote::HandlePacket_qProcessInfo(const char 
*p) {
   rep << "ostype:watchos;";
 #elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1
   rep << "ostype:bridgeos;";
+#elif defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1
+  rep << "ostype:macosx;";
 #else
   rep << "ostype:ios;";
 #endif



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


[Lldb-commits] [lldb] c3f0d9f - [IRExecutionUnit] Early returns for clarity. NFCI.

2020-06-05 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-05T14:52:36-07:00
New Revision: c3f0d9f3d22d7a3770f2886df9c554e1c277e45a

URL: 
https://github.com/llvm/llvm-project/commit/c3f0d9f3d22d7a3770f2886df9c554e1c277e45a
DIFF: 
https://github.com/llvm/llvm-project/commit/c3f0d9f3d22d7a3770f2886df9c554e1c277e45a.diff

LOG: [IRExecutionUnit] Early returns for clarity. NFCI.

Added: 


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

Removed: 




diff  --git a/lldb/source/Expression/IRExecutionUnit.cpp 
b/lldb/source/Expression/IRExecutionUnit.cpp
index 36ac5913abbc..1bcd6aa918e9 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -741,19 +741,22 @@ void IRExecutionUnit::CollectFallbackNames(
   for (const SearchSpec _spec : C_specs) {
 ConstString name = C_spec.name;
 
-if (CPlusPlusLanguage::IsCPPMangledName(name.GetCString())) {
-  Mangled mangled_name(name);
-  ConstString demangled_name = mangled_name.GetDemangledName();
-  if (!demangled_name.IsEmpty()) {
-const char *demangled_cstr = demangled_name.AsCString();
-const char *lparen_loc = strchr(demangled_cstr, '(');
-if (lparen_loc) {
-  llvm::StringRef base_name(demangled_cstr,
-lparen_loc - demangled_cstr);
-  fallback_specs.push_back(ConstString(base_name));
-}
-  }
-}
+if (!CPlusPlusLanguage::IsCPPMangledName(name.GetCString()))
+  continue;
+
+Mangled mangled_name(name);
+ConstString demangled_name = mangled_name.GetDemangledName();
+if (demangled_name.IsEmpty())
+  continue;
+
+const char *demangled_cstr = demangled_name.AsCString();
+const char *lparen_loc = strchr(demangled_cstr, '(');
+if (!lparen_loc)
+  continue;
+
+llvm::StringRef base_name(demangled_cstr,
+  lparen_loc - demangled_cstr);
+fallback_specs.push_back(ConstString(base_name));
   }
 }
 

diff  --git a/lldb/source/Expression/IRInterpreter.cpp 
b/lldb/source/Expression/IRInterpreter.cpp
index 0af767116b74..04d7cb3e74b6 100644
--- a/lldb/source/Expression/IRInterpreter.cpp
+++ b/lldb/source/Expression/IRInterpreter.cpp
@@ -173,24 +173,24 @@ class InterpreterStackFrame {
 
   return AssignToMatchType(scalar, value_apint.getLimitedValue(),
value->getType());
-} else {
-  lldb::addr_t process_address = ResolveValue(value, module);
-  size_t value_size = m_target_data.getTypeStoreSize(value->getType());
+}
 
-  lldb_private::DataExtractor value_extractor;
-  lldb_private::Status extract_error;
+lldb::addr_t process_address = ResolveValue(value, module);
+size_t value_size = m_target_data.getTypeStoreSize(value->getType());
 
-  m_execution_unit.GetMemoryData(value_extractor, process_address,
- value_size, extract_error);
+lldb_private::DataExtractor value_extractor;
+lldb_private::Status extract_error;
 
-  if (!extract_error.Success())
-return false;
+m_execution_unit.GetMemoryData(value_extractor, process_address,
+   value_size, extract_error);
 
-  lldb::offset_t offset = 0;
-  if (value_size <= 8) {
-uint64_t u64value = value_extractor.GetMaxU64(, value_size);
-return AssignToMatchType(scalar, u64value, value->getType());
-  }
+if (!extract_error.Success())
+  return false;
+
+lldb::offset_t offset = 0;
+if (value_size <= 8) {
+  uint64_t u64value = value_extractor.GetMaxU64(, value_size);
+  return AssignToMatchType(scalar, u64value, value->getType());
 }
 
 return false;



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


[Lldb-commits] [lldb] 7c1b060 - [IRInterpreter] Unused. Drive-by cleanup. NFCI.

2020-06-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-06-03T13:31:58-07:00
New Revision: 7c1b060c3c65cac50edec5cceb6653957c344d96

URL: 
https://github.com/llvm/llvm-project/commit/7c1b060c3c65cac50edec5cceb6653957c344d96
DIFF: 
https://github.com/llvm/llvm-project/commit/7c1b060c3c65cac50edec5cceb6653957c344d96.diff

LOG: [IRInterpreter] Unused. Drive-by cleanup. NFCI.

Added: 


Modified: 
lldb/source/Expression/IRInterpreter.cpp

Removed: 




diff  --git a/lldb/source/Expression/IRInterpreter.cpp 
b/lldb/source/Expression/IRInterpreter.cpp
index 6f61a4bd26bf..0af767116b74 100644
--- a/lldb/source/Expression/IRInterpreter.cpp
+++ b/lldb/source/Expression/IRInterpreter.cpp
@@ -433,8 +433,6 @@ static const char *unsupported_opcode_error =
 "Interpreter doesn't handle one of the expression's opcodes";
 static const char *unsupported_operand_error =
 "Interpreter doesn't handle one of the expression's operands";
-// static const char *interpreter_initialization_error = "Interpreter couldn't
-// be initialized";
 static const char *interpreter_internal_error =
 "Interpreter encountered an internal error";
 static const char *bad_value_error =
@@ -444,8 +442,6 @@ static const char *memory_allocation_error =
 static const char *memory_write_error = "Interpreter couldn't write to memory";
 static const char *memory_read_error = "Interpreter couldn't read from memory";
 static const char *infinite_loop_error = "Interpreter ran for too many cycles";
-// static const char *bad_result_error = "Result of expression
-// is in bad memory";
 static const char *too_many_functions_error =
 "Interpreter doesn't handle modules with multiple function bodies.";
 



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


[Lldb-commits] [lldb] d606dcc - [TestIndirectSymbol] This tests an Apple-specific feature.

2020-05-05 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-05-05T13:14:05-07:00
New Revision: d606dcc65254b13e6238b69d8185d3667e850522

URL: 
https://github.com/llvm/llvm-project/commit/d606dcc65254b13e6238b69d8185d3667e850522
DIFF: 
https://github.com/llvm/llvm-project/commit/d606dcc65254b13e6238b69d8185d3667e850522.diff

LOG: [TestIndirectSymbol] This tests an Apple-specific feature.

Remove a redundant check.

Added: 


Modified: 
lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py

Removed: 




diff  --git a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py 
b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
index e67611ef3692..c80fb748e41f 100644
--- a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
+++ b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
@@ -28,10 +28,9 @@ def test_with_python_api(self):
 target = self.dbg.CreateTarget(exe)
 self.assertTrue(target, VALID_TARGET)
 
-if self.platformIsDarwin():
-lib1 = self.getBuildArtifact('libindirect.dylib')
-lib2 = self.getBuildArtifact('libreexport.dylib')
-self.registerSharedLibrariesWithTarget(target, [lib1, lib2])
+lib1 = self.getBuildArtifact('libindirect.dylib')
+lib2 = self.getBuildArtifact('libreexport.dylib')
+self.registerSharedLibrariesWithTarget(target, [lib1, lib2])
 
 self.main_source_spec = lldb.SBFileSpec(self.main_source)
 



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


[Lldb-commits] [lldb] 48e5eed - [TestIndirectSymbols] This now runs and works on iOS (arm64).

2020-05-05 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-05-05T13:14:05-07:00
New Revision: 48e5eedab3aa170f880b333d5e38bbc6e72d4b8b

URL: 
https://github.com/llvm/llvm-project/commit/48e5eedab3aa170f880b333d5e38bbc6e72d4b8b
DIFF: 
https://github.com/llvm/llvm-project/commit/48e5eedab3aa170f880b333d5e38bbc6e72d4b8b.diff

LOG: [TestIndirectSymbols] This now runs and works on iOS (arm64).

Added: 


Modified: 
lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py

Removed: 




diff  --git a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py 
b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
index 2718bd746a08..e67611ef3692 100644
--- a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
+++ b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
@@ -19,7 +19,6 @@ def setUp(self):
 self.main_source = "main.c"
 
 @skipUnlessDarwin
-@expectedFailureAll(oslist=no_match(["macosx"]), 
bugnumber="rdar://55952764")
 @add_test_categories(['pyapi'])
 def test_with_python_api(self):
 """Test stepping and setting breakpoints in indirect and re-exported 
symbols."""



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


[Lldb-commits] [lldb] 6951fe3 - [arm64] Remove an old special case that's not needed anymore.

2020-05-04 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-05-04T14:18:51-07:00
New Revision: 6951fe3989343c6605c397ac427acea4e39d2132

URL: 
https://github.com/llvm/llvm-project/commit/6951fe3989343c6605c397ac427acea4e39d2132
DIFF: 
https://github.com/llvm/llvm-project/commit/6951fe3989343c6605c397ac427acea4e39d2132.diff

LOG: [arm64] Remove an old special case that's not needed anymore.

Debug info generation & codegen now steps onto the correct line.

Added: 


Modified: 
lldb/test/API/functionalities/thread/step_out/TestThreadStepOut.py
lldb/test/API/functionalities/thread/step_out/main.cpp

Removed: 




diff  --git 
a/lldb/test/API/functionalities/thread/step_out/TestThreadStepOut.py 
b/lldb/test/API/functionalities/thread/step_out/TestThreadStepOut.py
index 2d9632eb2dd6..eb2d264ec2e3 100644
--- a/lldb/test/API/functionalities/thread/step_out/TestThreadStepOut.py
+++ b/lldb/test/API/functionalities/thread/step_out/TestThreadStepOut.py
@@ -70,9 +70,9 @@ def setUp(self):
 self.bkpt_string = '// Set breakpoint here'
 self.breakpoint = line_number('main.cpp', self.bkpt_string)   
 
-if "gcc" in self.getCompiler() or self.isIntelCompiler() or 
self.getArchitecture() in ['arm64', 'arm64e']:
+if "gcc" in self.getCompiler() or self.isIntelCompiler():
 self.step_out_destination = line_number(
-'main.cpp', '// Expect to stop here after step-out (icc and 
gcc; arm64)')
+'main.cpp', '// Expect to stop here after step-out (icc and 
gcc)')
 else:
 self.step_out_destination = line_number(
 'main.cpp', '// Expect to stop here after step-out (clang)')

diff  --git a/lldb/test/API/functionalities/thread/step_out/main.cpp 
b/lldb/test/API/functionalities/thread/step_out/main.cpp
index 76818fff925a..14d84010de8a 100644
--- a/lldb/test/API/functionalities/thread/step_out/main.cpp
+++ b/lldb/test/API/functionalities/thread/step_out/main.cpp
@@ -22,7 +22,7 @@ thread_func ()
 step_out_of_here(); // Expect to stop here after step-out (clang)
 
 // Return
-return NULL;  // Expect to stop here after step-out (icc and gcc; arm64)
+return NULL;  // Expect to stop here after step-out (icc and gcc)
 }
 
 int main ()



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


[Lldb-commits] [lldb] 30ddd4c - [ARM64] Remove more dead code. NFC.

2020-05-01 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-05-01T15:05:42-07:00
New Revision: 30ddd4ce19316fd2a8a50c5bc511433c87ecb95c

URL: 
https://github.com/llvm/llvm-project/commit/30ddd4ce19316fd2a8a50c5bc511433c87ecb95c
DIFF: 
https://github.com/llvm/llvm-project/commit/30ddd4ce19316fd2a8a50c5bc511433c87ecb95c.diff

LOG: [ARM64] Remove more dead code. NFC.

Added: 


Modified: 
lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp 
b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
index 74253022a894..dcf41444e48f 100644
--- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
+++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
@@ -417,20 +417,12 @@ bool 
EmulateInstructionARM64::EvaluateInstruction(uint32_t evaluate_options) {
   if (opcode_data == nullptr)
 return false;
 
-  // printf ("opcode template for 0x%8.8x: %s\n", opcode, opcode_data->name);
   const bool auto_advance_pc =
   evaluate_options & eEmulateInstructionOptionAutoAdvancePC;
   m_ignore_conditions =
   evaluate_options & eEmulateInstructionOptionIgnoreConditions;
 
   bool success = false;
-  //if (m_opcode_cpsr == 0 || m_ignore_conditions == false)
-  //{
-  //m_opcode_cpsr = ReadRegisterUnsigned (eRegisterKindLLDB,
-  //  gpr_cpsr_arm64,
-  //  0,
-  //  );
-  //}
 
   // Only return false if we are unable to read the CPSR if we care about
   // conditions



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


[Lldb-commits] [lldb] 68f8e02 - [ARM64] Remove dead code.

2020-05-01 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-05-01T15:04:44-07:00
New Revision: 68f8e0264e297bf7abadb1ca3850949606bdb4f5

URL: 
https://github.com/llvm/llvm-project/commit/68f8e0264e297bf7abadb1ca3850949606bdb4f5
DIFF: 
https://github.com/llvm/llvm-project/commit/68f8e0264e297bf7abadb1ca3850949606bdb4f5.diff

LOG: [ARM64] Remove dead code.

Added: 


Modified: 
lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp 
b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
index f58453909426..74253022a894 100644
--- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
+++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
@@ -785,10 +785,6 @@ bool EmulateInstructionARM64::EmulateLDPSTP(const uint32_t 
opcode) {
 
   RegisterValue data_Rt;
   RegisterValue data_Rt2;
-
-  //if (vector)
-  //CheckFPEnabled(false);
-
   RegisterInfo reg_info_base;
   RegisterInfo reg_info_Rt;
   RegisterInfo reg_info_Rt2;



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


[Lldb-commits] [lldb] ce77900 - [DWARF] Rename a function and comment it for clarity.

2020-04-16 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-04-16T15:37:09-07:00
New Revision: ce7790044faa48a1ec49b6339797180e05520cef

URL: 
https://github.com/llvm/llvm-project/commit/ce7790044faa48a1ec49b6339797180e05520cef
DIFF: 
https://github.com/llvm/llvm-project/commit/ce7790044faa48a1ec49b6339797180e05520cef.diff

LOG: [DWARF] Rename a function and comment it for clarity.

Pointed out by Adrian.

Added: 


Modified: 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index b089c4e1f04a..1c1acd9dd61a 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -1016,7 +1016,7 @@ DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr(const 
DWARFUnit *cu) const {
   return nullptr;
 }
 
-bool DWARFDebugInfoEntry::IsGlobalOrStaticVariable() const {
+bool DWARFDebugInfoEntry::IsGlobalOrStaticScopeVariable() const {
   if (Tag() != DW_TAG_variable)
 return false;
   const DWARFDebugInfoEntry *parent_die = GetParent();

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h 
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
index c05d79c01817..e12a19c13d1c 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
@@ -167,7 +167,10 @@ class DWARFDebugInfoEntry {
   void SetSiblingIndex(uint32_t idx) { m_sibling_idx = idx; }
   void SetParentIndex(uint32_t idx) { m_parent_idx = idx; }
 
-  bool IsGlobalOrStaticVariable() const;
+  // This function returns true if the variable scope is either
+  // global or (file-static). It will return false for static variables
+  // that are local to a function, as they have local scope.
+  bool IsGlobalOrStaticScopeVariable() const;
 
 protected:
   static DWARFDeclContext

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
index 535e79a7ecc7..3fe38e75e612 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -204,7 +204,7 @@ void ManualDWARFIndex::IndexUnitImpl(DWARFUnit ,
 case DW_AT_location:
 case DW_AT_const_value:
   has_location_or_const_value = true;
-  is_global_or_static_variable = die.IsGlobalOrStaticVariable();
+  is_global_or_static_variable = die.IsGlobalOrStaticScopeVariable();
 
   break;
 

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 400ba6e1f443..b13331c4852e 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3390,7 +3390,8 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const 
SymbolContext ,
 }
   }
 } else {
-  if (location_is_const_value_data && 
die.GetDIE()->IsGlobalOrStaticVariable())
+  if (location_is_const_value_data &&
+  die.GetDIE()->IsGlobalOrStaticScopeVariable())
 scope = eValueTypeVariableStatic;
   else {
 scope = eValueTypeVariableLocal;



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


[Lldb-commits] [lldb] 1fae85a - [DWARF] Add instructions to regenerate this test, if needed.

2020-04-16 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-04-16T13:31:32-07:00
New Revision: 1fae85a8534ec51ca893899314bd244b3e9684c7

URL: 
https://github.com/llvm/llvm-project/commit/1fae85a8534ec51ca893899314bd244b3e9684c7
DIFF: 
https://github.com/llvm/llvm-project/commit/1fae85a8534ec51ca893899314bd244b3e9684c7.diff

LOG: [DWARF] Add instructions to regenerate this test, if needed.

Added: 


Modified: 
lldb/test/Shell/SymbolFile/DWARF/static_scope.s

Removed: 




diff  --git a/lldb/test/Shell/SymbolFile/DWARF/static_scope.s 
b/lldb/test/Shell/SymbolFile/DWARF/static_scope.s
index 84a69e08ecfc..02d497ac9ccb 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/static_scope.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/static_scope.s
@@ -3,6 +3,15 @@
 
 # REQUIRES: x86
 
+# Original test case (for future reference), compiled with:
+# $ clang-10 -g -Og test.c -o test
+# $ cat test.c
+# volatile int a;
+# main() {
+#   int b = 3;
+#   a;
+# }
+
 # RUN: llvm-mc -triple=x86_64-apple-macosx10.15.0 -filetype=obj %s > %t.o
 # RUN: lldb-test symbols %t.o | FileCheck %s
 



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


[Lldb-commits] [lldb] 8cac6d1 - [Shell] Remove incorrectly cargo-culted UNSUPPORTED.

2020-04-16 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-04-16T13:22:46-07:00
New Revision: 8cac6d1875e094f2b78621f3ff12e61553cd12ec

URL: 
https://github.com/llvm/llvm-project/commit/8cac6d1875e094f2b78621f3ff12e61553cd12ec
DIFF: 
https://github.com/llvm/llvm-project/commit/8cac6d1875e094f2b78621f3ff12e61553cd12ec.diff

LOG: [Shell] Remove incorrectly cargo-culted UNSUPPORTED.

Let's see if this sticks on the bots.

Added: 


Modified: 
lldb/test/Shell/SymbolFile/DWARF/static_scope.s

Removed: 




diff  --git a/lldb/test/Shell/SymbolFile/DWARF/static_scope.s 
b/lldb/test/Shell/SymbolFile/DWARF/static_scope.s
index 17b248579849..84a69e08ecfc 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/static_scope.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/static_scope.s
@@ -2,7 +2,6 @@
 # variable `b`, which is `local` and not `static`.
 
 # REQUIRES: x86
-# UNSUPPORTED: lldb-repro
 
 # RUN: llvm-mc -triple=x86_64-apple-macosx10.15.0 -filetype=obj %s > %t.o
 # RUN: lldb-test symbols %t.o | FileCheck %s



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


Re: [Lldb-commits] [lldb] 680082a - [lldb/Reproducers] Add a small artificial delay before exiting

2020-04-09 Thread Davide Italiano via lldb-commits


> On Apr 9, 2020, at 11:05, Jonas Devlieghere via lldb-commits 
>  wrote:
> 
> 
> Author: Jonas Devlieghere
> Date: 2020-04-09T11:03:24-07:00
> New Revision: 680082a408dd2df7410d77696100eac8ce9d5530
> 
> URL: 
> https://github.com/llvm/llvm-project/commit/680082a408dd2df7410d77696100eac8ce9d5530
> DIFF: 
> https://github.com/llvm/llvm-project/commit/680082a408dd2df7410d77696100eac8ce9d5530.diff
> 
> LOG: [lldb/Reproducers] Add a small artificial delay before exiting
> 
> Add a small artificial delay in replay mode before exiting to ensure
> that all asynchronous events have completed. This should reduce the
> level of replay flakiness on some of the slower bots.
> 
> Added: 
> 
> 
> Modified: 
>lldb/source/Utility/ReproducerInstrumentation.cpp
> 
> Removed: 
> 
> 
> 
> 
> diff  --git a/lldb/source/Utility/ReproducerInstrumentation.cpp 
> b/lldb/source/Utility/ReproducerInstrumentation.cpp
> index 4c32d9407830..3bf81286bbe9 100644
> --- a/lldb/source/Utility/ReproducerInstrumentation.cpp
> +++ b/lldb/source/Utility/ReproducerInstrumentation.cpp
> @@ -8,6 +8,7 @@
> 
> #include "lldb/Utility/ReproducerInstrumentation.h"
> #include "lldb/Utility/Reproducer.h"
> +#include 
> #include 
> #include 
> 
> @@ -94,6 +95,10 @@ bool Registry::Replay(llvm::StringRef buffer) {
> GetReplayer(id)->operator()(deserializer);
>   }
> 
> +  // Add a small artificial delay to ensure that all asynchronous events have
> +  // completed before we exit.
> +  std::this_thread::sleep_for (std::chrono::milliseconds(100));
> +
>   return true;
> }
> 

I understand this is (unfortunately) sorely needed, but I’m somehow skeptical 
of random delays. 
You probably thought about this and dropped the idea on the floor — but, is 
there a way to make the sync more explicit?
If you can’t, at least you can detect not everything is in order and sleep, 
for, e.g. another 100 milliseconds in a retry-loop?

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


[Lldb-commits] [lldb] d51b38f - [DWARF] Not all the constant variables are "static".

2020-04-08 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-04-08T11:07:19-07:00
New Revision: d51b38f1b3a34c2a8e1869af6434ebd743ce7a5e

URL: 
https://github.com/llvm/llvm-project/commit/d51b38f1b3a34c2a8e1869af6434ebd743ce7a5e
DIFF: 
https://github.com/llvm/llvm-project/commit/d51b38f1b3a34c2a8e1869af6434ebd743ce7a5e.diff

LOG: [DWARF] Not all the constant variables are "static".

Fixes rdar://problem/61402307

Differential Revision: https://reviews.llvm.org/D77698

Added: 
lldb/test/Shell/SymbolFile/DWARF/static_scope.s

Modified: 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index 746be69a3e12..b089c4e1f04a 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -1016,6 +1016,29 @@ DWARFDebugInfoEntry::GetAbbreviationDeclarationPtr(const 
DWARFUnit *cu) const {
   return nullptr;
 }
 
+bool DWARFDebugInfoEntry::IsGlobalOrStaticVariable() const {
+  if (Tag() != DW_TAG_variable)
+return false;
+  const DWARFDebugInfoEntry *parent_die = GetParent();
+  while (parent_die != nullptr) {
+switch (parent_die->Tag()) {
+case DW_TAG_subprogram:
+case DW_TAG_lexical_block:
+case DW_TAG_inlined_subroutine:
+  return false;
+
+case DW_TAG_compile_unit:
+case DW_TAG_partial_unit:
+  return true;
+
+default:
+  break;
+}
+parent_die = parent_die->GetParent();
+  }
+  return false;
+}
+
 bool DWARFDebugInfoEntry::operator==(const DWARFDebugInfoEntry ) const {
   return m_offset == rhs.m_offset && m_parent_idx == rhs.m_parent_idx &&
  m_sibling_idx == rhs.m_sibling_idx &&

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h 
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
index 3a962ad8e9b3..c05d79c01817 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
@@ -167,6 +167,8 @@ class DWARFDebugInfoEntry {
   void SetSiblingIndex(uint32_t idx) { m_sibling_idx = idx; }
   void SetParentIndex(uint32_t idx) { m_parent_idx = idx; }
 
+  bool IsGlobalOrStaticVariable() const;
+
 protected:
   static DWARFDeclContext
   GetDWARFDeclContextStatic(const DWARFDebugInfoEntry *die, DWARFUnit *cu);

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
index 3951a2a32a1b..36f8aa2bfc13 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -204,35 +204,8 @@ void ManualDWARFIndex::IndexUnitImpl(DWARFUnit ,
 case DW_AT_location:
 case DW_AT_const_value:
   has_location_or_const_value = true;
-  if (tag == DW_TAG_variable) {
-const DWARFDebugInfoEntry *parent_die = die.GetParent();
-while (parent_die != nullptr) {
-  switch (parent_die->Tag()) {
-  case DW_TAG_subprogram:
-  case DW_TAG_lexical_block:
-  case DW_TAG_inlined_subroutine:
-// Even if this is a function level static, we don't add it. We
-// could theoretically add these if we wanted to by
-// introspecting into the DW_AT_location and seeing if the
-// location describes a hard coded address, but we don't want
-// the performance penalty of that right now.
-is_global_or_static_variable = false;
-parent_die = nullptr; // Terminate the while loop.
-break;
-
-  case DW_TAG_compile_unit:
-  case DW_TAG_partial_unit:
-is_global_or_static_variable = true;
-parent_die = nullptr; // Terminate the while loop.
-break;
-
-  default:
-parent_die =
-parent_die->GetParent(); // Keep going in the while loop.
-break;
-  }
-}
-  }
+  is_global_or_static_variable = die.IsGlobalOrStaticVariable();
+
   break;
 
 case DW_AT_specification:

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 6d43f957d362..5c14d3b52ac5 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3442,7 +3442,7 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const 
SymbolContext ,
 }
  

[Lldb-commits] [lldb] f30ebf4 - [ManualDWARFIndex] Remove dead code, in preparation for moving this function.

2020-04-07 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-04-07T16:28:13-07:00
New Revision: f30ebf437851d3c68fd0eee82afbc0cef7373c00

URL: 
https://github.com/llvm/llvm-project/commit/f30ebf437851d3c68fd0eee82afbc0cef7373c00
DIFF: 
https://github.com/llvm/llvm-project/commit/f30ebf437851d3c68fd0eee82afbc0cef7373c00.diff

LOG: [ManualDWARFIndex] Remove dead code, in preparation for moving this 
function.

Added: 


Modified: 
lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
index cb783314d320..3951a2a32a1b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -185,12 +185,6 @@ void ManualDWARFIndex::IndexUnitImpl(DWARFUnit ,
 is_declaration = form_value.Unsigned() != 0;
   break;
 
-//case DW_AT_artificial:
-//if (attributes.ExtractFormValueAtIndex(i,
-//form_value))
-//is_artificial = form_value.Unsigned() != 0;
-//break;
-
 case DW_AT_MIPS_linkage_name:
 case DW_AT_linkage_name:
   if (attributes.ExtractFormValueAtIndex(i, form_value))
@@ -223,20 +217,6 @@ void ManualDWARFIndex::IndexUnitImpl(DWARFUnit ,
 // location describes a hard coded address, but we don't want
 // the performance penalty of that right now.
 is_global_or_static_variable = false;
-// if (attributes.ExtractFormValueAtIndex(dwarf, i,
-//form_value)) {
-//   // If we have valid block data, then we have location
-//   // expression bytesthat are fixed (not a location list).
-//   const uint8_t *block_data = form_value.BlockData();
-//   if (block_data) {
-// uint32_t block_length = form_value.Unsigned();
-// if (block_length == 1 +
-// attributes.UnitAtIndex(i)->GetAddressByteSize()) {
-//   if (block_data[0] == DW_OP_addr)
-// add_die = true;
-// }
-//   }
-// }
 parent_die = nullptr; // Terminate the while loop.
 break;
 



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


[Lldb-commits] [lldb] 30a292c - [ScriptInterpreterPython] Remove buggy code to save/restore stdin.

2020-04-07 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-04-07T12:43:25-07:00
New Revision: 30a292c25df327eb35b341b919c4e9b5e80323be

URL: 
https://github.com/llvm/llvm-project/commit/30a292c25df327eb35b341b919c4e9b5e80323be
DIFF: 
https://github.com/llvm/llvm-project/commit/30a292c25df327eb35b341b919c4e9b5e80323be.diff

LOG: [ScriptInterpreterPython] Remove buggy code to save/restore stdin.

Discussed on lldb-dev with Pavel Labath. This doesn't work for
background processes [causes Python to be stuck forever], and it's
unclear whether it's needed. There's no test, also. If this turns
out to be useful, it can be recommitted with a functional implementation
and a test.

Added: 


Modified: 
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 
b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index ee94a183e0dc..c53b3bd0fb65 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -224,10 +224,6 @@ struct InitializePythonRAII {
 public:
   InitializePythonRAII()
   : m_gil_state(PyGILState_UNLOCKED), m_was_already_initialized(false) {
-// Python will muck with STDIN terminal state, so save off any current TTY
-// settings so we can restore them.
-m_stdin_tty_state.Save(STDIN_FILENO, false);
-
 InitializePythonHome();
 
 #ifdef LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE
@@ -271,8 +267,6 @@ struct InitializePythonRAII {
   // We initialized the threads in this function, just unlock the GIL.
   PyEval_SaveThread();
 }
-
-m_stdin_tty_state.Restore();
   }
 
 private:



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


[Lldb-commits] [lldb] 41610d6 - [gdb-remote] Moving prevents copy elision. Found by clang.

2020-04-06 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-04-06T14:59:27-07:00
New Revision: 41610d665013d716da245175ada1d9c5a8b79558

URL: 
https://github.com/llvm/llvm-project/commit/41610d665013d716da245175ada1d9c5a8b79558
DIFF: 
https://github.com/llvm/llvm-project/commit/41610d665013d716da245175ada1d9c5a8b79558.diff

LOG: [gdb-remote] Moving prevents copy elision. Found by clang.

Added: 


Modified: 
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp 
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 3e7ab27802a8..f8b09d5207ab 100644
--- 
a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ 
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -643,7 +643,7 @@ static json::Array 
GetStackMemoryAsJSON(NativeProcessProtocol ,
   if (error.Success() && bytes_read > 0) {
 buf.resize(bytes_read);
 stack_memory_chunks.push_back(
-std::move(CreateMemoryChunk(stack_memory_chunks, sp_value, buf)));
+CreateMemoryChunk(stack_memory_chunks, sp_value, buf));
   }
 
   // Additionally, try to walk the frame pointer link chain. If the frame
@@ -662,7 +662,7 @@ static json::Array 
GetStackMemoryAsJSON(NativeProcessProtocol ,
   break;
 
 stack_memory_chunks.push_back(
-std::move(CreateMemoryChunk(stack_memory_chunks, fp_value, 
fp_ra_buf)));
+CreateMemoryChunk(stack_memory_chunks, fp_value, fp_ra_buf));
 
 // Advance the stack pointer and the frame pointer.
 sp_value = fp_value;



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


[Lldb-commits] [lldb] 6f9ea26 - [debugserver] Get rid of `else` after `return`. NFC.

2020-04-06 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-04-06T13:35:48-07:00
New Revision: 6f9ea26002914cd3bcc27f09e65a151c81682352

URL: 
https://github.com/llvm/llvm-project/commit/6f9ea26002914cd3bcc27f09e65a151c81682352
DIFF: 
https://github.com/llvm/llvm-project/commit/6f9ea26002914cd3bcc27f09e65a151c81682352.diff

LOG: [debugserver] Get rid of `else` after `return`. NFC.

Added: 


Modified: 
lldb/tools/debugserver/source/DNB.cpp

Removed: 




diff  --git a/lldb/tools/debugserver/source/DNB.cpp 
b/lldb/tools/debugserver/source/DNB.cpp
index d0dd8fd31841..b87ef5768a96 100644
--- a/lldb/tools/debugserver/source/DNB.cpp
+++ b/lldb/tools/debugserver/source/DNB.cpp
@@ -421,7 +421,8 @@ nub_process_t DNBProcessAttachByName(const char *name, 
struct timespec *timeout,
   if (num_matching_proc_infos == 0) {
 DNBLogError("error: no processes match '%s'\n", name);
 return INVALID_NUB_PROCESS;
-  } else if (num_matching_proc_infos > 1) {
+  }
+  if (num_matching_proc_infos > 1) {
 DNBLogError("error: %llu processes match '%s':\n",
 (uint64_t)num_matching_proc_infos, name);
 size_t i;



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


[Lldb-commits] [lldb] 64799fb - [debugserver/ARM64] Make sure watchpoints hit are attributed correctly.

2020-03-31 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-31T15:56:20-07:00
New Revision: 64799fbebddc9877f78c7501b0b986b7afe84d6b

URL: 
https://github.com/llvm/llvm-project/commit/64799fbebddc9877f78c7501b0b986b7afe84d6b
DIFF: 
https://github.com/llvm/llvm-project/commit/64799fbebddc9877f78c7501b0b986b7afe84d6b.diff

LOG: [debugserver/ARM64] Make sure watchpoints hit are attributed correctly.

This didn't happen for arm64 if you have watches for variables
that are contigous in memory.



Added: 
lldb/test/API/commands/watchpoints/watchpoint_count/Makefile
lldb/test/API/commands/watchpoints/watchpoint_count/TestWatchpointCount.py
lldb/test/API/commands/watchpoints/watchpoint_count/main.c

Modified: 
lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp

Removed: 




diff  --git a/lldb/test/API/commands/watchpoints/watchpoint_count/Makefile 
b/lldb/test/API/commands/watchpoints/watchpoint_count/Makefile
new file mode 100644
index ..10495940055b
--- /dev/null
+++ b/lldb/test/API/commands/watchpoints/watchpoint_count/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules

diff  --git 
a/lldb/test/API/commands/watchpoints/watchpoint_count/TestWatchpointCount.py 
b/lldb/test/API/commands/watchpoints/watchpoint_count/TestWatchpointCount.py
new file mode 100644
index ..18667e913a94
--- /dev/null
+++ b/lldb/test/API/commands/watchpoints/watchpoint_count/TestWatchpointCount.py
@@ -0,0 +1,43 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestWatchpointCount(TestBase):
+mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
+
+def setUp(self):
+TestBase.setUp(self)
+
+def test_watchpoint_count(self):
+self.build()
+(_, process, thread, _) = lldbutil.run_to_source_breakpoint(self, 
"patatino", lldb.SBFileSpec("main.c"))
+frame = thread.GetFrameAtIndex(0)
+first_var = frame.FindVariable("x1")
+second_var = frame.FindVariable("x2")
+
+error = lldb.SBError()
+first_watch = first_var.Watch(True, False, True, error)
+if not error.Success():
+self.fail(
+"Failed to make watchpoint for x1: %s" %
+(error.GetCString()))
+
+second_watch = second_var.Watch(True, False, True, error)
+if not error.Success():
+self.fail(
+"Failed to make watchpoint for x2: %s" %
+(error.GetCString()))
+process.Continue()
+
+stop_reason = thread.GetStopReason()
+self.assertEqual(stop_reason, lldb.eStopReasonWatchpoint, "watchpoint 
for x1 not hit")
+stop_reason_descr = thread.GetStopDescription(256)
+self.assertEqual(stop_reason_descr, "watchpoint 1")
+
+process.Continue()
+stop_reason = thread.GetStopReason()
+self.assertEqual(stop_reason, lldb.eStopReasonWatchpoint, "watchpoint 
for x2 not hit")
+stop_reason_descr = thread.GetStopDescription(256)
+self.assertEqual(stop_reason_descr, "watchpoint 2")

diff  --git a/lldb/test/API/commands/watchpoints/watchpoint_count/main.c 
b/lldb/test/API/commands/watchpoints/watchpoint_count/main.c
new file mode 100644
index ..fc9a370e41f3
--- /dev/null
+++ b/lldb/test/API/commands/watchpoints/watchpoint_count/main.c
@@ -0,0 +1,13 @@
+#include 
+#include 
+
+int main() {
+  uint8_t x1 = 0;
+  uint16_t x2 = 0;
+
+  printf("patatino\n");
+
+  x1 += 1;
+  x2 += 2;
+  return 0;
+}

diff  --git a/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp 
b/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
index e5d4b05d987c..3e7bda88e6af 100644
--- a/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
@@ -1067,31 +1067,34 @@ uint32_t 
DNBArchMachARM64::GetHardwareWatchpointHit(nub_addr_t ) {
"DNBArchMachARM64::GetHardwareWatchpointHit() addr = 
0x%llx",
(uint64_t)addr);
 
-  // This is the watchpoint value to match against, i.e., word address.
-  nub_addr_t wp_val = addr & ~((nub_addr_t)3);
   if (kret == KERN_SUCCESS) {
 DBG _state = m_state.dbg;
 uint32_t i, num = NumSupportedHardwareWatchpoints();
 for (i = 0; i < num; ++i) {
   nub_addr_t wp_addr = GetWatchAddress(debug_state, i);
-  DNBLogThreadedIf(LOG_WATCHPOINTS, "DNBArchMachARM64::"
-"GetHardwareWatchpointHit() slot: %u "
-"(addr = 0x%llx).",
-   i, (uint64_t)wp_addr);
-  if (wp_val == wp_addr) {
-uint32_t byte_mask = bits(debug_state.__wcr[i], 12, 5);
-
-// Sanity check the byte_mask, first.
-if (LowestBitSet(byte_mask) < 0)
-  continue;
-
-  

[Lldb-commits] [lldb] 75cfd38 - Revert "[lldb/Reproducers] Always collect the whole dSYM in the reproducer"

2020-03-31 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-31T10:56:02-07:00
New Revision: 75cfd382201978615cca1c91c2d9f14f8b7af56d

URL: 
https://github.com/llvm/llvm-project/commit/75cfd382201978615cca1c91c2d9f14f8b7af56d
DIFF: 
https://github.com/llvm/llvm-project/commit/75cfd382201978615cca1c91c2d9f14f8b7af56d.diff

LOG: Revert "[lldb/Reproducers] Always collect the whole dSYM in the reproducer"

This reverts commit 38ddb49e5242920e44a982cff7bbe2e86bd23a69 as it
breaks the macOS bots.

Added: 


Modified: 
lldb/include/lldb/Utility/Reproducer.h
lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
lldb/source/Utility/Reproducer.cpp

Removed: 
lldb/test/Shell/Reproducer/TestDSYM.test



diff  --git a/lldb/include/lldb/Utility/Reproducer.h 
b/lldb/include/lldb/Utility/Reproducer.h
index b8b897d02ea2..bffb0f7c0647 100644
--- a/lldb/include/lldb/Utility/Reproducer.h
+++ b/lldb/include/lldb/Utility/Reproducer.h
@@ -98,8 +98,6 @@ class FileProvider : public Provider {
 return m_collector;
   }
 
-  void recordInterestingDirectory(const llvm::Twine );
-
   void Keep() override {
 auto mapping = GetRoot().CopyByAppendingPathComponent(Info::file);
 // Temporary files that are removed during execution can cause copy errors.

diff  --git a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp 
b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
index e819c342c6ec..2b67fee70617 100644
--- a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
+++ b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
@@ -20,7 +20,6 @@
 #include "lldb/Symbol/LocateSymbolFile.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Reproducer.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/Timer.h"
 
@@ -146,11 +145,6 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP 
_sp,
 }
 
 if (dsym_fspec) {
-  // Compute dSYM root.
-  std::string dsym_root = dsym_fspec.GetPath();
-  const size_t pos = dsym_root.find("/Contents/Resources/");
-  dsym_root = pos != std::string::npos ? dsym_root.substr(0, pos) : "";
-
   DataBufferSP dsym_file_data_sp;
   lldb::offset_t dsym_file_data_offset = 0;
   dsym_objfile_sp =
@@ -160,132 +154,136 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP 
_sp,
   if (UUIDsMatch(module_sp.get(), dsym_objfile_sp.get(), feedback_strm)) {
 // We need a XML parser if we hope to parse a plist...
 if (XMLDocument::XMLEnabled()) {
-  if (module_sp->GetSourceMappingList().IsEmpty()) {
+  char dsym_path[PATH_MAX];
+  if (module_sp->GetSourceMappingList().IsEmpty() &&
+  dsym_fspec.GetPath(dsym_path, sizeof(dsym_path))) {
 lldb_private::UUID dsym_uuid = dsym_objfile_sp->GetUUID();
 if (dsym_uuid) {
   std::string uuid_str = dsym_uuid.GetAsString();
-  if (!uuid_str.empty() && !dsym_root.empty()) {
-char dsym_uuid_plist_path[PATH_MAX];
-snprintf(dsym_uuid_plist_path, sizeof(dsym_uuid_plist_path),
- "%s/Contents/Resources/%s.plist", dsym_root.c_str(),
- uuid_str.c_str());
-FileSpec dsym_uuid_plist_spec(dsym_uuid_plist_path);
-if (FileSystem::Instance().Exists(dsym_uuid_plist_spec)) {
-  ApplePropertyList plist(dsym_uuid_plist_path);
-  if (plist) {
-std::string DBGBuildSourcePath;
-std::string DBGSourcePath;
-
-// DBGSourcePathRemapping is a dictionary in the plist
-// with keys which are DBGBuildSourcePath file paths and
-// values which are DBGSourcePath file paths
-
-StructuredData::ObjectSP plist_sp =
-plist.GetStructuredData();
-if (plist_sp.get() && plist_sp->GetAsDictionary() &&
-plist_sp->GetAsDictionary()->HasKey(
-"DBGSourcePathRemapping") &&
-plist_sp->GetAsDictionary()
-->GetValueForKey("DBGSourcePathRemapping")
-->GetAsDictionary()) {
-
-  // If DBGVersion 1 or DBGVersion missing, ignore
-  // DBGSourcePathRemapping. If DBGVersion 2, strip last 
two
-  // components of path remappings from
-  //  entries to fix an issue with a
-  //  specific set of 
DBGSourcePathRemapping
-  //  entries that lldb worked with.
-  // If DBGVersion 3, trust & use the source path 
remappings
-  // as-is.
-  //
-
- 

[Lldb-commits] [lldb] 075b610 - Recommit "[lldb] Make TestExprDiagnostics.py pass again after enabling Fix-Its in test"

2020-03-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-30T14:24:06-07:00
New Revision: 075b610403a7d151ee9056aa490233bcd4248718

URL: 
https://github.com/llvm/llvm-project/commit/075b610403a7d151ee9056aa490233bcd4248718
DIFF: 
https://github.com/llvm/llvm-project/commit/075b610403a7d151ee9056aa490233bcd4248718.diff

LOG: Recommit "[lldb] Make TestExprDiagnostics.py pass again after enabling 
Fix-Its in test"

This reverts commit 55ed09d32e2602eba1dbb8aba1985246739c3909 as
it was not responsible for breaking the bots. Sorry.

Added: 


Modified: 
lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py 
b/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
index da29d7b2c1af..b5eb552badb5 100644
--- a/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
+++ b/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
@@ -60,10 +60,10 @@ def test_source_and_caret_printing(self):
 self.assertIn(":1:10", 
value.GetError().GetCString())
 
 # Multiline top-level expressions.
-value = frame.EvaluateExpression("void x() {}\nvoid foo(unknown_type 
x) {}", top_level_opts)
+value = frame.EvaluateExpression("void x() {}\nvoid foo;", 
top_level_opts)
 self.assertFalse(value.GetError().Success())
-self.assertIn("\nvoid foo(unknown_type x) {}\n ^\n", 
value.GetError().GetCString())
-self.assertIn(":2:10", 
value.GetError().GetCString())
+self.assertIn("\nvoid foo;\n ^", value.GetError().GetCString())
+self.assertIn(":2:6", value.GetError().GetCString())
 
 # Test that we render Clang's 'notes' correctly.
 value = frame.EvaluateExpression("struct SFoo{}; struct SFoo { int x; 
};", top_level_opts)



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


[Lldb-commits] [lldb] 06bb7df - Recommit "[lldb] Make Fix-Its also apply to top-level expressions""

2020-03-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-30T14:24:06-07:00
New Revision: 06bb7df81c0ba01f7efab76779e2eb7d76615e3d

URL: 
https://github.com/llvm/llvm-project/commit/06bb7df81c0ba01f7efab76779e2eb7d76615e3d
DIFF: 
https://github.com/llvm/llvm-project/commit/06bb7df81c0ba01f7efab76779e2eb7d76615e3d.diff

LOG: Recommit "[lldb] Make Fix-Its also apply to top-level expressions""

This reverts commit fe5cb1c25fd6c07bbe3c0c698f36b74e6d04946f as it
 was not responsible for breaking the bots. Sorry.

Added: 


Modified: 
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
lldb/test/API/commands/expression/fixits/TestFixIts.py

Removed: 




diff  --git 
a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp 
b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
index b246fc374d1c..2b75c4f75c63 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -616,15 +616,14 @@ bool ClangUserExpression::Parse(DiagnosticManager 
_manager,
   if (parser.RewriteExpression(diagnostic_manager)) {
 size_t fixed_start;
 size_t fixed_end;
-const std::string _expression =
-diagnostic_manager.GetFixedExpression();
+m_fixed_text = diagnostic_manager.GetFixedExpression();
 // Retrieve the original expression in case we don't have a top level
 // expression (which has no surrounding source code).
 if (m_source_code &&
-m_source_code->GetOriginalBodyBounds(fixed_expression, m_expr_lang,
+m_source_code->GetOriginalBodyBounds(m_fixed_text, m_expr_lang,
  fixed_start, fixed_end))
   m_fixed_text =
-  fixed_expression.substr(fixed_start, fixed_end - fixed_start);
+  m_fixed_text.substr(fixed_start, fixed_end - fixed_start);
   }
 }
 return false;

diff  --git a/lldb/test/API/commands/expression/fixits/TestFixIts.py 
b/lldb/test/API/commands/expression/fixits/TestFixIts.py
index 273982c0c12f..eb1dd97aa9a9 100644
--- a/lldb/test/API/commands/expression/fixits/TestFixIts.py
+++ b/lldb/test/API/commands/expression/fixits/TestFixIts.py
@@ -33,6 +33,10 @@ def test_with_target(self):
 options = lldb.SBExpressionOptions()
 options.SetAutoApplyFixIts(True)
 
+top_level_options = lldb.SBExpressionOptions()
+top_level_options.SetAutoApplyFixIts(True)
+top_level_options.SetTopLevel(True)
+
 frame = self.thread.GetFrameAtIndex(0)
 
 # Try with one error:
@@ -41,6 +45,15 @@ def test_with_target(self):
 self.assertTrue(value.GetError().Success())
 self.assertEquals(value.GetValueAsUnsigned(), 10)
 
+# Try with one error in a top-level expression.
+# The Fix-It changes "ptr.m" to "ptr->m".
+expr = "struct X { int m; }; X x; X *ptr =  int m = ptr.m;"
+value = frame.EvaluateExpression(expr, top_level_options)
+# A successfully parsed top-level expression will yield an error
+# that there is 'no value'. If a parsing error would have happened we
+# would get a 
diff erent error kind, so let's check the error kind here.
+self.assertEquals(value.GetError().GetCString(), "error: No value")
+
 # Try with two errors:
 two_error_expression = "my_pointer.second->a"
 value = frame.EvaluateExpression(two_error_expression, options)



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


[Lldb-commits] [lldb] 50f7153 - Revert "[lldb][NFC] Refactor Fix-It filter for warnings"

2020-03-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-30T14:12:11-07:00
New Revision: 50f7153ddb6e6dabcac6d16c8c908f1708f60d01

URL: 
https://github.com/llvm/llvm-project/commit/50f7153ddb6e6dabcac6d16c8c908f1708f60d01
DIFF: 
https://github.com/llvm/llvm-project/commit/50f7153ddb6e6dabcac6d16c8c908f1708f60d01.diff

LOG: Revert "[lldb][NFC] Refactor Fix-It filter for warnings"

This reverts commit 11a5caee2aeae2546213366e7fc54095bb8163b9 as
it broke the bots.

Added: 


Modified: 
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp 
b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index b3880ce03b08..e5de4b4651df 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -214,12 +214,16 @@ class ClangDiagnosticManagerAdapter : public 
clang::DiagnosticConsumer {
   auto new_diagnostic = std::make_unique(
   stripped_output, severity, Info.getID());
 
+  // Don't store away warning fixits, since the compiler doesn't have
+  // enough context in an expression for the warning to be useful.
   // FIXME: Should we try to filter out FixIts that apply to our generated
   // code, and not the user's expression?
-  for (const clang::FixItHint  : Info.getFixItHints()) {
-if (fixit.isNull())
-  continue;
-new_diagnostic->AddFixitHint(fixit);
+  if (severity == eDiagnosticSeverityError) {
+for (const clang::FixItHint  : Info.getFixItHints()) {
+  if (fixit.isNull())
+continue;
+  new_diagnostic->AddFixitHint(fixit);
+}
   }
 
   m_manager->AddDiagnostic(std::move(new_diagnostic));
@@ -1123,10 +1127,6 @@ bool ClangExpressionParser::RewriteExpression(
   continue;
 if (!diagnostic->HasFixIts())
   continue;
-// Don't apply warning Fix-Its, since the compiler doesn't have enough
-// context in an expression for the warning to be useful.
-if (diagnostic->GetSeverity() != eDiagnosticSeverityError)
-  continue;
 for (const FixItHint  : diagnostic->FixIts())
   ApplyFixIt(fixit, commit);
   }



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


[Lldb-commits] [lldb] 55ed09d - Revert "[lldb] Make TestExprDiagnostics.py pass again after enabling Fix-Its in test"

2020-03-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-30T13:58:18-07:00
New Revision: 55ed09d32e2602eba1dbb8aba1985246739c3909

URL: 
https://github.com/llvm/llvm-project/commit/55ed09d32e2602eba1dbb8aba1985246739c3909
DIFF: 
https://github.com/llvm/llvm-project/commit/55ed09d32e2602eba1dbb8aba1985246739c3909.diff

LOG: Revert "[lldb] Make TestExprDiagnostics.py pass again after enabling 
Fix-Its in test"

This reverts commit 502a06fcdafa637a9890da16c2734bc1a36010f6 as it
breaks the macOS bots. Raph will take a look and re-commit.

Added: 


Modified: 
lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py 
b/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
index b5eb552badb5..da29d7b2c1af 100644
--- a/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
+++ b/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
@@ -60,10 +60,10 @@ def test_source_and_caret_printing(self):
 self.assertIn(":1:10", 
value.GetError().GetCString())
 
 # Multiline top-level expressions.
-value = frame.EvaluateExpression("void x() {}\nvoid foo;", 
top_level_opts)
+value = frame.EvaluateExpression("void x() {}\nvoid foo(unknown_type 
x) {}", top_level_opts)
 self.assertFalse(value.GetError().Success())
-self.assertIn("\nvoid foo;\n ^", value.GetError().GetCString())
-self.assertIn(":2:6", value.GetError().GetCString())
+self.assertIn("\nvoid foo(unknown_type x) {}\n ^\n", 
value.GetError().GetCString())
+self.assertIn(":2:10", 
value.GetError().GetCString())
 
 # Test that we render Clang's 'notes' correctly.
 value = frame.EvaluateExpression("struct SFoo{}; struct SFoo { int x; 
};", top_level_opts)



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


[Lldb-commits] [lldb] 10f633d - [TypeSystemClang] Add missing case in a switch. NFC'ish.

2020-03-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-30T13:53:53-07:00
New Revision: 10f633db86b523da17a820098e33f0caf70dbada

URL: 
https://github.com/llvm/llvm-project/commit/10f633db86b523da17a820098e33f0caf70dbada
DIFF: 
https://github.com/llvm/llvm-project/commit/10f633db86b523da17a820098e33f0caf70dbada.diff

LOG: [TypeSystemClang] Add missing case in a switch. NFC'ish.

Added: 


Modified: 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index c278aef8949e..a94e5a15fa68 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -4661,6 +4661,7 @@ lldb::Encoding 
TypeSystemClang::GetEncoding(lldb::opaque_compiler_type_t type,
 case clang::BuiltinType::Kind::OCLReserveID:
 case clang::BuiltinType::Kind::OCLSampler:
 case clang::BuiltinType::Kind::OMPArraySection:
+case clang::BuiltinType::Kind::OMPArrayShaping:
 case clang::BuiltinType::Kind::Overload:
 case clang::BuiltinType::Kind::PseudoObject:
 case clang::BuiltinType::Kind::UnknownAny:



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


[Lldb-commits] [lldb] fe5cb1c - Revert "[lldb] Make Fix-Its also apply to top-level expressions"

2020-03-30 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-30T13:23:58-07:00
New Revision: fe5cb1c25fd6c07bbe3c0c698f36b74e6d04946f

URL: 
https://github.com/llvm/llvm-project/commit/fe5cb1c25fd6c07bbe3c0c698f36b74e6d04946f
DIFF: 
https://github.com/llvm/llvm-project/commit/fe5cb1c25fd6c07bbe3c0c698f36b74e6d04946f.diff

LOG: Revert "[lldb] Make Fix-Its also apply to top-level expressions"

This reverts commit 83c81c0a469482888482983c302c09c02680ae7c as
it broke the macOS lldb bots.

Added: 


Modified: 
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
lldb/test/API/commands/expression/fixits/TestFixIts.py

Removed: 




diff  --git 
a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp 
b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
index 2b75c4f75c63..b246fc374d1c 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -616,14 +616,15 @@ bool ClangUserExpression::Parse(DiagnosticManager 
_manager,
   if (parser.RewriteExpression(diagnostic_manager)) {
 size_t fixed_start;
 size_t fixed_end;
-m_fixed_text = diagnostic_manager.GetFixedExpression();
+const std::string _expression =
+diagnostic_manager.GetFixedExpression();
 // Retrieve the original expression in case we don't have a top level
 // expression (which has no surrounding source code).
 if (m_source_code &&
-m_source_code->GetOriginalBodyBounds(m_fixed_text, m_expr_lang,
+m_source_code->GetOriginalBodyBounds(fixed_expression, m_expr_lang,
  fixed_start, fixed_end))
   m_fixed_text =
-  m_fixed_text.substr(fixed_start, fixed_end - fixed_start);
+  fixed_expression.substr(fixed_start, fixed_end - fixed_start);
   }
 }
 return false;

diff  --git a/lldb/test/API/commands/expression/fixits/TestFixIts.py 
b/lldb/test/API/commands/expression/fixits/TestFixIts.py
index eb1dd97aa9a9..273982c0c12f 100644
--- a/lldb/test/API/commands/expression/fixits/TestFixIts.py
+++ b/lldb/test/API/commands/expression/fixits/TestFixIts.py
@@ -33,10 +33,6 @@ def test_with_target(self):
 options = lldb.SBExpressionOptions()
 options.SetAutoApplyFixIts(True)
 
-top_level_options = lldb.SBExpressionOptions()
-top_level_options.SetAutoApplyFixIts(True)
-top_level_options.SetTopLevel(True)
-
 frame = self.thread.GetFrameAtIndex(0)
 
 # Try with one error:
@@ -45,15 +41,6 @@ def test_with_target(self):
 self.assertTrue(value.GetError().Success())
 self.assertEquals(value.GetValueAsUnsigned(), 10)
 
-# Try with one error in a top-level expression.
-# The Fix-It changes "ptr.m" to "ptr->m".
-expr = "struct X { int m; }; X x; X *ptr =  int m = ptr.m;"
-value = frame.EvaluateExpression(expr, top_level_options)
-# A successfully parsed top-level expression will yield an error
-# that there is 'no value'. If a parsing error would have happened we
-# would get a 
diff erent error kind, so let's check the error kind here.
-self.assertEquals(value.GetError().GetCString(), "error: No value")
-
 # Try with two errors:
 two_error_expression = "my_pointer.second->a"
 value = frame.EvaluateExpression(two_error_expression, options)



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


[Lldb-commits] [lldb] 3e11d84 - [Darwin] Add another hint to find the kernel. NFC.

2020-03-24 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-24T13:04:36-07:00
New Revision: 3e11d84d9f77736af22f52753593c8214d76875a

URL: 
https://github.com/llvm/llvm-project/commit/3e11d84d9f77736af22f52753593c8214d76875a
DIFF: 
https://github.com/llvm/llvm-project/commit/3e11d84d9f77736af22f52753593c8214d76875a.diff

LOG: [Darwin] Add another hint to find the kernel. NFC.

Added: 


Modified: 

lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp 
b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 193b3bd829c5..68a0335682d3 100644
--- 
a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ 
b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -245,6 +245,7 @@ 
DynamicLoaderDarwinKernel::SearchForKernelWithDebugHints(Process *process) {
 
   Status read_err;
   addr_t kernel_addresses_64[] = {
+  0xfff02010ULL,
   0xfff04010ULL, // newest arm64 devices
   0xff804010ULL, // 2014-2015-ish arm64 devices
   0xff802010ULL, // oldest arm64 devices



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


[Lldb-commits] [lldb] 696ae6f - [StopHook] Use wildcard matching. Pointed out by Jim Ingham.

2020-03-20 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-20T13:57:40-07:00
New Revision: 696ae6f7d8e170c82d5f2978fc99cc061f52b4ef

URL: 
https://github.com/llvm/llvm-project/commit/696ae6f7d8e170c82d5f2978fc99cc061f52b4ef
DIFF: 
https://github.com/llvm/llvm-project/commit/696ae6f7d8e170c82d5f2978fc99cc061f52b4ef.diff

LOG: [StopHook] Use wildcard matching. Pointed out by Jim Ingham.

Added: 


Modified: 
lldb/test/Shell/ExecControl/StopHook/stop-hook.test

Removed: 




diff  --git a/lldb/test/Shell/ExecControl/StopHook/stop-hook.test 
b/lldb/test/Shell/ExecControl/StopHook/stop-hook.test
index 7e5b37b63854..98a77cac99ba 100644
--- a/lldb/test/Shell/ExecControl/StopHook/stop-hook.test
+++ b/lldb/test/Shell/ExecControl/StopHook/stop-hook.test
@@ -46,12 +46,12 @@ target stop-hook list
 run
 # Stopping inside of the stop hook range
 # CHECK: (lldb) run
-# CHECK-NEXT: (void *) $0 = 0x
+# CHECK-NEXT: (void *) ${{.*}} = 0x
 
 thread step-over
 # Stepping inside of the stop hook range
 # CHECK: (lldb) thread step-over
-# CHECK-NEXT: (void *) $2 = 0x
+# CHECK-NEXT: (void *) ${{.*}} = 0x
 # CHECK: ->{{.*}} // We should stop here after stepping.
 
 process continue



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


[Lldb-commits] [lldb] 6385c2a - [AppleObjCRuntimeV2] Force lazily allocated class names to be resolved.

2020-03-20 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-20T13:43:08-07:00
New Revision: 6385c2ab8ff8304eafa822012c40934690bde124

URL: 
https://github.com/llvm/llvm-project/commit/6385c2ab8ff8304eafa822012c40934690bde124
DIFF: 
https://github.com/llvm/llvm-project/commit/6385c2ab8ff8304eafa822012c40934690bde124.diff

LOG: [AppleObjCRuntimeV2] Force lazily allocated class names to be resolved.

Fixes a couple of tests on new versions of the Obj-C runtime.

Added: 


Modified: 

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/test/Shell/ExecControl/StopHook/stop-hook.test

Removed: 




diff  --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 9fea9a217dce..4a07c792eebb 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1175,6 +1175,28 @@ AppleObjCRuntimeV2::GetClassDescriptorFromISA(ObjCISA 
isa) {
   return class_descriptor_sp;
 }
 
+static std::pair ObjCGetClassNameRaw(
+  AppleObjCRuntime::ObjCISA isa,
+  Process *process) {
+  StreamString expr_string;
+  std::string input = std::to_string(isa);
+  expr_string.Printf("(const char *)objc_debug_class_getNameRaw(%s)",
+ input.c_str());
+
+  ValueObjectSP result_sp;
+  EvaluateExpressionOptions eval_options;
+  eval_options.SetLanguage(lldb::eLanguageTypeObjC);
+  eval_options.SetResultIsInternal(true);
+  eval_options.SetGenerateDebugInfo(true);
+  eval_options.SetTimeout(process->GetUtilityExpressionTimeout());
+  auto eval_result = process->GetTarget().EvaluateExpression(
+  expr_string.GetData(),
+  process->GetThreadList().GetSelectedThread()->GetSelectedFrame().get(),
+  result_sp, eval_options);
+  ConstString type_name(result_sp->GetSummaryAsCString());
+  return std::make_pair(eval_result == eExpressionCompleted, type_name);
+}
+
 ObjCLanguageRuntime::ClassDescriptorSP
 AppleObjCRuntimeV2::GetClassDescriptor(ValueObject ) {
   ClassDescriptorSP objc_class_sp;
@@ -1210,7 +1232,10 @@ AppleObjCRuntimeV2::GetClassDescriptor(ValueObject 
) {
 return objc_class_sp;
 
   objc_class_sp = GetClassDescriptorFromISA(isa);
-  if (isa && !objc_class_sp) {
+
+  if (objc_class_sp)
+return objc_class_sp;
+  else {
 Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS |
   LIBLLDB_LOG_TYPES));
 LLDB_LOGF(log,
@@ -1219,6 +1244,13 @@ AppleObjCRuntimeV2::GetClassDescriptor(ValueObject 
) {
   "not in class descriptor cache 0x%" PRIx64,
   isa_pointer, isa);
   }
+
+  ClassDescriptorSP descriptor_sp(new ClassDescriptorV2(*this, isa, nullptr));
+  auto resolved = ObjCGetClassNameRaw(isa, process);
+  if (resolved.first == true) {
+AddClass(isa, descriptor_sp, resolved.second.AsCString());
+objc_class_sp = descriptor_sp;
+  }
   return objc_class_sp;
 }
 

diff  --git a/lldb/test/Shell/ExecControl/StopHook/stop-hook.test 
b/lldb/test/Shell/ExecControl/StopHook/stop-hook.test
index a06de6634ea1..7e5b37b63854 100644
--- a/lldb/test/Shell/ExecControl/StopHook/stop-hook.test
+++ b/lldb/test/Shell/ExecControl/StopHook/stop-hook.test
@@ -51,7 +51,7 @@ run
 thread step-over
 # Stepping inside of the stop hook range
 # CHECK: (lldb) thread step-over
-# CHECK-NEXT: (void *) $1 = 0x
+# CHECK-NEXT: (void *) $2 = 0x
 # CHECK: ->{{.*}} // We should stop here after stepping.
 
 process continue



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


[Lldb-commits] [lldb] f0ca0a2 - [AppleObjCRuntimeV2] Rewrite GetClassDescriptor, reducing indentation.

2020-03-18 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-18T19:23:58-07:00
New Revision: f0ca0a25388066bd3605fe8ffc180e640d13c5a2

URL: 
https://github.com/llvm/llvm-project/commit/f0ca0a25388066bd3605fe8ffc180e640d13c5a2
DIFF: 
https://github.com/llvm/llvm-project/commit/f0ca0a25388066bd3605fe8ffc180e640d13c5a2.diff

LOG: [AppleObjCRuntimeV2] Rewrite GetClassDescriptor, reducing indentation.

I'm going to modify this function to account for lazily allocated
class names in the Obj-C runtime, but first I need to understand
what it does.

Added: 


Modified: 

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

Removed: 




diff  --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 9b3dbb166b68..9fea9a217dce 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1191,33 +1191,33 @@ AppleObjCRuntimeV2::GetClassDescriptor(ValueObject 
) {
   // if we get an invalid VO (which might still happen when playing around with
   // pointers returned by the expression parser, don't consider this a valid
   // ObjC object)
-  if (valobj.GetCompilerType().IsValid()) {
-addr_t isa_pointer = valobj.GetPointerValue();
+  if (!valobj.GetCompilerType().IsValid())
+return objc_class_sp;
+  addr_t isa_pointer = valobj.GetPointerValue();
 
-// tagged pointer
-if (IsTaggedPointer(isa_pointer)) {
-  return m_tagged_pointer_vendor_up->GetClassDescriptor(isa_pointer);
-} else {
-  ExecutionContext exe_ctx(valobj.GetExecutionContextRef());
+  // tagged pointer
+  if (IsTaggedPointer(isa_pointer))
+return m_tagged_pointer_vendor_up->GetClassDescriptor(isa_pointer);
+  ExecutionContext exe_ctx(valobj.GetExecutionContextRef());
 
-  Process *process = exe_ctx.GetProcessPtr();
-  if (process) {
-Status error;
-ObjCISA isa = process->ReadPointerFromMemory(isa_pointer, error);
-if (isa != LLDB_INVALID_ADDRESS) {
-  objc_class_sp = GetClassDescriptorFromISA(isa);
-  if (isa && !objc_class_sp) {
-Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS |
-  LIBLLDB_LOG_TYPES));
-LLDB_LOGF(log,
-  "0x%" PRIx64
-  ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was "
-  "not in class descriptor cache 0x%" PRIx64,
-  isa_pointer, isa);
-  }
-}
-  }
-}
+  Process *process = exe_ctx.GetProcessPtr();
+  if (!process)
+return objc_class_sp;
+
+  Status error;
+  ObjCISA isa = process->ReadPointerFromMemory(isa_pointer, error);
+  if (isa == LLDB_INVALID_ADDRESS)
+return objc_class_sp;
+
+  objc_class_sp = GetClassDescriptorFromISA(isa);
+  if (isa && !objc_class_sp) {
+Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS |
+  LIBLLDB_LOG_TYPES));
+LLDB_LOGF(log,
+  "0x%" PRIx64
+  ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was "
+  "not in class descriptor cache 0x%" PRIx64,
+  isa_pointer, isa);
   }
   return objc_class_sp;
 }



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


[Lldb-commits] [lldb] 85bd436 - [Host] Remove some code that's not needed anymore.

2020-03-18 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-18T14:44:53-07:00
New Revision: 85bd4369610fe60397455c8e0914a09288285e84

URL: 
https://github.com/llvm/llvm-project/commit/85bd4369610fe60397455c8e0914a09288285e84
DIFF: 
https://github.com/llvm/llvm-project/commit/85bd4369610fe60397455c8e0914a09288285e84.diff

LOG: [Host] Remove some code that's not needed anymore.

Discussed offline with Jason.

Added: 


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

Removed: 




diff  --git a/lldb/source/Host/macosx/objcxx/Host.mm 
b/lldb/source/Host/macosx/objcxx/Host.mm
index 2475338a37fd..eba3060f8ec6 100644
--- a/lldb/source/Host/macosx/objcxx/Host.mm
+++ b/lldb/source/Host/macosx/objcxx/Host.mm
@@ -1088,43 +1088,6 @@ static Status LaunchProcessPosixSpawn(const char 
*exe_path,
 return error;
   }
 
-// posix_spawnattr_setbinpref_np appears to be an Apple extension per:
-// http://www.unix.com/man-page/OSX/3/posix_spawnattr_setbinpref_np/
-#if !defined(__arm__)
-
-  // Don't set the binpref if a shell was provided.  After all, that's only
-  // going to affect what version of the shell
-  // is launched, not what fork of the binary is launched.  We insert "arch
-  // --arch  as part of the shell invocation
-  // to do that job on OSX.
-
-  if (launch_info.GetShell() == FileSpec()) {
-// We don't need to do this for ARM, and we really shouldn't now that we
-// have multiple CPU subtypes and no posix_spawnattr call that allows us
-// to set which CPU subtype to launch...
-const ArchSpec _spec = launch_info.GetArchitecture();
-cpu_type_t cpu = arch_spec.GetMachOCPUType();
-cpu_type_t sub = arch_spec.GetMachOCPUSubType();
-if (cpu != 0 && cpu != static_cast(UINT32_MAX) &&
-cpu != static_cast(LLDB_INVALID_CPUTYPE) &&
-!(cpu == 0x0107 && sub == 8)) // If haswell is specified, don't try
-  // to set the CPU type or we will 
fail
-{
-  size_t ocount = 0;
-  error.SetError(::posix_spawnattr_setbinpref_np(, 1, , ),
- eErrorTypePOSIX);
-  if (error.Fail())
-LLDB_LOG(log,
- "error: {0}, ::posix_spawnattr_setbinpref_np ( , 1, "
- "cpu_type = {1:x}, count => {2} )",
- error, cpu, ocount);
-
-  if (error.Fail() || ocount != 1)
-return error;
-}
-  }
-#endif // !defined(__arm__)
-
   const char *tmp_argv[2];
   char *const *argv = const_cast(
   launch_info.GetArguments().GetConstArgumentVector());



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


[Lldb-commits] [lldb] 9d389f7 - [AppleObjCRuntimeV2] Fix a typo. Evalulate -> evaluate.

2020-03-09 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-09T15:40:09-07:00
New Revision: 9d389f78589d71adf822c97c329baa62da70b34c

URL: 
https://github.com/llvm/llvm-project/commit/9d389f78589d71adf822c97c329baa62da70b34c
DIFF: 
https://github.com/llvm/llvm-project/commit/9d389f78589d71adf822c97c329baa62da70b34c.diff

LOG: [AppleObjCRuntimeV2] Fix a typo. Evalulate -> evaluate.

Added: 


Modified: 

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

Removed: 




diff  --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index cf0a914c26d4..cb1d808d0f1e 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -2471,7 +2471,7 @@ bool 
AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(
 ObjCISA isa, ObjCISA _isa) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES));
 
-  LLDB_LOGF(log, "AOCRT::NPI Evalulate(isa = 0x%" PRIx64 ")", (uint64_t)isa);
+  LLDB_LOGF(log, "AOCRT::NPI Evaluate(isa = 0x%" PRIx64 ")", (uint64_t)isa);
 
   if ((isa & ~m_objc_debug_isa_class_mask) == 0)
 return false;
@@ -2552,7 +2552,7 @@ bool 
AppleObjCRuntimeV2::NonPointerISACache::EvaluateNonPointerISA(
   if (index > m_indexed_isa_cache.size())
 return false;
 
-  LLDB_LOGF(log, "AOCRT::NPI Evalulate(ret_isa = 0x%" PRIx64 ")",
+  LLDB_LOGF(log, "AOCRT::NPI Evaluate(ret_isa = 0x%" PRIx64 ")",
 (uint64_t)m_indexed_isa_cache[index]);
 
   ret_isa = m_indexed_isa_cache[index];



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


[Lldb-commits] [lldb] a3c4e6b - [AppleObjC2RuntimeV2] Remove dead code. NFC.

2020-03-09 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-09T15:37:12-07:00
New Revision: a3c4e6b44a18ffafec022d6ab76dc4f58c4ef129

URL: 
https://github.com/llvm/llvm-project/commit/a3c4e6b44a18ffafec022d6ab76dc4f58c4ef129
DIFF: 
https://github.com/llvm/llvm-project/commit/a3c4e6b44a18ffafec022d6ab76dc4f58c4ef129.diff

LOG: [AppleObjC2RuntimeV2] Remove dead code. NFC.

Added: 


Modified: 

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

Removed: 




diff  --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index dc3753eb44b7..cf0a914c26d4 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1434,8 +1434,6 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(
 
 Value return_value;
 return_value.SetValueType(Value::eValueTypeScalar);
-// return_value.SetContext (Value::eContextTypeClangType,
-// clang_uint32_t_type);
 return_value.SetCompilerType(clang_uint32_t_type);
 return_value.GetScalar() = 0;
 
@@ -1660,13 +1658,11 @@ 
AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache() {
 // Next make the function caller for our implementation utility function.
 Value value;
 value.SetValueType(Value::eValueTypeScalar);
-// value.SetContext (Value::eContextTypeClangType, 
clang_void_pointer_type);
 value.SetCompilerType(clang_void_pointer_type);
 arguments.PushValue(value);
 arguments.PushValue(value);
 
 value.SetValueType(Value::eValueTypeScalar);
-// value.SetContext (Value::eContextTypeClangType, clang_uint32_t_type);
 value.SetCompilerType(clang_uint32_t_type);
 arguments.PushValue(value);
 arguments.PushValue(value);
@@ -1732,8 +1728,6 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache() 
{
 
 Value return_value;
 return_value.SetValueType(Value::eValueTypeScalar);
-// return_value.SetContext (Value::eContextTypeClangType,
-// clang_uint32_t_type);
 return_value.SetCompilerType(clang_uint32_t_type);
 return_value.GetScalar() = 0;
 



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


[Lldb-commits] [lldb] 3cabd17 - [ObjC] Dynamic type resolution logging should go to the types log.

2020-03-09 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-09T15:35:51-07:00
New Revision: 3cabd173a1e34febbf0351599b760a5516e64ec4

URL: 
https://github.com/llvm/llvm-project/commit/3cabd173a1e34febbf0351599b760a5516e64ec4
DIFF: 
https://github.com/llvm/llvm-project/commit/3cabd173a1e34febbf0351599b760a5516e64ec4.diff

LOG: [ObjC] Dynamic type resolution logging should go to the types log.

Added: 


Modified: 

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

Removed: 




diff  --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 6b1cc56fc2b0..dc3753eb44b7 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1207,7 +1207,8 @@ AppleObjCRuntimeV2::GetClassDescriptor(ValueObject 
) {
 if (isa != LLDB_INVALID_ADDRESS) {
   objc_class_sp = GetClassDescriptorFromISA(isa);
   if (isa && !objc_class_sp) {
-Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS |
+  LIBLLDB_LOG_TYPES));
 LLDB_LOGF(log,
   "0x%" PRIx64
   ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was "



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


Re: [Lldb-commits] [lldb] b6b3fcd - [lldb] Don't iterate over a std::set in SymbolFileDWARF::GetTypes to make it deterministic

2020-03-02 Thread Davide Italiano via lldb-commits


> On Mar 2, 2020, at 15:44, Raphael “Teemperor” Isemann  
> wrote:
> 
> I was just grepping for unordered data structures (e.g. ’std::set<‘) that use 
> pointers/pointer-like objects (e.g. CompilerType with its operator<) and then 
> reading the related code. Not sure if there is a good way to detect this 
> stuff automatically. I guess we could have had a Clang plugin that creates a 
> warning when code iterates over an unordered data structure that has a 
> pointer-like type as a key (probably would cause a bunch of false-positives 
> but if someone ran this on his own machine from time to time that would be 
> enough I think).


I don’t think there’s a great way to detect this automatically, but I’m happy 
to hear because I was bitten by the problem several times.
I guess my question was more motivated by the curiosity than anything else. 
Good work.

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


Re: [Lldb-commits] [lldb] b6b3fcd - [lldb] Don't iterate over a std::set in SymbolFileDWARF::GetTypes to make it deterministic

2020-03-02 Thread Davide Italiano via lldb-commits
This is really good. How did you find it, Raphael?
I generally use LLVM_REVERSE_ITERATOR but given this wasn’t a container in 
llvm, I’m curious to hear.

—
Davide

> On Mar 2, 2020, at 15:04, Raphael Isemann via lldb-commits 
>  wrote:
> 
> 
> Author: Raphael Isemann
> Date: 2020-03-02T15:03:45-08:00
> New Revision: b6b3fcdcb8cdfb887e26d27bee03b997d2d65888
> 
> URL: 
> https://github.com/llvm/llvm-project/commit/b6b3fcdcb8cdfb887e26d27bee03b997d2d65888
> DIFF: 
> https://github.com/llvm/llvm-project/commit/b6b3fcdcb8cdfb887e26d27bee03b997d2d65888.diff
> 
> LOG: [lldb] Don't iterate over a std::set in SymbolFileDWARF::GetTypes 
> to make it deterministic
> 
> Summary:
> Currently `SymbolFileDWARF::TypeSet` is a typedef to a `std::set`.
> In `SymbolFileDWARF::GetTypes` we iterate over a TypeSet variable when finding
> types so that logic is non-deterministic as it depends on the actual pointer 
> address values.
> 
> This patch changes the `TypeSet` to a `llvm::UniqueVector` which always 
> iterates in
> the order in which we inserted the types into the list.
> 
> Reviewers: JDevlieghere, aprantl
> 
> Reviewed By: JDevlieghere
> 
> Subscribers: mgrang, abidh, lldb-commits
> 
> Tags: #lldb
> 
> Differential Revision: https://reviews.llvm.org/D75481
> 
> Added: 
> 
> 
> Modified: 
>lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
>lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
> 
> Removed: 
> 
> 
> 
> 
> diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp 
> b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
> index c89ccb5bf960..c27b5c4c3495 100644
> --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
> +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
> @@ -324,10 +324,8 @@ void SymbolFileDWARF::GetTypes(const DWARFDIE , 
> dw_offset_t min_die_offset,
>   if (add_type) {
> const bool assert_not_being_parsed = true;
> Type *type = ResolveTypeUID(die, assert_not_being_parsed);
> -if (type) {
> -  if (type_set.find(type) == type_set.end())
> -type_set.insert(type);
> -}
> +if (type)
> +  type_set.insert(type);
>   }
> }
> 
> 
> diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h 
> b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
> index a3928c8c3dd4..479235c0d86f 100644
> --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
> +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
> @@ -12,11 +12,11 @@
> #include 
> #include 
> #include 
> -#include 
> #include 
> #include 
> 
> #include "llvm/ADT/DenseMap.h"
> +#include "llvm/ADT/SetVector.h"
> #include "llvm/Support/Threading.h"
> 
> #include "lldb/Core/UniqueCStringMap.h"
> @@ -439,7 +439,7 @@ class SymbolFileDWARF : public lldb_private::SymbolFile,
> 
>   bool FixupAddress(lldb_private::Address );
> 
> -  typedef std::set TypeSet;
> +  typedef llvm::SetVector TypeSet;
> 
>   void GetTypes(const DWARFDIE , dw_offset_t min_die_offset,
> dw_offset_t max_die_offset, uint32_t type_mask,
> 
> 
> 
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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


Re: [Lldb-commits] [lldb] c77fc00 - [lldb/Docs] Remove the version from the home page

2020-03-02 Thread Davide Italiano via lldb-commits


> On Mar 2, 2020, at 14:48, Jonas Devlieghere  wrote:
> 
> If you feel strongly about this and want to change it to zero, be my guest. 
> :-) 
> 
> I personally don't see any value in an additional comment. 

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


[Lldb-commits] [lldb] eddf59a - [docs] Use 0 as version placeholder instead of a made up number.

2020-03-02 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-03-02T14:55:05-08:00
New Revision: eddf59ae71a19b3fe872760833365dffc46a3b2e

URL: 
https://github.com/llvm/llvm-project/commit/eddf59ae71a19b3fe872760833365dffc46a3b2e
DIFF: 
https://github.com/llvm/llvm-project/commit/eddf59ae71a19b3fe872760833365dffc46a3b2e.diff

LOG: [docs] Use 0 as version placeholder instead of a made up number.

While here, explain that this is not really used. Probably NFC.

Added: 


Modified: 
lldb/docs/conf.py

Removed: 




diff  --git a/lldb/docs/conf.py b/lldb/docs/conf.py
index d48d608aa276..ca1d6f790921 100644
--- a/lldb/docs/conf.py
+++ b/lldb/docs/conf.py
@@ -46,12 +46,14 @@
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
-# built documents.
+# built documents. These are currently set to zero because we don't use them.
+# Should somebody consider in the future to change them, they need to be 
updated
+# everytime a new release comes out.
 #
 # The short version.
-#version = '8'
+#version = '0'
 # The full version, including alpha/beta/rc tags.
-#release = '8'
+#release = '0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.



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


Re: [Lldb-commits] [lldb] c77fc00 - [lldb/Docs] Remove the version from the home page

2020-03-02 Thread Davide Italiano via lldb-commits


> On Mar 2, 2020, at 14:35, Jonas Devlieghere  wrote:
> 
> 
> 
> On Mon, Mar 2, 2020 at 2:28 PM Davide Italiano  > wrote:
> You might want to consider removing it entirely instead of commenting it, 
> unless you find some value in keeping something that’s already stale around 
> for the future (e.g. re-enabling).
> 
> If you take a look at the rest of the file you'll see it's consistent with 
> other options that are disabled. I believe this is the Sphinx default. It 
> also communicates that this is disabled on purpose and not just an oversight 
> or option added in a later version. 
>  

Then you might consider setting the version to 0 or to the current version. And 
adding a comment explaining this has no semantic value associated.
Leaving a stale version is confusing for somebody who opens the file, e.g. me.

—
Davide___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] c77fc00 - [lldb/Docs] Remove the version from the home page

2020-03-02 Thread Davide Italiano via lldb-commits
You might want to consider removing it entirely instead of commenting it, 
unless you find some value in keeping something that’s already stale around for 
the future (e.g. re-enabling).

—
Davide

> On Mar 2, 2020, at 14:23, Jonas Devlieghere via lldb-commits 
>  wrote:
> 
> 
> Author: Jonas Devlieghere
> Date: 2020-03-02T14:23:05-08:00
> New Revision: c77fc00eec081f3465e3b62708b2e6f8a32da3dd
> 
> URL: 
> https://github.com/llvm/llvm-project/commit/c77fc00eec081f3465e3b62708b2e6f8a32da3dd
> DIFF: 
> https://github.com/llvm/llvm-project/commit/c77fc00eec081f3465e3b62708b2e6f8a32da3dd.diff
> 
> LOG: [lldb/Docs] Remove the version from the home page
> 
> Added: 
> 
> 
> Modified: 
>lldb/docs/conf.py
>lldb/docs/index.rst
> 
> Removed: 
> 
> 
> 
> 
> diff  --git a/lldb/docs/conf.py b/lldb/docs/conf.py
> index bd95cbe6cd98..d48d608aa276 100644
> --- a/lldb/docs/conf.py
> +++ b/lldb/docs/conf.py
> @@ -49,9 +49,9 @@
> # built documents.
> #
> # The short version.
> -version = '8'
> +#version = '8'
> # The full version, including alpha/beta/rc tags.
> -release = '8'
> +#release = '8'
> 
> # The language for content autogenerated by Sphinx. Refer to documentation
> # for a list of supported languages.
> 
> diff  --git a/lldb/docs/index.rst b/lldb/docs/index.rst
> index f1e1eda7609a..29f63b328381 100644
> --- a/lldb/docs/index.rst
> +++ b/lldb/docs/index.rst
> @@ -3,7 +3,7 @@
> The LLDB Debugger
> =
> 
> -Welcome to the LLDB version |release| documentation!
> +Welcome to the LLDB documentation!
> 
> LLDB is a next generation, high-performance debugger. It is built as a set of
> reusable components which highly leverage existing libraries in the larger 
> LLVM
> 
> 
> 
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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


[Lldb-commits] [lldb] 34ee941 - [ObjectFileMachO] Fix a build error on embedded.

2020-02-26 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-26T14:31:48-08:00
New Revision: 34ee941f6d04454838456f0dc692f4abab5cdd19

URL: 
https://github.com/llvm/llvm-project/commit/34ee941f6d04454838456f0dc692f4abab5cdd19
DIFF: 
https://github.com/llvm/llvm-project/commit/34ee941f6d04454838456f0dc692f4abab5cdd19.diff

LOG: [ObjectFileMachO] Fix a build error on embedded.

Added: 


Modified: 
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Removed: 




diff  --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp 
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 5b75e1f2a2ec..ad12819847cd 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -3506,8 +3506,8 @@ size_t ObjectFileMachO::ParseSymtab() {
   N_FUN_addr_to_sym_idx.equal_range(nlist.n_value);
   if (range.first != range.second) {
 bool found_it = false;
-for (const auto pos = range.first;
- pos != range.second; ++pos) {
+for (auto pos = range.first; pos != range.second;
+ ++pos) {
   if (sym[sym_idx].GetMangled().GetName(
   lldb::eLanguageTypeUnknown,
   Mangled::ePreferMangled) ==
@@ -3551,8 +3551,8 @@ size_t ObjectFileMachO::ParseSymtab() {
   nlist.n_value);
   if (range.first != range.second) {
 bool found_it = false;
-for (const auto pos = range.first;
- pos != range.second; ++pos) {
+for (auto pos = range.first; pos != range.second;
+ ++pos) {
   if (sym[sym_idx].GetMangled().GetName(
   lldb::eLanguageTypeUnknown,
   Mangled::ePreferMangled) ==



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


Re: [Lldb-commits] [lldb] 6990eaf - [lldb/Test] Skip VSCode test on embedded Darwin

2020-02-19 Thread Davide Italiano via lldb-commits


> On Feb 19, 2020, at 17:52, Frédéric Riss  wrote:
> 
> 
> 
>> On Feb 19, 2020, at 5:44 PM, Davide Italiano via lldb-commits 
>>  wrote:
>> 
>> 
>> 
>>> On Feb 19, 2020, at 17:34, Jonas Devlieghere via lldb-commits 
>>>  wrote:
>>> 
>>> 
>>> Author: Jonas Devlieghere
>>> Date: 2020-02-19T17:34:01-08:00
>>> New Revision: 6990eaf1fe00e9736fbfbcae160e18c5edbcd1d4
>>> 
>>> URL: 
>>> https://github.com/llvm/llvm-project/commit/6990eaf1fe00e9736fbfbcae160e18c5edbcd1d4
>>> DIFF: 
>>> https://github.com/llvm/llvm-project/commit/6990eaf1fe00e9736fbfbcae160e18c5edbcd1d4.diff
>>> 
>>> LOG: [lldb/Test] Skip VSCode test on embedded Darwin
>>> 
>>> These tests are not configured to run on the device.
>> 
>> 
>> I’ve never seen these failing. Did you?
> 
> Yes, I did. All of them fail for me and 2 of them hang.
> 
> `@skipIfDarwinEmbedded` obviously works for us, but I’m wondering if 
> `@skipIfRemote` would not be a better/more generic fix?

@skipIfRemote is obviously a better fix.
It would be nice if all the vscode tests could be categorized and we could put 
a single annotation on them, so that in case somebody adds another test, we 
don’t have to do this decorator gymnastics.

—
Davide___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] 6990eaf - [lldb/Test] Skip VSCode test on embedded Darwin

2020-02-19 Thread Davide Italiano via lldb-commits


> On Feb 19, 2020, at 17:34, Jonas Devlieghere via lldb-commits 
>  wrote:
> 
> 
> Author: Jonas Devlieghere
> Date: 2020-02-19T17:34:01-08:00
> New Revision: 6990eaf1fe00e9736fbfbcae160e18c5edbcd1d4
> 
> URL: 
> https://github.com/llvm/llvm-project/commit/6990eaf1fe00e9736fbfbcae160e18c5edbcd1d4
> DIFF: 
> https://github.com/llvm/llvm-project/commit/6990eaf1fe00e9736fbfbcae160e18c5edbcd1d4.diff
> 
> LOG: [lldb/Test] Skip VSCode test on embedded Darwin
> 
> These tests are not configured to run on the device.


I’ve never seen these failing. Did you?

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


[Lldb-commits] [lldb] 42cab98 - [TestTargetCommand] Remove another reference to a stale rdar.

2020-02-18 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-18T13:39:37-08:00
New Revision: 42cab985fd95ba4f3f290e7bb26b93805edb447d

URL: 
https://github.com/llvm/llvm-project/commit/42cab985fd95ba4f3f290e7bb26b93805edb447d
DIFF: 
https://github.com/llvm/llvm-project/commit/42cab985fd95ba4f3f290e7bb26b93805edb447d.diff

LOG: [TestTargetCommand] Remove another reference to a stale rdar.

The test passes, and the rdar is closed.

Added: 


Modified: 
lldb/test/API/commands/target/basic/TestTargetCommand.py

Removed: 




diff  --git a/lldb/test/API/commands/target/basic/TestTargetCommand.py 
b/lldb/test/API/commands/target/basic/TestTargetCommand.py
index 047b1073a961..2a5978c9844b 100644
--- a/lldb/test/API/commands/target/basic/TestTargetCommand.py
+++ b/lldb/test/API/commands/target/basic/TestTargetCommand.py
@@ -179,8 +179,6 @@ def do_target_variable_command(self, exe_name):
 
 self.runCmd("c")
 
-# rdar://problem/9763907
-# 'target variable' command fails if the target program has been run
 self.expect(
 "target variable my_global_str",
 VARIABLES_DISPLAYED_CORRECTLY,



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


[Lldb-commits] [lldb] 2560a93 - [TestTargetCommand] `target var` without a process doesn't work on arm64e.

2020-02-18 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-18T13:38:27-08:00
New Revision: 2560a93b706245b442ac5bf208c48db4912de134

URL: 
https://github.com/llvm/llvm-project/commit/2560a93b706245b442ac5bf208c48db4912de134
DIFF: 
https://github.com/llvm/llvm-project/commit/2560a93b706245b442ac5bf208c48db4912de134.diff

LOG: [TestTargetCommand] `target var` without a process doesn't work on arm64e.

lldb needs to know about chains of authenticated relocations.



Added: 


Modified: 
lldb/test/API/commands/target/basic/TestTargetCommand.py

Removed: 




diff  --git a/lldb/test/API/commands/target/basic/TestTargetCommand.py 
b/lldb/test/API/commands/target/basic/TestTargetCommand.py
index 95df78eef12a..047b1073a961 100644
--- a/lldb/test/API/commands/target/basic/TestTargetCommand.py
+++ b/lldb/test/API/commands/target/basic/TestTargetCommand.py
@@ -44,6 +44,7 @@ def test_target_command(self):
 self.buildAll()
 self.do_target_command()
 
+@expectedFailureAll(archs=['arm64e']) # 
 def test_target_variable_command(self):
 """Test 'target variable' command before and after starting the 
inferior."""
 d = {'C_SOURCES': 'globals.c', 'EXE': self.getBuildArtifact('globals')}
@@ -52,6 +53,7 @@ def test_target_variable_command(self):
 
 self.do_target_variable_command('globals')
 
+@expectedFailureAll(archs=['arm64e']) # 
 def test_target_variable_command_no_fail(self):
 """Test 'target variable' command before and after starting the 
inferior."""
 d = {'C_SOURCES': 'globals.c', 'EXE': self.getBuildArtifact('globals')}



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


[Lldb-commits] [lldb] 3f5e050 - [TestGlobalVariables] Remove a reference to a stale rdar.

2020-02-18 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-18T13:31:14-08:00
New Revision: 3f5e0501b5e28602320df37e740445a7f93bc24f

URL: 
https://github.com/llvm/llvm-project/commit/3f5e0501b5e28602320df37e740445a7f93bc24f
DIFF: 
https://github.com/llvm/llvm-project/commit/3f5e0501b5e28602320df37e740445a7f93bc24f.diff

LOG: [TestGlobalVariables] Remove a reference to a stale rdar.

The bug has been fixed and the rdar is closed. No need to
clutter the test.

Added: 


Modified: 
lldb/test/API/lang/c/global_variables/TestGlobalVariables.py

Removed: 




diff  --git a/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py 
b/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
index 7f13bf0036ab..c9160fd38549 100644
--- a/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
+++ b/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
@@ -108,10 +108,6 @@ def test_c_global_variables(self):
 'g_marked_spot.x',
 '20'])
 
-# rdar://problem/9747668
-# runCmd: target variable g_marked_spot.y
-# output: (int) g_marked_spot.y = 
 self.expect(
 "target variable g_marked_spot.y",
 VARIABLES_DISPLAYED_CORRECTLY,



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


[Lldb-commits] [lldb] 0159c21 - [TestGlobalVariables] `target var` without a process doesn't work on arm64e.

2020-02-18 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-18T13:30:51-08:00
New Revision: 0159c21119ed5694c2804ec439e336b5b7e136ec

URL: 
https://github.com/llvm/llvm-project/commit/0159c21119ed5694c2804ec439e336b5b7e136ec
DIFF: 
https://github.com/llvm/llvm-project/commit/0159c21119ed5694c2804ec439e336b5b7e136ec.diff

LOG: [TestGlobalVariables] `target var` without a process doesn't work on 
arm64e.

lldb needs to know about chains of authenticated relocations.



Added: 


Modified: 
lldb/test/API/lang/c/global_variables/TestGlobalVariables.py

Removed: 




diff  --git a/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py 
b/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
index 04b874942acb..7f13bf0036ab 100644
--- a/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
+++ b/lldb/test/API/lang/c/global_variables/TestGlobalVariables.py
@@ -21,6 +21,7 @@ def setUp(self):
 self.shlib_names = ["a"]
 
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
+@expectedFailureAll(archs=["arm64e"]) # 
 def test_without_process(self):
 """Test that static initialized variables can be inspected without
 process."""



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


[Lldb-commits] [lldb] d797e33 - [TestConstVariable] Clean-up XFAIL lists.

2020-02-11 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-11T20:31:09-08:00
New Revision: d797e33cc083c186103e0cb9aeb016913b96fd08

URL: 
https://github.com/llvm/llvm-project/commit/d797e33cc083c186103e0cb9aeb016913b96fd08
DIFF: 
https://github.com/llvm/llvm-project/commit/d797e33cc083c186103e0cb9aeb016913b96fd08.diff

LOG: [TestConstVariable] Clean-up XFAIL lists.

These versions of `clang` are ancient history.

Added: 


Modified: 
lldb/test/API/lang/c/const_variables/TestConstVariables.py

Removed: 




diff  --git a/lldb/test/API/lang/c/const_variables/TestConstVariables.py 
b/lldb/test/API/lang/c/const_variables/TestConstVariables.py
index 59fa6bcb0a1b..2cc94369f38d 100644
--- a/lldb/test/API/lang/c/const_variables/TestConstVariables.py
+++ b/lldb/test/API/lang/c/const_variables/TestConstVariables.py
@@ -12,15 +12,6 @@ class ConstVariableTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailureAll(
-oslist=["freebsd", "linux"],
-compiler="clang", compiler_version=["<", "3.5"])
-@expectedFailureAll(
-oslist=["freebsd", "linux"],
-compiler="clang", compiler_version=["=", "3.7"])
-@expectedFailureAll(
-oslist=["freebsd", "linux"],
-compiler="clang", compiler_version=["=", "3.8"])
 @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
 @expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el'])
 @expectedFailureAll(



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


[Lldb-commits] [lldb] b7bd35a - [TestKernVerStrLCNOTE] Check the *right* architecture.

2020-02-10 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-10T15:17:52-08:00
New Revision: b7bd35a8f13fd332fc7d32c0f03b13ef9e2fb2c1

URL: 
https://github.com/llvm/llvm-project/commit/b7bd35a8f13fd332fc7d32c0f03b13ef9e2fb2c1
DIFF: 
https://github.com/llvm/llvm-project/commit/b7bd35a8f13fd332fc7d32c0f03b13ef9e2fb2c1.diff

LOG: [TestKernVerStrLCNOTE] Check the *right* architecture.

Added: 


Modified: 

lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py

Removed: 




diff  --git 
a/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
 
b/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
index c28b4bc52a58..167f0984fc6c 100644
--- 
a/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
+++ 
b/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
@@ -17,7 +17,7 @@ class TestKernVerStrLCNOTE(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipIf(debug_info=no_match(["dsym"]), bugnumber="This test is looking 
explicitly for a dSYM")
-@skipIf(archs=no_match(['amd64']))
+@skipIf(archs=no_match(['x86_64']))
 @skipUnlessDarwin
 def test_lc_note(self):
 self.build()



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


Re: [Lldb-commits] [lldb] 1a39f1b - [lldb] Fix+re-enable Assert StackFrame Recognizer on Linux

2020-02-10 Thread Davide Italiano via lldb-commits
This caused three failures on macOS.
I reverted the patch to unbreak the bots.
http://lab.llvm.org:8080/green/job/lldb-cmake/8565/console 


Thanks,

—
Davide

> On Feb 10, 2020, at 01:33, Jan Kratochvil via lldb-commits 
>  wrote:
> 
> 
> Author: Jan Kratochvil
> Date: 2020-02-10T10:29:32+01:00
> New Revision: 1a39f1b966a8d8f15ed0d5a832d5097cccefe93b
> 
> URL: 
> https://github.com/llvm/llvm-project/commit/1a39f1b966a8d8f15ed0d5a832d5097cccefe93b
> DIFF: 
> https://github.com/llvm/llvm-project/commit/1a39f1b966a8d8f15ed0d5a832d5097cccefe93b.diff
> 
> LOG: [lldb] Fix+re-enable Assert StackFrame Recognizer on Linux
> 
> D73303 was failing on Fedora Linux and so it was disabled by Skip the
> AssertFrameRecognizer test for Linux.
> 
> I find no easy way how to find out if it gets recognized as
> `__assert_fail` or `__GI___assert_fail` as during `Process` ctor
> libc.so.6 is not yet loaded by the debuggee.
> 
> DWARF symbol `__GI___assert_fail` overrides the ELF symbol `__assert_fail`.
> While external debug info (=DWARF) gets disabled for testsuite (D55859)
> that sure does not apply for real world usage.
> 
> Differential Revision: https://reviews.llvm.org/D74252
> 
> Added: 
> 
> 
> Modified: 
>lldb/include/lldb/Target/StackFrameRecognizer.h
>lldb/source/Commands/CommandObjectFrame.cpp
>
> lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
>lldb/source/Target/AssertFrameRecognizer.cpp
>lldb/source/Target/StackFrameRecognizer.cpp
>lldb/test/Shell/Recognizer/assert.test
>lldb/unittests/Target/StackFrameRecognizerTest.cpp
> 
> Removed: 
> 
> 
> 
> 
> diff  --git a/lldb/include/lldb/Target/StackFrameRecognizer.h 
> b/lldb/include/lldb/Target/StackFrameRecognizer.h
> index b509e0760b31..92cfca4227cf 100644
> --- a/lldb/include/lldb/Target/StackFrameRecognizer.h
> +++ b/lldb/include/lldb/Target/StackFrameRecognizer.h
> @@ -101,8 +101,8 @@ class ScriptedStackFrameRecognizer : public 
> StackFrameRecognizer {
> class StackFrameRecognizerManager {
> public:
>   static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,
> -ConstString module,
> -ConstString symbol,
> +ConstString module, ConstString symbol,
> +ConstString alternate_symbol,
> bool first_instruction_only = true);
> 
>   static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,
> @@ -113,7 +113,8 @@ class StackFrameRecognizerManager {
>   static void ForEach(
>   std::function  std::string module, std::string symbol,
> - bool regexp)> const );
> + std::string alternate_symbol, bool regexp)> const
> +  );
> 
>   static bool RemoveRecognizerWithID(uint32_t recognizer_id);
> 
> 
> diff  --git a/lldb/source/Commands/CommandObjectFrame.cpp 
> b/lldb/source/Commands/CommandObjectFrame.cpp
> index d86b50bd7aad..5af9e2e314be 100644
> --- a/lldb/source/Commands/CommandObjectFrame.cpp
> +++ b/lldb/source/Commands/CommandObjectFrame.cpp
> @@ -881,7 +881,7 @@ bool CommandObjectFrameRecognizerAdd::DoExecute(Args 
> ,
>   } else {
> auto module = ConstString(m_options.m_module);
> auto func = ConstString(m_options.m_function);
> -StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func);
> +StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func, 
> {});
>   }
> #endif
> 
> @@ -960,12 +960,13 @@ class CommandObjectFrameRecognizerList : public 
> CommandObjectParsed {
> StackFrameRecognizerManager::ForEach(
> [, _printed](uint32_t recognizer_id, std::string name,
> std::string function, std::string symbol,
> -bool regexp) {
> +std::string alternate_symbol, bool regexp) {
>   if (name == "")
> name = "(internal)";
>   result.GetOutputStream().Printf(
> -  "%d: %s, module %s, function %s%s\n", recognizer_id, 
> name.c_str(),
> -  function.c_str(), symbol.c_str(), regexp ? " (regexp)" : "");
> +  "%d: %s, module %s, function %s{%s}%s\n", recognizer_id,
> +  name.c_str(), function.c_str(), symbol.c_str(),
> +  alternate_symbol.c_str(), regexp ? " (regexp)" : "");
>   any_printed = true;
> });
> 
> 
> diff  --git 
> a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
>  
> b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
> index 6acc23176248..62d16296bd66 100644
> --- 
> a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
> +++ 
> 

[Lldb-commits] [lldb] 6b2979c - Revert "[lldb] Fix+re-enable Assert StackFrame Recognizer on Linux"

2020-02-10 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-10T13:27:35-08:00
New Revision: 6b2979c12300b90a1e69791d43ee9cff14f4265e

URL: 
https://github.com/llvm/llvm-project/commit/6b2979c12300b90a1e69791d43ee9cff14f4265e
DIFF: 
https://github.com/llvm/llvm-project/commit/6b2979c12300b90a1e69791d43ee9cff14f4265e.diff

LOG: Revert "[lldb] Fix+re-enable Assert StackFrame Recognizer on Linux"

This reverts commit 1a39f1b966a8d8f15ed0d5a832d5097cccefe93b as
it breaks macOS.

Added: 


Modified: 
lldb/include/lldb/Target/StackFrameRecognizer.h
lldb/source/Commands/CommandObjectFrame.cpp

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/source/Target/AssertFrameRecognizer.cpp
lldb/source/Target/StackFrameRecognizer.cpp
lldb/test/Shell/Recognizer/assert.test
lldb/unittests/Target/StackFrameRecognizerTest.cpp

Removed: 




diff  --git a/lldb/include/lldb/Target/StackFrameRecognizer.h 
b/lldb/include/lldb/Target/StackFrameRecognizer.h
index 92cfca4227cf..b509e0760b31 100644
--- a/lldb/include/lldb/Target/StackFrameRecognizer.h
+++ b/lldb/include/lldb/Target/StackFrameRecognizer.h
@@ -101,8 +101,8 @@ class ScriptedStackFrameRecognizer : public 
StackFrameRecognizer {
 class StackFrameRecognizerManager {
 public:
   static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,
-ConstString module, ConstString symbol,
-ConstString alternate_symbol,
+ConstString module,
+ConstString symbol,
 bool first_instruction_only = true);
 
   static void AddRecognizer(lldb::StackFrameRecognizerSP recognizer,
@@ -113,8 +113,7 @@ class StackFrameRecognizerManager {
   static void ForEach(
   std::function const
-  );
+ bool regexp)> const );
 
   static bool RemoveRecognizerWithID(uint32_t recognizer_id);
 

diff  --git a/lldb/source/Commands/CommandObjectFrame.cpp 
b/lldb/source/Commands/CommandObjectFrame.cpp
index 5af9e2e314be..d86b50bd7aad 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -881,7 +881,7 @@ bool CommandObjectFrameRecognizerAdd::DoExecute(Args 
,
   } else {
 auto module = ConstString(m_options.m_module);
 auto func = ConstString(m_options.m_function);
-StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func, 
{});
+StackFrameRecognizerManager::AddRecognizer(recognizer_sp, module, func);
   }
 #endif
 
@@ -960,13 +960,12 @@ class CommandObjectFrameRecognizerList : public 
CommandObjectParsed {
 StackFrameRecognizerManager::ForEach(
 [, _printed](uint32_t recognizer_id, std::string name,
 std::string function, std::string symbol,
-std::string alternate_symbol, bool regexp) {
+bool regexp) {
   if (name == "")
 name = "(internal)";
   result.GetOutputStream().Printf(
-  "%d: %s, module %s, function %s{%s}%s\n", recognizer_id,
-  name.c_str(), function.c_str(), symbol.c_str(),
-  alternate_symbol.c_str(), regexp ? " (regexp)" : "");
+  "%d: %s, module %s, function %s%s\n", recognizer_id, 
name.c_str(),
+  function.c_str(), symbol.c_str(), regexp ? " (regexp)" : "");
   any_printed = true;
 });
 

diff  --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 62d16296bd66..6acc23176248 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -2691,7 +2691,6 @@ static void RegisterObjCExceptionRecognizer() {
 std::tie(module, function) = AppleObjCRuntime::GetExceptionThrowLocation();
 StackFrameRecognizerManager::AddRecognizer(
 StackFrameRecognizerSP(new ObjCExceptionThrowFrameRecognizer()),
-module.GetFilename(), function, /*alternate_symbol*/ {},
-/*first_instruction_only*/ true);
+module.GetFilename(), function, /*first_instruction_only*/ true);
   });
 }

diff  --git a/lldb/source/Target/AssertFrameRecognizer.cpp 
b/lldb/source/Target/AssertFrameRecognizer.cpp
index b024ee7ba97c..89ed3ce022d9 100644
--- a/lldb/source/Target/AssertFrameRecognizer.cpp
+++ b/lldb/source/Target/AssertFrameRecognizer.cpp
@@ -16,6 +16,26 @@ using namespace lldb;
 using namespace lldb_private;
 
 namespace lldb_private {
+/// Checkes if the module containing a symbol has debug info.
+///
+/// \param[in] target
+///The target containing the module.
+/// \param[in] module_spec
+///The module spec that should contain the symbol.
+/// 

[Lldb-commits] [lldb] 5858c9d - Revert "[TestConvienceVariable] Clean the directory before running the test."

2020-02-07 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-07T14:32:30-08:00
New Revision: 5858c9d69f5efa94b721e3d37edadae21cbb77f3

URL: 
https://github.com/llvm/llvm-project/commit/5858c9d69f5efa94b721e3d37edadae21cbb77f3
DIFF: 
https://github.com/llvm/llvm-project/commit/5858c9d69f5efa94b721e3d37edadae21cbb77f3.diff

LOG: Revert "[TestConvienceVariable] Clean the directory before running the 
test."

This reverts commit 9bce9d2d65e2462140597f71a8247750b837094c, as
it breaks the bots.

Added: 


Modified: 
lldb/test/Shell/Driver/TestConvenienceVariables.test

Removed: 




diff  --git a/lldb/test/Shell/Driver/TestConvenienceVariables.test 
b/lldb/test/Shell/Driver/TestConvenienceVariables.test
index 2afacb88cf22..d9c8f7581bea 100644
--- a/lldb/test/Shell/Driver/TestConvenienceVariables.test
+++ b/lldb/test/Shell/Driver/TestConvenienceVariables.test
@@ -1,5 +1,4 @@
 REQUIRES: python
-RUN: rm -f %t
 RUN: mkdir -p %t
 RUN: %build %p/Inputs/hello.cpp -o %t/target.out
 RUN: %lldb %t/target.out -s %p/Inputs/convenience.in -o quit | FileCheck %s



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


[Lldb-commits] [lldb] 9bce9d2 - [TestConvienceVariable] Clean the directory before running the test.

2020-02-07 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-07T13:52:40-08:00
New Revision: 9bce9d2d65e2462140597f71a8247750b837094c

URL: 
https://github.com/llvm/llvm-project/commit/9bce9d2d65e2462140597f71a8247750b837094c
DIFF: 
https://github.com/llvm/llvm-project/commit/9bce9d2d65e2462140597f71a8247750b837094c.diff

LOG: [TestConvienceVariable] Clean the directory before running the test.

Added: 


Modified: 
lldb/test/Shell/Driver/TestConvenienceVariables.test

Removed: 




diff  --git a/lldb/test/Shell/Driver/TestConvenienceVariables.test 
b/lldb/test/Shell/Driver/TestConvenienceVariables.test
index d9c8f7581bea..2afacb88cf22 100644
--- a/lldb/test/Shell/Driver/TestConvenienceVariables.test
+++ b/lldb/test/Shell/Driver/TestConvenienceVariables.test
@@ -1,4 +1,5 @@
 REQUIRES: python
+RUN: rm -f %t
 RUN: mkdir -p %t
 RUN: %build %p/Inputs/hello.cpp -o %t/target.out
 RUN: %lldb %t/target.out -s %p/Inputs/convenience.in -o quit | FileCheck %s



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


[Lldb-commits] [lldb] 246097a - [TestKernVerStrLCNOTE] Strengthen a check. NFC.

2020-02-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-02-03T16:39:49-08:00
New Revision: 246097a091bfddca081f4d0f7d84530579e3bb33

URL: 
https://github.com/llvm/llvm-project/commit/246097a091bfddca081f4d0f7d84530579e3bb33
DIFF: 
https://github.com/llvm/llvm-project/commit/246097a091bfddca081f4d0f7d84530579e3bb33.diff

LOG: [TestKernVerStrLCNOTE] Strengthen a check. NFC.

Added: 


Modified: 

lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py

Removed: 




diff  --git 
a/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
 
b/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
index 80007438addc..c28b4bc52a58 100644
--- 
a/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
+++ 
b/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
@@ -17,7 +17,7 @@ class TestKernVerStrLCNOTE(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipIf(debug_info=no_match(["dsym"]), bugnumber="This test is looking 
explicitly for a dSYM")
-@skipIfDarwinEmbedded
+@skipIf(archs=no_match(['amd64']))
 @skipUnlessDarwin
 def test_lc_note(self):
 self.build()



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


[Lldb-commits] [lldb] f55b033 - [TestStdModuleSysroot] Only run locally.

2020-01-22 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-01-22T13:56:51-08:00
New Revision: f55b033c028019653fed8fc685b1d33bf529b92b

URL: 
https://github.com/llvm/llvm-project/commit/f55b033c028019653fed8fc685b1d33bf529b92b
DIFF: 
https://github.com/llvm/llvm-project/commit/f55b033c028019653fed8fc685b1d33bf529b92b.diff

LOG: [TestStdModuleSysroot] Only run locally.

Added: 


Modified: 

lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py

Removed: 




diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
 
b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
index 684e287a69ed..452e8d697f2d 100644
--- 
a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
+++ 
b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
@@ -16,6 +16,7 @@ class ImportStdModule(TestBase):
 # test configurations where libc++ is actually supposed to be tested.
 @add_test_categories(["libc++"])
 @skipIf(compiler=no_match("clang"))
+@skipIfRemote # This test messes with the platform, can't be run remotely.
 def test(self):
 self.build()
 



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


[Lldb-commits] [lldb] c1bc094 - [TestQuoting] Use the fully qualified path for remote platforms.

2020-01-17 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-01-17T10:57:35-08:00
New Revision: c1bc094f361beede4e88ace8e9761391707ee30b

URL: 
https://github.com/llvm/llvm-project/commit/c1bc094f361beede4e88ace8e9761391707ee30b
DIFF: 
https://github.com/llvm/llvm-project/commit/c1bc094f361beede4e88ace8e9761391707ee30b.diff

LOG: [TestQuoting] Use the fully qualified path for remote platforms.

Patch by Jason Molenda, fixes a test failure on arm64 devices.

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py

Removed: 




diff  --git 
a/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py 
b/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py
index 5853313db6ff..d7581951a147 100644
--- 
a/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py
+++ 
b/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py
@@ -74,7 +74,7 @@ def do_test_args(self, args_in, args_out):
 
 local_outfile = self.getBuildArtifact("output.txt")
 if lldb.remote_platform:
-remote_outfile = "output.txt" # Relative to platform's PWD
+remote_outfile = lldb.remote_platform.GetWorkingDirectory() + 
"/output.txt"
 else:
 remote_outfile = local_outfile
 



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


[Lldb-commits] [lldb] fb51ce1 - [LanguageRuntime] Retire an unused member function. NFCI.

2020-01-13 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-01-13T17:38:04-08:00
New Revision: fb51ce10d7dcab9209d0cd059d907810dbd0197d

URL: 
https://github.com/llvm/llvm-project/commit/fb51ce10d7dcab9209d0cd059d907810dbd0197d
DIFF: 
https://github.com/llvm/llvm-project/commit/fb51ce10d7dcab9209d0cd059d907810dbd0197d.diff

LOG: [LanguageRuntime] Retire an unused member function. NFCI.

Added: 


Modified: 

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

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h

Removed: 




diff  --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 8546cae2f2ab..4015f10c4966 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1978,36 +1978,6 @@ void AppleObjCRuntimeV2::WarnIfNoClassesCached(
   }
 }
 
-ConstString
-AppleObjCRuntimeV2::GetActualTypeName(ObjCLanguageRuntime::ObjCISA isa) {
-  if (isa == g_objc_Tagged_ISA) {
-static const ConstString g_objc_tagged_isa_name("_lldb_Tagged_ObjC_ISA");
-return g_objc_tagged_isa_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSAtom) {
-static const ConstString g_objc_tagged_isa_nsatom_name("NSAtom");
-return g_objc_tagged_isa_nsatom_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSNumber) {
-static const ConstString g_objc_tagged_isa_nsnumber_name("NSNumber");
-return g_objc_tagged_isa_nsnumber_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSDateTS) {
-static const ConstString g_objc_tagged_isa_nsdatets_name("NSDateTS");
-return g_objc_tagged_isa_nsdatets_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSManagedObject) {
-static const ConstString g_objc_tagged_isa_nsmanagedobject_name(
-"NSManagedObject");
-return g_objc_tagged_isa_nsmanagedobject_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSDate) {
-static const ConstString g_objc_tagged_isa_nsdate_name("NSDate");
-return g_objc_tagged_isa_nsdate_name;
-  }
-  return ObjCLanguageRuntime::GetActualTypeName(isa);
-}
-
 DeclVendor *AppleObjCRuntimeV2::GetDeclVendor() {
   if (!m_decl_vendor_up)
 m_decl_vendor_up.reset(new AppleObjCDeclVendor(*this));

diff  --git 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
index a0fd39dc03b2..785bb3938d2c 100644
--- 
a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
+++ 
b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
@@ -69,8 +69,6 @@ class AppleObjCRuntimeV2 : public AppleObjCRuntime {
 
   void UpdateISAToDescriptorMapIfNeeded() override;
 
-  ConstString GetActualTypeName(ObjCLanguageRuntime::ObjCISA isa) override;
-
   ClassDescriptorSP GetClassDescriptor(ValueObject _value) override;
 
   ClassDescriptorSP GetClassDescriptorFromISA(ObjCISA isa) override;

diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp 
b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
index 335ef996419c..9eb493f83c84 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
@@ -222,14 +222,6 @@ 
ObjCLanguageRuntime::GetParentClass(ObjCLanguageRuntime::ObjCISA isa) {
   return 0;
 }
 
-ConstString
-ObjCLanguageRuntime::GetActualTypeName(ObjCLanguageRuntime::ObjCISA isa) {
-  ClassDescriptorSP objc_class_sp(GetNonKVOClassDescriptor(isa));
-  if (objc_class_sp)
-return objc_class_sp->GetClassName();
-  return ConstString();
-}
-
 ObjCLanguageRuntime::ClassDescriptorSP
 ObjCLanguageRuntime::GetClassDescriptorFromClassName(
 ConstString class_name) {

diff  --git a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h 
b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
index 069ce7facf52..b9a4d5dae08a 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
@@ -271,8 +271,6 @@ class ObjCLanguageRuntime : public LanguageRuntime {
 
   virtual ObjCISA GetISA(ConstString name);
 
-  virtual ConstString GetActualTypeName(ObjCISA isa);
-
   virtual ObjCISA GetParentClass(ObjCISA isa);
 
   // Finds the byte offset of the child_type ivar in parent_type.  If it can't



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


[Lldb-commits] [lldb] 59fadc1 - [NSArray] Remove a very old and deprecated formatter.

2020-01-06 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-01-06T14:58:37-08:00
New Revision: 59fadc14eeb1d63177b76147b26348a106ac1f9b

URL: 
https://github.com/llvm/llvm-project/commit/59fadc14eeb1d63177b76147b26348a106ac1f9b
DIFF: 
https://github.com/llvm/llvm-project/commit/59fadc14eeb1d63177b76147b26348a106ac1f9b.diff

LOG: [NSArray] Remove a very old and deprecated formatter.

Checked with the Foundation folks.

Added: 


Modified: 
lldb/source/Plugins/Language/ObjC/NSArray.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Language/ObjC/NSArray.cpp 
b/lldb/source/Plugins/Language/ObjC/NSArray.cpp
index 0ac7fb6d2330..73335aff2fd7 100644
--- a/lldb/source/Plugins/Language/ObjC/NSArray.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSArray.cpp
@@ -96,31 +96,6 @@ class GenericNSArrayMSyntheticFrontEnd : public 
NSArrayMSyntheticFrontEndBase {
   D64 *m_data_64;
 };
   
-namespace Foundation109 {
-  struct DataDescriptor_32 {
-uint32_t _used;
-uint32_t _priv1 : 2;
-uint32_t _size : 30;
-uint32_t _priv2 : 2;
-uint32_t _offset : 30;
-uint32_t _priv3;
-uint32_t _data;
-  };
-  
-  struct DataDescriptor_64 {
-uint64_t _used;
-uint64_t _priv1 : 2;
-uint64_t _size : 62;
-uint64_t _priv2 : 2;
-uint64_t _offset : 62;
-uint32_t _priv3;
-uint64_t _data;
-  };
-  
-  using NSArrayMSyntheticFrontEnd =
-  GenericNSArrayMSyntheticFrontEnd;
-}
-  
 namespace Foundation1010 {
   struct DataDescriptor_32 {
 uint32_t _used;
@@ -858,8 +833,6 @@ lldb_private::formatters::NSArraySyntheticFrontEndCreator(
   return (new Foundation1428::NSArrayMSyntheticFrontEnd(valobj_sp));
 if (runtime->GetFoundationVersion() >= 1100)
   return (new Foundation1010::NSArrayMSyntheticFrontEnd(valobj_sp));
-else
-  return (new Foundation109::NSArrayMSyntheticFrontEnd(valobj_sp));
   } else if (class_name == g_NSCallStackArray) {
 return (new CallStackArray::NSCallStackArraySyntheticFrontEnd(valobj_sp));
   } else {



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


[Lldb-commits] [lldb] 6c87623 - [UserExpression] Clean up `return` after `else`.

2020-01-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-01-03T16:52:10-08:00
New Revision: 6c87623615b3befdf62e3a5cd6c408a698f1c2d9

URL: 
https://github.com/llvm/llvm-project/commit/6c87623615b3befdf62e3a5cd6c408a698f1c2d9
DIFF: 
https://github.com/llvm/llvm-project/commit/6c87623615b3befdf62e3a5cd6c408a698f1c2d9.diff

LOG: [UserExpression] Clean up `return` after `else`.

Added: 


Modified: 
lldb/source/Expression/UserExpression.cpp

Removed: 




diff  --git a/lldb/source/Expression/UserExpression.cpp 
b/lldb/source/Expression/UserExpression.cpp
index 9e3c8ad56af0..271bd9bb57aa 100644
--- a/lldb/source/Expression/UserExpression.cpp
+++ b/lldb/source/Expression/UserExpression.cpp
@@ -84,10 +84,9 @@ bool UserExpression::LockAndCheckContext(ExecutionContext 
_ctx,
   if (m_address.IsValid()) {
 if (!frame_sp)
   return false;
-else
-  return (0 == Address::CompareLoadAddress(m_address,
-   frame_sp->GetFrameCodeAddress(),
-   target_sp.get()));
+return (Address::CompareLoadAddress(m_address,
+frame_sp->GetFrameCodeAddress(),
+target_sp.get()) == 0);
   }
 
   return true;



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


[Lldb-commits] [lldb] f387b99 - [DataFormatters] Change the Get() method to take a LanguageType.

2019-12-10 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-10T15:21:24-08:00
New Revision: f387b99745101d5843d397a2a65dc4102c6f8e14

URL: 
https://github.com/llvm/llvm-project/commit/f387b99745101d5843d397a2a65dc4102c6f8e14
DIFF: 
https://github.com/llvm/llvm-project/commit/f387b99745101d5843d397a2a65dc4102c6f8e14.diff

LOG: [DataFormatters] Change the Get() method to take a LanguageType.

Suggested by Adrian.

Added: 


Modified: 
lldb/include/lldb/DataFormatters/TypeCategory.h
lldb/source/DataFormatters/LanguageCategory.cpp
lldb/source/DataFormatters/TypeCategory.cpp
lldb/source/DataFormatters/TypeCategoryMap.cpp

Removed: 




diff  --git a/lldb/include/lldb/DataFormatters/TypeCategory.h 
b/lldb/include/lldb/DataFormatters/TypeCategory.h
index f37c661d56d0..513e859815f5 100644
--- a/lldb/include/lldb/DataFormatters/TypeCategory.h
+++ b/lldb/include/lldb/DataFormatters/TypeCategory.h
@@ -332,16 +332,16 @@ class TypeCategoryImpl {
   return m_enabled_position;
   }
 
-  bool Get(ValueObject , const FormattersMatchVector ,
+  bool Get(lldb::LanguageType lang, const FormattersMatchVector ,
lldb::TypeFormatImplSP , uint32_t *reason = nullptr);
 
-  bool Get(ValueObject , const FormattersMatchVector ,
+  bool Get(lldb::LanguageType lang, const FormattersMatchVector ,
lldb::TypeSummaryImplSP , uint32_t *reason = nullptr);
 
-  bool Get(ValueObject , const FormattersMatchVector ,
+  bool Get(lldb::LanguageType lang, const FormattersMatchVector ,
lldb::SyntheticChildrenSP , uint32_t *reason = nullptr);
 
-  bool Get(ValueObject , const FormattersMatchVector ,
+  bool Get(lldb::LanguageType lang, const FormattersMatchVector ,
lldb::TypeValidatorImplSP , uint32_t *reason = nullptr);
 
   void Clear(FormatCategoryItems items = ALL_ITEM_TYPES);

diff  --git a/lldb/source/DataFormatters/LanguageCategory.cpp 
b/lldb/source/DataFormatters/LanguageCategory.cpp
index 64a891804c57..86de28060254 100644
--- a/lldb/source/DataFormatters/LanguageCategory.cpp
+++ b/lldb/source/DataFormatters/LanguageCategory.cpp
@@ -48,8 +48,8 @@ bool LanguageCategory::Get(FormattersMatchData _data,
   }
 
   ValueObject (match_data.GetValueObject());
-  bool result =
-  m_category_sp->Get(valobj, match_data.GetMatchesVector(), format_sp);
+  bool result = m_category_sp->Get(valobj.GetObjectRuntimeLanguage(),
+   match_data.GetMatchesVector(), format_sp);
   if (match_data.GetTypeForCache() &&
   (!format_sp || !format_sp->NonCacheable())) {
 m_format_cache.Set(match_data.GetTypeForCache(), format_sp);
@@ -71,8 +71,8 @@ bool LanguageCategory::Get(FormattersMatchData _data,
   }
 
   ValueObject (match_data.GetValueObject());
-  bool result =
-  m_category_sp->Get(valobj, match_data.GetMatchesVector(), format_sp);
+  bool result = m_category_sp->Get(valobj.GetObjectRuntimeLanguage(),
+   match_data.GetMatchesVector(), format_sp);
   if (match_data.GetTypeForCache() &&
   (!format_sp || !format_sp->NonCacheable())) {
 m_format_cache.Set(match_data.GetTypeForCache(), format_sp);
@@ -94,8 +94,8 @@ bool LanguageCategory::Get(FormattersMatchData _data,
   }
 
   ValueObject (match_data.GetValueObject());
-  bool result =
-  m_category_sp->Get(valobj, match_data.GetMatchesVector(), format_sp);
+  bool result = m_category_sp->Get(valobj.GetObjectRuntimeLanguage(),
+   match_data.GetMatchesVector(), format_sp);
   if (match_data.GetTypeForCache() &&
   (!format_sp || !format_sp->NonCacheable())) {
 m_format_cache.Set(match_data.GetTypeForCache(), format_sp);
@@ -117,8 +117,8 @@ bool LanguageCategory::Get(FormattersMatchData _data,
   }
 
   ValueObject (match_data.GetValueObject());
-  bool result =
-  m_category_sp->Get(valobj, match_data.GetMatchesVector(), format_sp);
+  bool result = m_category_sp->Get(valobj.GetObjectRuntimeLanguage(),
+   match_data.GetMatchesVector(), format_sp);
   if (match_data.GetTypeForCache() &&
   (!format_sp || !format_sp->NonCacheable())) {
 m_format_cache.Set(match_data.GetTypeForCache(), format_sp);

diff  --git a/lldb/source/DataFormatters/TypeCategory.cpp 
b/lldb/source/DataFormatters/TypeCategory.cpp
index 4f8ea5d43411..7a04b59b1c84 100644
--- a/lldb/source/DataFormatters/TypeCategory.cpp
+++ b/lldb/source/DataFormatters/TypeCategory.cpp
@@ -85,10 +85,10 @@ void TypeCategoryImpl::AddLanguage(lldb::LanguageType lang) 
{
   m_languages.push_back(lang);
 }
 
-bool TypeCategoryImpl::Get(ValueObject ,
+bool TypeCategoryImpl::Get(lldb::LanguageType lang,
const FormattersMatchVector ,
lldb::TypeFormatImplSP , uint32_t *reason) {
-  if (!IsEnabled() || !IsApplicable(valobj.GetObjectRuntimeLanguage()))
+  if (!IsEnabled() || !IsApplicable(lang))
 return 

Re: [Lldb-commits] [lldb] 90f4355 - Skip TestMultilineCompletion.py on ios testsuite runs.

2019-12-10 Thread Davide Italiano via lldb-commits
I don't think that it's terribly valuable testing autocompletion on
device, but we should try to avoid calling `run` directly to avoid
these sort of issues.

On Tue, Dec 10, 2019 at 2:55 PM Jason Molenda via lldb-commits
 wrote:
>
>
> Author: Jason Molenda
> Date: 2019-12-10T14:55:04-08:00
> New Revision: 90f4355b43eaf9eefa02226b98d8cb43f44ca879
>
> URL: 
> https://github.com/llvm/llvm-project/commit/90f4355b43eaf9eefa02226b98d8cb43f44ca879
> DIFF: 
> https://github.com/llvm/llvm-project/commit/90f4355b43eaf9eefa02226b98d8cb43f44ca879.diff
>
> LOG: Skip TestMultilineCompletion.py on ios testsuite runs.
>
> Added:
>
>
> Modified:
> 
> lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
>
> Removed:
>
>
>
> 
> diff  --git 
> a/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
>  
> b/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
> index dc4f36b6f8b6..6fbdaee20510 100644
> --- 
> a/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
> +++ 
> b/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
> @@ -14,6 +14,7 @@ class MultilineCompletionTest(PExpectTest):
>  # PExpect uses many timeouts internally and doesn't play well
>  # under ASAN on a loaded machine..
>  @skipIfAsan
> +@skipIfDarwinEmbedded  # test is written to explicitly "run" the binary
>  def test_basic_completion(self):
>  """Test that we can complete a simple multiline expression"""
>  self.build()
>
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] bbcdcea - [TypeCategory] IsApplicable gets a LanguageType, not a ValueObject.

2019-12-10 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-10T14:59:34-08:00
New Revision: bbcdcea4bf8423041108e22dc619f7d5fdae9870

URL: 
https://github.com/llvm/llvm-project/commit/bbcdcea4bf8423041108e22dc619f7d5fdae9870
DIFF: 
https://github.com/llvm/llvm-project/commit/bbcdcea4bf8423041108e22dc619f7d5fdae9870.diff

LOG: [TypeCategory] IsApplicable gets a LanguageType, not a ValueObject.

Reviewers: aprantl, teemperor

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71305

Added: 


Modified: 
lldb/include/lldb/DataFormatters/TypeCategory.h
lldb/source/DataFormatters/TypeCategory.cpp

Removed: 




diff  --git a/lldb/include/lldb/DataFormatters/TypeCategory.h 
b/lldb/include/lldb/DataFormatters/TypeCategory.h
index dc5edb654940..f37c661d56d0 100644
--- a/lldb/include/lldb/DataFormatters/TypeCategory.h
+++ b/lldb/include/lldb/DataFormatters/TypeCategory.h
@@ -391,7 +391,7 @@ class TypeCategoryImpl {
 
   void Disable() { Enable(false, UINT32_MAX); }
 
-  bool IsApplicable(ValueObject );
+  bool IsApplicable(lldb::LanguageType lang);
 
   uint32_t GetLastEnabledPosition() { return m_enabled_position; }
 

diff  --git a/lldb/source/DataFormatters/TypeCategory.cpp 
b/lldb/source/DataFormatters/TypeCategory.cpp
index be3b31603eac..4f8ea5d43411 100644
--- a/lldb/source/DataFormatters/TypeCategory.cpp
+++ b/lldb/source/DataFormatters/TypeCategory.cpp
@@ -60,11 +60,10 @@ static bool IsApplicable(lldb::LanguageType category_lang,
   }
 }
 
-bool TypeCategoryImpl::IsApplicable(ValueObject ) {
-  lldb::LanguageType valobj_lang = valobj.GetObjectRuntimeLanguage();
+bool TypeCategoryImpl::IsApplicable(lldb::LanguageType lang) {
   for (size_t idx = 0; idx < GetNumLanguages(); idx++) {
 const lldb::LanguageType category_lang = GetLanguageAtIndex(idx);
-if (::IsApplicable(category_lang, valobj_lang))
+if (::IsApplicable(category_lang, lang))
   return true;
   }
   return false;
@@ -89,7 +88,7 @@ void TypeCategoryImpl::AddLanguage(lldb::LanguageType lang) {
 bool TypeCategoryImpl::Get(ValueObject ,
const FormattersMatchVector ,
lldb::TypeFormatImplSP , uint32_t *reason) {
-  if (!IsEnabled() || !IsApplicable(valobj))
+  if (!IsEnabled() || !IsApplicable(valobj.GetObjectRuntimeLanguage()))
 return false;
   if (GetTypeFormatsContainer()->Get(candidates, entry, reason))
 return true;
@@ -102,7 +101,7 @@ bool TypeCategoryImpl::Get(ValueObject ,
 bool TypeCategoryImpl::Get(ValueObject ,
const FormattersMatchVector ,
lldb::TypeSummaryImplSP , uint32_t *reason) {
-  if (!IsEnabled() || !IsApplicable(valobj))
+  if (!IsEnabled() || !IsApplicable(valobj.GetObjectRuntimeLanguage()))
 return false;
   if (GetTypeSummariesContainer()->Get(candidates, entry, reason))
 return true;
@@ -115,7 +114,7 @@ bool TypeCategoryImpl::Get(ValueObject ,
 bool TypeCategoryImpl::Get(ValueObject ,
const FormattersMatchVector ,
lldb::SyntheticChildrenSP , uint32_t *reason) 
{
-  if (!IsEnabled() || !IsApplicable(valobj))
+  if (!IsEnabled() || !IsApplicable(valobj.GetObjectRuntimeLanguage()))
 return false;
   TypeFilterImpl::SharedPointer filter_sp;
   uint32_t reason_filter = 0;



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


[Lldb-commits] [lldb] e8d955f - [FormatManager] Add a unittest for GetCandidateLanguages()

2019-12-10 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-10T13:42:59-08:00
New Revision: e8d955f29de7ee4b50d889c418b4efb18add0653

URL: 
https://github.com/llvm/llvm-project/commit/e8d955f29de7ee4b50d889c418b4efb18add0653
DIFF: 
https://github.com/llvm/llvm-project/commit/e8d955f29de7ee4b50d889c418b4efb18add0653.diff

LOG: [FormatManager] Add a unittest for GetCandidateLanguages()

Reviewers: teemperor, JDevlieghere, aprantl, jingham

Subscribers: mgorny, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71299

Added: 
lldb/unittests/DataFormatter/CMakeLists.txt
lldb/unittests/DataFormatter/FormatManagerTests.cpp

Modified: 
lldb/unittests/CMakeLists.txt

Removed: 




diff  --git a/lldb/unittests/CMakeLists.txt b/lldb/unittests/CMakeLists.txt
index 22c684f4fce3..bf117030dd4b 100644
--- a/lldb/unittests/CMakeLists.txt
+++ b/lldb/unittests/CMakeLists.txt
@@ -61,6 +61,7 @@ endfunction()
 add_subdirectory(TestingSupport)
 add_subdirectory(Breakpoint)
 add_subdirectory(Core)
+add_subdirectory(DataFormatter)
 add_subdirectory(Disassembler)
 add_subdirectory(Editline)
 add_subdirectory(Expression)

diff  --git a/lldb/unittests/DataFormatter/CMakeLists.txt 
b/lldb/unittests/DataFormatter/CMakeLists.txt
new file mode 100644
index ..fc60bff05879
--- /dev/null
+++ b/lldb/unittests/DataFormatter/CMakeLists.txt
@@ -0,0 +1,13 @@
+add_lldb_unittest(LLDBFormatterTests
+  FormatManagerTests.cpp
+
+  LINK_LIBS
+lldbCore
+lldbInterpreter
+lldbSymbol
+lldbTarget
+lldbUtility
+
+  LINK_COMPONENTS
+Support
+  )

diff  --git a/lldb/unittests/DataFormatter/FormatManagerTests.cpp 
b/lldb/unittests/DataFormatter/FormatManagerTests.cpp
new file mode 100644
index ..d57454b3f9d1
--- /dev/null
+++ b/lldb/unittests/DataFormatter/FormatManagerTests.cpp
@@ -0,0 +1,49 @@
+//===-- FormatManagerTests.cpp --*- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+#include "TestingSupport/TestUtilities.h"
+
+#include "lldb/Core/Mangled.h"
+#include "lldb/Core/Module.h"
+#include "lldb/Core/ModuleSpec.h"
+#include "lldb/DataFormatters/FormatManager.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Symbol/SymbolContext.h"
+
+#include "llvm/Support/FileUtilities.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/Program.h"
+#include "llvm/Testing/Support/Error.h"
+
+#include "gtest/gtest.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+TEST(FormatManagerTests, CompatibleLangs) {
+  std::vector candidates = {eLanguageTypeC_plus_plus,
+  eLanguageTypeObjC};
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC), candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC89), 
candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC99), 
candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC11), 
candidates);
+
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus),
+candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_03),
+candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_11),
+candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_14),
+candidates);
+
+  candidates = {eLanguageTypeObjC};
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeObjC),
+candidates);
+}



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


[Lldb-commits] [lldb] bc69dd2 - [FormatManager] GetCandidateLanguages shouldn't know about ValueObject.

2019-12-09 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-09T17:16:20-08:00
New Revision: bc69dd2cfae37a335b9a0125e161c54548a9d2a5

URL: 
https://github.com/llvm/llvm-project/commit/bc69dd2cfae37a335b9a0125e161c54548a9d2a5
DIFF: 
https://github.com/llvm/llvm-project/commit/bc69dd2cfae37a335b9a0125e161c54548a9d2a5.diff

LOG: [FormatManager] GetCandidateLanguages shouldn't know about ValueObject.

Reviewers: jingham, teemperor, JDevlieghere, aprantl

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71236

Added: 


Modified: 
lldb/include/lldb/DataFormatters/FormatManager.h
lldb/source/DataFormatters/FormatClasses.cpp
lldb/source/DataFormatters/FormatManager.cpp

Removed: 




diff  --git a/lldb/include/lldb/DataFormatters/FormatManager.h 
b/lldb/include/lldb/DataFormatters/FormatManager.h
index 66df8397dfee..54877284c57b 100644
--- a/lldb/include/lldb/DataFormatters/FormatManager.h
+++ b/lldb/include/lldb/DataFormatters/FormatManager.h
@@ -189,9 +189,6 @@ class FormatManager : public IFormatChangeListener {
   GetCandidateLanguages(lldb::LanguageType lang_type);
 
 private:
-  static std::vector
-  GetCandidateLanguages(ValueObject );
-
   static void GetPossibleMatches(ValueObject ,
  CompilerType compiler_type, uint32_t reason,
  lldb::DynamicValueType use_dynamic,

diff  --git a/lldb/source/DataFormatters/FormatClasses.cpp 
b/lldb/source/DataFormatters/FormatClasses.cpp
index 271963b5f8f4..6a9279f54d64 100644
--- a/lldb/source/DataFormatters/FormatClasses.cpp
+++ b/lldb/source/DataFormatters/FormatClasses.cpp
@@ -24,7 +24,8 @@ FormattersMatchData::FormattersMatchData(ValueObject ,
   m_formatters_match_vector({}, false), m_type_for_cache(),
   m_candidate_languages() {
   m_type_for_cache = FormatManager::GetTypeForCache(valobj, use_dynamic);
-  m_candidate_languages = FormatManager::GetCandidateLanguages(valobj);
+  m_candidate_languages =
+  FormatManager::GetCandidateLanguages(valobj.GetObjectRuntimeLanguage());
 }
 
 FormattersMatchVector FormattersMatchData::GetMatchesVector() {

diff  --git a/lldb/source/DataFormatters/FormatManager.cpp 
b/lldb/source/DataFormatters/FormatManager.cpp
index 33aa2dc7a3a1..8ae9bcc1c1cd 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -238,7 +238,8 @@ void FormatManager::GetPossibleMatches(
 }
   }
 
-  for (lldb::LanguageType language_type : GetCandidateLanguages(valobj)) {
+  for (lldb::LanguageType language_type :
+   GetCandidateLanguages(valobj.GetObjectRuntimeLanguage())) {
 if (Language *language = Language::FindPlugin(language_type)) {
   for (ConstString candidate :
language->GetPossibleFormattersMatches(valobj, use_dynamic)) {
@@ -579,8 +580,7 @@ ConstString FormatManager::GetTypeForCache(ValueObject 
,
 }
 
 std::vector
-FormatManager::GetCandidateLanguages(ValueObject ) {
-  lldb::LanguageType lang_type = valobj.GetObjectRuntimeLanguage();
+FormatManager::GetCandidateLanguages(lldb::LanguageType lang_type) {
   switch (lang_type) {
   case lldb::eLanguageTypeC:
   case lldb::eLanguageTypeC89:



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


[Lldb-commits] [lldb] 295db41 - [FormatManager] Provide a single entrypoint for GetCandidateLanguages().

2019-12-09 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-09T14:49:08-08:00
New Revision: 295db41ce230d9b0f1e0d24829abf0fb772b31ff

URL: 
https://github.com/llvm/llvm-project/commit/295db41ce230d9b0f1e0d24829abf0fb772b31ff
DIFF: 
https://github.com/llvm/llvm-project/commit/295db41ce230d9b0f1e0d24829abf0fb772b31ff.diff

LOG: [FormatManager] Provide a single entrypoint for GetCandidateLanguages().

Added: 


Modified: 
lldb/source/DataFormatters/FormatManager.cpp

Removed: 




diff  --git a/lldb/source/DataFormatters/FormatManager.cpp 
b/lldb/source/DataFormatters/FormatManager.cpp
index 1eac372d79ec..33aa2dc7a3a1 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -581,11 +581,6 @@ ConstString FormatManager::GetTypeForCache(ValueObject 
,
 std::vector
 FormatManager::GetCandidateLanguages(ValueObject ) {
   lldb::LanguageType lang_type = valobj.GetObjectRuntimeLanguage();
-  return GetCandidateLanguages(lang_type);
-}
-
-std::vector
-FormatManager::GetCandidateLanguages(lldb::LanguageType lang_type) {
   switch (lang_type) {
   case lldb::eLanguageTypeC:
   case lldb::eLanguageTypeC89:
@@ -599,6 +594,7 @@ FormatManager::GetCandidateLanguages(lldb::LanguageType 
lang_type) {
   default:
 return {lang_type};
   }
+  llvm_unreachable("Fully covered switch");
 }
 
 LanguageCategory *



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


[Lldb-commits] [lldb] cec8263 - [Process] GetLanguageRuntimes() takes an argument that's always constant.

2019-12-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-03T16:54:55-08:00
New Revision: cec82634a4034b1528940487349be14b0c405d2d

URL: 
https://github.com/llvm/llvm-project/commit/cec82634a4034b1528940487349be14b0c405d2d
DIFF: 
https://github.com/llvm/llvm-project/commit/cec82634a4034b1528940487349be14b0c405d2d.diff

LOG: [Process] GetLanguageRuntimes() takes an argument that's always constant.

And arguably `retry_if_null` isn't really descriptive of what
the flag did anyway.

Added: 


Modified: 
lldb/include/lldb/Target/Process.h
lldb/source/Target/Process.cpp

Removed: 




diff  --git a/lldb/include/lldb/Target/Process.h 
b/lldb/include/lldb/Target/Process.h
index 81181a831a49..47c5c7870405 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -2185,11 +2185,9 @@ class Process : public 
std::enable_shared_from_this,
 
   OperatingSystem *GetOperatingSystem() { return m_os_up.get(); }
 
-  std::vector
-  GetLanguageRuntimes(bool retry_if_null = true);
+  std::vector GetLanguageRuntimes();
 
-  LanguageRuntime *GetLanguageRuntime(lldb::LanguageType language,
-  bool retry_if_null = true);
+  LanguageRuntime *GetLanguageRuntime(lldb::LanguageType language);
 
   bool IsPossibleDynamicValue(ValueObject _value);
 

diff  --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index ed0b951fbce1..a731a353c1bc 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1486,8 +1486,7 @@ const lldb::ABISP ::GetABI() {
   return m_abi_sp;
 }
 
-std::vector
-Process::GetLanguageRuntimes(bool retry_if_null) {
+std::vector Process::GetLanguageRuntimes() {
   std::vector language_runtimes;
 
   if (m_finalizing)
@@ -1500,15 +1499,14 @@ Process::GetLanguageRuntimes(bool retry_if_null) {
   // yet or the proper condition for loading wasn't yet met (e.g. libc++.so
   // hadn't been loaded).
   for (const lldb::LanguageType lang_type : Language::GetSupportedLanguages()) 
{
-if (LanguageRuntime *runtime = GetLanguageRuntime(lang_type, 
retry_if_null))
+if (LanguageRuntime *runtime = GetLanguageRuntime(lang_type))
   language_runtimes.emplace_back(runtime);
   }
 
   return language_runtimes;
 }
 
-LanguageRuntime *Process::GetLanguageRuntime(lldb::LanguageType language,
- bool retry_if_null) {
+LanguageRuntime *Process::GetLanguageRuntime(lldb::LanguageType language) {
   if (m_finalizing)
 return nullptr;
 
@@ -1517,7 +1515,7 @@ LanguageRuntime 
*Process::GetLanguageRuntime(lldb::LanguageType language,
   std::lock_guard guard(m_language_runtimes_mutex);
   LanguageRuntimeCollection::iterator pos;
   pos = m_language_runtimes.find(language);
-  if (pos == m_language_runtimes.end() || (retry_if_null && !pos->second)) {
+  if (pos == m_language_runtimes.end() || !pos->second) {
 lldb::LanguageRuntimeSP runtime_sp(
 LanguageRuntime::FindPlugin(this, language));
 



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


[Lldb-commits] [lldb] 11ae9dd - [ClangASTContext] Remove a very old hack.

2019-12-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-03T16:32:21-08:00
New Revision: 11ae9dd6576e02223e6eb10568af9e5cb45b7bc6

URL: 
https://github.com/llvm/llvm-project/commit/11ae9dd6576e02223e6eb10568af9e5cb45b7bc6
DIFF: 
https://github.com/llvm/llvm-project/commit/11ae9dd6576e02223e6eb10568af9e5cb45b7bc6.diff

LOG: [ClangASTContext] Remove a very old hack.

This was fixed in clang a while ago, and the rdar associated
is now closed.

Added: 


Modified: 
lldb/source/Symbol/ClangASTContext.cpp

Removed: 




diff  --git a/lldb/source/Symbol/ClangASTContext.cpp 
b/lldb/source/Symbol/ClangASTContext.cpp
index e683a0a9f4be..e6435a261174 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -15,24 +15,6 @@
 #include 
 #include 
 
-
-// Clang headers like to use NDEBUG inside of them to enable/disable debug
-// related features using "#ifndef NDEBUG" preprocessor blocks to do one thing
-// or another. This is bad because it means that if clang was built in release
-// mode, it assumes that you are building in release mode which is not always
-// the case. You can end up with functions that are defined as empty in header
-// files when NDEBUG is not defined, and this can cause link errors with the
-// clang .a files that you have since you might be missing functions in the .a
-// file. So we have to define NDEBUG when including clang headers to avoid any
-// mismatches. This is covered by rdar://problem/8691220
-
-#if !defined(NDEBUG) && !defined(LLVM_NDEBUG_OFF)
-#define LLDB_DEFINED_NDEBUG_FOR_CLANG
-#define NDEBUG
-// Need to include assert.h so it is as clang would expect it to be (disabled)
-#include 
-#endif
-
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/ASTImporter.h"
 #include "clang/AST/Attr.h"
@@ -54,13 +36,6 @@
 #include "clang/Frontend/FrontendOptions.h"
 #include "clang/Sema/Sema.h"
 
-#ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG
-#undef NDEBUG
-#undef LLDB_DEFINED_NDEBUG_FOR_CLANG
-// Need to re-include assert.h so it is as _we_ would expect it to be (enabled)
-#include 
-#endif
-
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/Threading.h"
 



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


[Lldb-commits] [lldb] 2bb19f9 - [TypeCategory] HasLanguage() is now unused.

2019-12-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-03T15:45:23-08:00
New Revision: 2bb19f93f6a8d0c7ceaa41df744803480c95fe9a

URL: 
https://github.com/llvm/llvm-project/commit/2bb19f93f6a8d0c7ceaa41df744803480c95fe9a
DIFF: 
https://github.com/llvm/llvm-project/commit/2bb19f93f6a8d0c7ceaa41df744803480c95fe9a.diff

LOG: [TypeCategory] HasLanguage() is now unused.

Added: 


Modified: 
lldb/include/lldb/DataFormatters/TypeCategory.h
lldb/source/DataFormatters/TypeCategory.cpp

Removed: 




diff  --git a/lldb/include/lldb/DataFormatters/TypeCategory.h 
b/lldb/include/lldb/DataFormatters/TypeCategory.h
index 90c8a3da6005..dc5edb654940 100644
--- a/lldb/include/lldb/DataFormatters/TypeCategory.h
+++ b/lldb/include/lldb/DataFormatters/TypeCategory.h
@@ -358,8 +358,6 @@ class TypeCategoryImpl {
 
   void AddLanguage(lldb::LanguageType lang);
 
-  bool HasLanguage(lldb::LanguageType lang);
-
   std::string GetDescription();
 
   bool AnyMatches(ConstString type_name,

diff  --git a/lldb/source/DataFormatters/TypeCategory.cpp 
b/lldb/source/DataFormatters/TypeCategory.cpp
index 9159de169f04..be3b31603eac 100644
--- a/lldb/source/DataFormatters/TypeCategory.cpp
+++ b/lldb/source/DataFormatters/TypeCategory.cpp
@@ -86,12 +86,6 @@ void TypeCategoryImpl::AddLanguage(lldb::LanguageType lang) {
   m_languages.push_back(lang);
 }
 
-bool TypeCategoryImpl::HasLanguage(lldb::LanguageType lang) {
-  const auto iter = std::find(m_languages.begin(), m_languages.end(), lang),
- end = m_languages.end();
-  return (iter != end);
-}
-
 bool TypeCategoryImpl::Get(ValueObject ,
const FormattersMatchVector ,
lldb::TypeFormatImplSP , uint32_t *reason) {



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


[Lldb-commits] [lldb] 0cfb4a6 - [FormatManager] Provide only one variant of EnableCategory.

2019-12-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-03T15:03:25-08:00
New Revision: 0cfb4a6b3d9556c8fc55766bce47cbb433ff19fe

URL: 
https://github.com/llvm/llvm-project/commit/0cfb4a6b3d9556c8fc55766bce47cbb433ff19fe
DIFF: 
https://github.com/llvm/llvm-project/commit/0cfb4a6b3d9556c8fc55766bce47cbb433ff19fe.diff

LOG: [FormatManager] Provide only one variant of EnableCategory.

All the callers pass a single language anyway.

Added: 


Modified: 
lldb/include/lldb/DataFormatters/FormatManager.h

Removed: 




diff  --git a/lldb/include/lldb/DataFormatters/FormatManager.h 
b/lldb/include/lldb/DataFormatters/FormatManager.h
index afaafda47e76..66df8397dfee 100644
--- a/lldb/include/lldb/DataFormatters/FormatManager.h
+++ b/lldb/include/lldb/DataFormatters/FormatManager.h
@@ -52,24 +52,15 @@ class FormatManager : public IFormatChangeListener {
   void
   EnableCategory(ConstString category_name,
  TypeCategoryMap::Position pos = TypeCategoryMap::Default) {
-EnableCategory(category_name, pos,
-   std::initializer_list());
+EnableCategory(category_name, pos, {});
   }
 
   void EnableCategory(ConstString category_name,
   TypeCategoryMap::Position pos, lldb::LanguageType lang) {
-std::initializer_list langs = {lang};
-EnableCategory(category_name, pos, langs);
-  }
-
-  void EnableCategory(ConstString category_name,
-  TypeCategoryMap::Position pos = TypeCategoryMap::Default,
-  std::initializer_list langs = {}) {
 TypeCategoryMap::ValueSP category_sp;
 if (m_categories_map.Get(category_name, category_sp) && category_sp) {
   m_categories_map.Enable(category_sp, pos);
-  for (const lldb::LanguageType lang : langs)
-category_sp->AddLanguage(lang);
+  category_sp->AddLanguage(lang);
 }
   }
 



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


[Lldb-commits] [lldb] 89618a7 - [DataVisualization] Simplify. NFCI.

2019-12-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-03T15:03:25-08:00
New Revision: 89618a7ce1c13dcb540d925626638c93cc85a553

URL: 
https://github.com/llvm/llvm-project/commit/89618a7ce1c13dcb540d925626638c93cc85a553
DIFF: 
https://github.com/llvm/llvm-project/commit/89618a7ce1c13dcb540d925626638c93cc85a553.diff

LOG: [DataVisualization] Simplify. NFCI.

Added: 


Modified: 
lldb/source/DataFormatters/DataVisualization.cpp

Removed: 




diff  --git a/lldb/source/DataFormatters/DataVisualization.cpp 
b/lldb/source/DataFormatters/DataVisualization.cpp
index 08b3b34447bb..e73d44f60f03 100644
--- a/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/lldb/source/DataFormatters/DataVisualization.cpp
@@ -122,8 +122,7 @@ void DataVisualization::Categories::Enable(ConstString 
category,
TypeCategoryMap::Position pos) {
   if (GetFormatManager().GetCategory(category)->IsEnabled())
 GetFormatManager().DisableCategory(category);
-  GetFormatManager().EnableCategory(
-  category, pos, std::initializer_list());
+  GetFormatManager().EnableCategory(category, pos, {});
 }
 
 void DataVisualization::Categories::Enable(lldb::LanguageType lang_type) {



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


[Lldb-commits] [lldb] 15a172b - [TypeCategory] Nothing passes down a list of languages.

2019-12-03 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-12-03T13:57:58-08:00
New Revision: 15a172bebbc5b95d05733ef842fcdbd14e9d441d

URL: 
https://github.com/llvm/llvm-project/commit/15a172bebbc5b95d05733ef842fcdbd14e9d441d
DIFF: 
https://github.com/llvm/llvm-project/commit/15a172bebbc5b95d05733ef842fcdbd14e9d441d.diff

LOG: [TypeCategory] Nothing passes down a list of languages.

Summary: This should allow further simplifications, but it's a first step.

Reviewers: teemperor, jingham, friss

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70983

Added: 


Modified: 
lldb/include/lldb/DataFormatters/TypeCategory.h
lldb/source/DataFormatters/TypeCategory.cpp

Removed: 




diff  --git a/lldb/include/lldb/DataFormatters/TypeCategory.h 
b/lldb/include/lldb/DataFormatters/TypeCategory.h
index a5438226..90c8a3da6005 100644
--- a/lldb/include/lldb/DataFormatters/TypeCategory.h
+++ b/lldb/include/lldb/DataFormatters/TypeCategory.h
@@ -214,8 +214,7 @@ class TypeCategoryImpl {
 ValidatorContainer::RegexMatchForEachCallback m_validator_regex;
   };
 
-  TypeCategoryImpl(IFormatChangeListener *clist, ConstString name,
-   std::initializer_list langs = {});
+  TypeCategoryImpl(IFormatChangeListener *clist, ConstString name);
 
   template  void ForEach(const ForEachCallbacks ) {
 GetTypeFormatsContainer()->ForEach(foreach.GetFormatExactCallback());

diff  --git a/lldb/source/DataFormatters/TypeCategory.cpp 
b/lldb/source/DataFormatters/TypeCategory.cpp
index fed2dfb3c7c5..9159de169f04 100644
--- a/lldb/source/DataFormatters/TypeCategory.cpp
+++ b/lldb/source/DataFormatters/TypeCategory.cpp
@@ -13,18 +13,14 @@
 using namespace lldb;
 using namespace lldb_private;
 
-TypeCategoryImpl::TypeCategoryImpl(
-IFormatChangeListener *clist, ConstString name,
-std::initializer_list langs)
+TypeCategoryImpl::TypeCategoryImpl(IFormatChangeListener *clist,
+   ConstString name)
 : m_format_cont("format", "regex-format", clist),
   m_summary_cont("summary", "regex-summary", clist),
   m_filter_cont("filter", "regex-filter", clist),
   m_synth_cont("synth", "regex-synth", clist),
   m_validator_cont("validator", "regex-validator", clist), 
m_enabled(false),
-  m_change_listener(clist), m_mutex(), m_name(name), m_languages() {
-  for (const lldb::LanguageType lang : langs)
-AddLanguage(lang);
-}
+  m_change_listener(clist), m_mutex(), m_name(name), m_languages() {}
 
 static bool IsApplicable(lldb::LanguageType category_lang,
  lldb::LanguageType valobj_lang) {



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


[Lldb-commits] [lldb] 95c770f - [Utility] Remove a dead header [PPC64LE_ehframe_Registers.h]

2019-11-14 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-11-14T15:29:47-08:00
New Revision: 95c770fbfb14b07e1af7c2d427c16745617d9f1f

URL: 
https://github.com/llvm/llvm-project/commit/95c770fbfb14b07e1af7c2d427c16745617d9f1f
DIFF: 
https://github.com/llvm/llvm-project/commit/95c770fbfb14b07e1af7c2d427c16745617d9f1f.diff

LOG: [Utility] Remove a dead header [PPC64LE_ehframe_Registers.h]

Added: 


Modified: 


Removed: 
lldb/source/Utility/PPC64LE_ehframe_Registers.h



diff  --git a/lldb/source/Utility/PPC64LE_ehframe_Registers.h 
b/lldb/source/Utility/PPC64LE_ehframe_Registers.h
deleted file mode 100644
index 77cb3e5924e7..
--- a/lldb/source/Utility/PPC64LE_ehframe_Registers.h
+++ /dev/null
@@ -1,193 +0,0 @@
-//===-- PPC64LE_ehframe_Registers.h -*- C++ 
-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===--===//
-
-#ifndef utility_PPC64LE_ehframe_Registers_h_
-#define utility_PPC64LE_ehframe_Registers_h_
-
-// The register numbers used in the eh_frame unwind information.
-// Should be the same as DWARF register numbers.
-
-namespace ppc64le_ehframe {
-
-enum {
-  r0 = 0,
-  r1,
-  r2,
-  r3,
-  r4,
-  r5,
-  r6,
-  r7,
-  r8,
-  r9,
-  r10,
-  r11,
-  r12,
-  r13,
-  r14,
-  r15,
-  r16,
-  r17,
-  r18,
-  r19,
-  r20,
-  r21,
-  r22,
-  r23,
-  r24,
-  r25,
-  r26,
-  r27,
-  r28,
-  r29,
-  r30,
-  r31,
-  f0,
-  f1,
-  f2,
-  f3,
-  f4,
-  f5,
-  f6,
-  f7,
-  f8,
-  f9,
-  f10,
-  f11,
-  f12,
-  f13,
-  f14,
-  f15,
-  f16,
-  f17,
-  f18,
-  f19,
-  f20,
-  f21,
-  f22,
-  f23,
-  f24,
-  f25,
-  f26,
-  f27,
-  f28,
-  f29,
-  f30,
-  f31,
-  lr = 65,
-  ctr,
-  cr = 68,
-  xer = 76,
-  vr0,
-  vr1,
-  vr2,
-  vr3,
-  vr4,
-  vr5,
-  vr6,
-  vr7,
-  vr8,
-  vr9,
-  vr10,
-  vr11,
-  vr12,
-  vr13,
-  vr14,
-  vr15,
-  vr16,
-  vr17,
-  vr18,
-  vr19,
-  vr20,
-  vr21,
-  vr22,
-  vr23,
-  vr24,
-  vr25,
-  vr26,
-  vr27,
-  vr28,
-  vr29,
-  vr30,
-  vr31,
-  vscr = 110,
-  vrsave = 117,
-  pc,
-  softe,
-  trap,
-  origr3,
-  fpscr,
-  msr,
-  vs0,
-  vs1,
-  vs2,
-  vs3,
-  vs4,
-  vs5,
-  vs6,
-  vs7,
-  vs8,
-  vs9,
-  vs10,
-  vs11,
-  vs12,
-  vs13,
-  vs14,
-  vs15,
-  vs16,
-  vs17,
-  vs18,
-  vs19,
-  vs20,
-  vs21,
-  vs22,
-  vs23,
-  vs24,
-  vs25,
-  vs26,
-  vs27,
-  vs28,
-  vs29,
-  vs30,
-  vs31,
-  vs32,
-  vs33,
-  vs34,
-  vs35,
-  vs36,
-  vs37,
-  vs38,
-  vs39,
-  vs40,
-  vs41,
-  vs42,
-  vs43,
-  vs44,
-  vs45,
-  vs46,
-  vs47,
-  vs48,
-  vs49,
-  vs50,
-  vs51,
-  vs52,
-  vs53,
-  vs54,
-  vs55,
-  vs56,
-  vs57,
-  vs58,
-  vs59,
-  vs60,
-  vs61,
-  vs62,
-  vs63,
-};
-}
-
-#endif // utility_PPC64LE_ehframe_Registers_h_



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


[Lldb-commits] [lldb] 294ef76 - [RegisterContext] Remove now unneded vestiges.

2019-11-13 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-11-13T14:53:13-08:00
New Revision: 294ef766e8f13818369c22fbad47283c84d87c2f

URL: 
https://github.com/llvm/llvm-project/commit/294ef766e8f13818369c22fbad47283c84d87c2f
DIFF: 
https://github.com/llvm/llvm-project/commit/294ef766e8f13818369c22fbad47283c84d87c2f.diff

LOG: [RegisterContext] Remove now unneded vestiges.

Added: 


Modified: 
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp 
b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
index 4ca33c248c6f..94eebabfe2e0 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
@@ -21,12 +21,6 @@
 
 #include 
 
-// Support building against older versions of LLVM, this macro was added
-// recently.
-#ifndef LLVM_EXTENSION
-#define LLVM_EXTENSION
-#endif
-
 #include "Utility/ARM_DWARF_Registers.h"
 #include "Utility/ARM_ehframe_Registers.h"
 

diff  --git 
a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp 
b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
index b3ec24d8905d..fa5197cd6bf4 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
@@ -30,12 +30,6 @@
 #include 
 #endif
 
-// Support building against older versions of LLVM, this macro was added
-// recently.
-#ifndef LLVM_EXTENSION
-#define LLVM_EXTENSION
-#endif
-
 #include "Utility/ARM64_DWARF_Registers.h"
 
 using namespace lldb;

diff  --git 
a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp 
b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
index 873713fd8373..959b04700b17 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
@@ -19,12 +19,6 @@
 
 #include 
 
-// Support building against older versions of LLVM, this macro was added
-// recently.
-#ifndef LLVM_EXTENSION
-#define LLVM_EXTENSION
-#endif
-
 #include "RegisterContextDarwin_i386.h"
 
 using namespace lldb;

diff  --git 
a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp 
b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
index 47758ce85eb2..22088a7d6448 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
@@ -21,12 +21,6 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Compiler.h"
 
-// Support building against older versions of LLVM, this macro was added
-// recently.
-#ifndef LLVM_EXTENSION
-#define LLVM_EXTENSION
-#endif
-
 #include "RegisterContextDarwin_x86_64.h"
 
 using namespace lldb;



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


[Lldb-commits] [lldb] 9691549 - [ObjectFileMachO] Fix the build for __arm64__.

2019-11-12 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2019-11-12T11:10:36-08:00
New Revision: 96915495f9fcbd47bf3f893200e3f5a8e30d0d9e

URL: 
https://github.com/llvm/llvm-project/commit/96915495f9fcbd47bf3f893200e3f5a8e30d0d9e
DIFF: 
https://github.com/llvm/llvm-project/commit/96915495f9fcbd47bf3f893200e3f5a8e30d0d9e.diff

LOG: [ObjectFileMachO] Fix the build for __arm64__.

Catch up with an API change.

Added: 


Modified: 
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Removed: 




diff  --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp 
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index d82a1addd334..aff1d1e87bb6 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -2538,8 +2538,7 @@ size_t ObjectFileMachO::ParseSymtab() {
 
 // Next we need to determine the correct path for the dyld shared cache.
 
-ArchSpec header_arch;
-GetArchitecture(header_arch);
+ArchSpec header_arch = GetArchitecture();
 char dsc_path[PATH_MAX];
 char dsc_path_development[PATH_MAX];
 



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


  1   2   3   4   5   6   >