[Lldb-commits] [lldb] 6947db2 - lldb: do more than 1 kilobyte at a time to vastly increase binary sync speed

2023-06-19 Thread David Spickett via lldb-commits

Author: Russell Greene
Date: 2023-06-19T10:12:45Z
New Revision: 6947db2778e0f4799f5311bc80fe7963aa8409c6

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

LOG: lldb: do more than 1 kilobyte at a time to vastly increase binary sync 
speed

https://github.com/llvm/llvm-project/issues/62750

I setup a simple test with a large .so (~100MiB) that was only present on the 
target machine
but not present on the local machine, and ran a lldb server on the target and 
connectd to it.

LLDB properly downloads the file from the remote, but it does so at a very slow 
speed, even over a hardwired 1Gbps connection!

Increasing the buffer size for downloading these helps quite a bit.

Test setup:

```
$ cat gen.py
print('const char* hugeglobal = ')

for _ in range(1000*500):
print('  "' + '1234'*50 + '"')

print(';')
print('const char* mystring() { return hugeglobal; }')
$ gen.py > huge.c
$ mkdir libdir
$ gcc -fPIC huge.c -Wl,-soname,libhuge.so -o libdir/libhuge.so -shared
$ cat test.c
#include 
#include 
extern const char* mystring();
int main() {
printf("%d\n", strlen(mystring()));
}
$ gcc test.c -L libdir -l huge -Wl,-rpath='$ORIGIN' -o test
$ rsync -a libdir remote:~/
$ ssh remote bash -c "cd ~/libdir && /llvm/buildr/bin/lldb-server platform 
--server --listen '*:1234'"
```

in another terminal

```
$ rm -rf ~/.lldb # clear cache
$ cat connect.lldb
platform select remote-linux
platform connect connect://10.0.0.14:1234
file test
b main
r
image list
c
q
$ time /llvm/buildr/bin/lldb --source connect.lldb
```

Times with various buffer sizes:

1kiB (current): ~22s
8kiB: ~8s
16kiB: ~4s
32kiB: ~3.5s
64kiB: ~2.8s
128kiB: ~2.6s
256kiB: ~2.1s
512kiB: ~2.1s
1MiB: ~2.1s
2MiB: ~2.1s

I choose 512kiB from this list as it seems to be the place where the returns 
start diminishing and still isn't that much memory

My  understanding of how this makes such a difference is ReadFile issues a 
request for each call, and larger buffer means less round trip times. The 
"ideal" situation is ReadFile() being async and being able to issue multiple of 
these, but that is much more work for probably little gains.

NOTE: this is my first contribution, so wasn't sure who to choose as a 
reviewer. Greg Clayton seems to be the most appropriate of those in 
CODE_OWNERS.txt

Reviewed By: clayborg, jasonmolenda

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

Added: 


Modified: 
lldb/source/Target/Platform.cpp

Removed: 




diff  --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 2590197c7149b..4b5d21bede121 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1630,7 +1630,7 @@ Status Platform::DownloadModuleSlice(const FileSpec 
&src_file_spec,
 return error;
   }
 
-  std::vector buffer(1024);
+  std::vector buffer(512 * 1024);
   auto offset = src_offset;
   uint64_t total_bytes_read = 0;
   while (total_bytes_read < src_size) {



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


[Lldb-commits] [PATCH] D153060: lldb: do more than 1 kilobyte at a time to vastly increase binary sync speed

2023-06-19 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6947db2778e0: lldb: do more than 1 kilobyte at a time to 
vastly increase binary sync speed (authored by russelltg, committed by 
DavidSpickett).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153060/new/

https://reviews.llvm.org/D153060

Files:
  lldb/source/Target/Platform.cpp


Index: lldb/source/Target/Platform.cpp
===
--- lldb/source/Target/Platform.cpp
+++ lldb/source/Target/Platform.cpp
@@ -1630,7 +1630,7 @@
 return error;
   }
 
-  std::vector buffer(1024);
+  std::vector buffer(512 * 1024);
   auto offset = src_offset;
   uint64_t total_bytes_read = 0;
   while (total_bytes_read < src_size) {


Index: lldb/source/Target/Platform.cpp
===
--- lldb/source/Target/Platform.cpp
+++ lldb/source/Target/Platform.cpp
@@ -1630,7 +1630,7 @@
 return error;
   }
 
-  std::vector buffer(1024);
+  std::vector buffer(512 * 1024);
   auto offset = src_offset;
   uint64_t total_bytes_read = 0;
   while (total_bytes_read < src_size) {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D153060: lldb: do more than 1 kilobyte at a time to vastly increase binary sync speed

2023-06-19 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment.

Done, thanks for the contribution!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153060/new/

https://reviews.llvm.org/D153060

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


[Lldb-commits] [PATCH] D152516: [lldb][AArch64] Add thread local storage tpidr register

2023-06-19 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 532589.
DavidSpickett added a comment.
This revision is now accepted and ready to land.

Change test so that we're reading with assembly and writing with lldb and
vice versa. Instead of trying to get clever and actually move the thread 
storage about.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152516/new/

https://reviews.llvm.org/D152516

Files:
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
  lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
  lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
  lldb/test/API/linux/aarch64/tls_register/Makefile
  lldb/test/API/linux/aarch64/tls_register/TestAArch64LinuxTLSRegister.py
  lldb/test/API/linux/aarch64/tls_register/main.c

Index: lldb/test/API/linux/aarch64/tls_register/main.c
===
--- /dev/null
+++ lldb/test/API/linux/aarch64/tls_register/main.c
@@ -0,0 +1,24 @@
+#include 
+#include 
+
+int main() {
+  // Save tpidr to restore later.
+  uint64_t tpidr = 0;
+  __asm__ volatile("mrs %0, tpidr_el0" : "=r"(tpidr));
+
+  // Set a pattern for lldb to find.
+  uint64_t pattern = 0x1122334455667788;
+  __asm__ volatile("msr tpidr_el0, %0" ::"r"(pattern));
+
+  // Set break point at this line.
+  // lldb will now set its own pattern for us to find.
+
+  uint64_t new_tpidr = pattern;
+  __asm__ volatile("mrs %0, tpidr_el0" : "=r"(new_tpidr));
+  volatile bool tpidr_was_set = new_tpidr == 0x8877665544332211;
+
+  // Restore the original.
+  __asm__ volatile("msr tpidr_el0, %0" ::"r"(tpidr));
+
+  return 0; // Set break point 2 at this line.
+}
Index: lldb/test/API/linux/aarch64/tls_register/TestAArch64LinuxTLSRegister.py
===
--- /dev/null
+++ lldb/test/API/linux/aarch64/tls_register/TestAArch64LinuxTLSRegister.py
@@ -0,0 +1,66 @@
+"""
+Test lldb's ability to read and write the AArch64 TLS register tpidr.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class AArch64LinuxTLSRegister(TestBase):
+NO_DEBUG_INFO_TESTCASE = True
+
+@skipUnlessArch("aarch64")
+@skipUnlessPlatform(["linux"])
+def test_tls(self):
+self.build()
+self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+lldbutil.run_break_set_by_file_and_line(
+self,
+"main.c",
+line_number("main.c", "// Set break point at this line."),
+num_expected_locations=1,
+)
+
+lldbutil.run_break_set_by_file_and_line(
+self,
+"main.c",
+line_number("main.c", "// Set break point 2 at this line."),
+num_expected_locations=1,
+)
+
+self.runCmd("run", RUN_SUCCEEDED)
+
+if self.process().GetState() == lldb.eStateExited:
+self.fail("Test program failed to run.")
+
+self.expect(
+"thread list",
+STOPPED_DUE_TO_BREAKPOINT,
+substrs=["stopped", "stop reason = breakpoint"],
+)
+
+# Since we can't predict what the value will be, the program has set
+# a target value for us to find.
+
+regs = self.thread().GetSelectedFrame().GetRegisters()
+tls_regs = regs.GetFirstValueByName("Thread Local Storage Registers")
+self.assertTrue(tls_regs.IsValid(), "No TLS registers found.")
+tpidr = tls_regs.GetChildMemberWithName("tpidr")
+self.assertTrue(tpidr.IsValid(), "No tpidr register found.")
+
+self.assertEqual(tpidr.GetValueAsUnsigned(), 0x1122334455667788)
+
+# Set our own value for the program to find.
+self.expect("register write tpidr 0x{:x}".format(0x8877665544332211))
+self.expect("continue")
+
+self.expect(
+"thread list",
+STOPPED_DUE_TO_BREAKPOINT,
+substrs=["stopped", "stop reason = breakpoint"],
+)
+
+self.expect("p tpidr_was_set", substrs=["true"])
\ No newline at end of file
Index: lldb/test/API/linux/aarch64/tls_register/Makefile
===
--- /dev/null
+++ lldb/test/API/linux/aarch64/tls_register/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
Index: lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
===
--- lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
+++ lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
@@ -28,6 +28,7 @@
 eRegsetMaskSVE = 1,
 eRegsetMaskPAuth = 2,
 eRegsetMaskMTE = 4,
+eRegsetMaskTLS = 8,
 eRegsetMaskDynamic = ~1,
   };
 
@@ -102,6 +103,8 @@
 
   void AddRegSetMTE();
 
+  voi

[Lldb-commits] [lldb] 7e22921 - [lldb][AArch64] Add thread local storage tpidr register

2023-06-19 Thread David Spickett via lldb-commits

Author: David Spickett
Date: 2023-06-19T12:51:58+01:00
New Revision: 7e229217f4215b519b886e7881bae4da3742a7d2

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

LOG: [lldb][AArch64] Add thread local storage tpidr register

This register is used as the pointer to the current thread
local storage block and is read from NT_ARM_TLS on Linux.

Though tpidr will be present on all AArch64 Linux, I am soon
going to add a second register tpidr2 to this set.

tpidr is only present when SME is implemented, therefore the
NT_ARM_TLS set will change size. This is why I've added this
as a dynamic register set to save changes later.

Reviewed By: omjavaid

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

Added: 
lldb/test/API/linux/aarch64/tls_register/Makefile
lldb/test/API/linux/aarch64/tls_register/TestAArch64LinuxTLSRegister.py
lldb/test/API/linux/aarch64/tls_register/main.c

Modified: 
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h

Removed: 




diff  --git 
a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp 
b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index 0ec152f0643a4..c9384a651e81b 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -86,6 +86,8 @@ 
NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
 if (auxv_at_hwcap2 && (*auxv_at_hwcap2 & HWCAP2_MTE))
   opt_regsets.Set(RegisterInfoPOSIX_arm64::eRegsetMaskMTE);
 
+opt_regsets.Set(RegisterInfoPOSIX_arm64::eRegsetMaskTLS);
+
 auto register_info_up =
 std::make_unique(target_arch, opt_regsets);
 return std::make_unique(
@@ -116,6 +118,7 @@ 
NativeRegisterContextLinux_arm64::NativeRegisterContextLinux_arm64(
   ::memset(&m_pac_mask, 0, sizeof(m_pac_mask));
 
   m_mte_ctrl_reg = 0;
+  m_tls_tpidr_reg = 0;
 
   // 16 is just a maximum value, query hardware for actual watchpoint count
   m_max_hwp_supported = 16;
@@ -129,6 +132,7 @@ 
NativeRegisterContextLinux_arm64::NativeRegisterContextLinux_arm64(
   m_sve_header_is_valid = false;
   m_pac_mask_is_valid = false;
   m_mte_ctrl_is_valid = false;
+  m_tls_tpidr_is_valid = false;
 
   if (GetRegisterInfo().IsSVEEnabled())
 m_sve_state = SVEState::Unknown;
@@ -232,8 +236,15 @@ NativeRegisterContextLinux_arm64::ReadRegister(const 
RegisterInfo *reg_info,
   assert(offset < GetSVEBufferSize());
   src = (uint8_t *)GetSVEBuffer() + offset;
 }
-  } else if (IsSVE(reg)) {
+  } else if (IsTLS(reg)) {
+error = ReadTLSTPIDR();
+if (error.Fail())
+  return error;
 
+offset = reg_info->byte_offset - GetRegisterInfo().GetTLSOffset();
+assert(offset < GetTLSTPIDRSize());
+src = (uint8_t *)GetTLSTPIDR() + offset;
+  } else if (IsSVE(reg)) {
 if (m_sve_state == SVEState::Disabled || m_sve_state == SVEState::Unknown)
   return Status("SVE disabled or not supported");
 
@@ -450,6 +461,17 @@ Status NativeRegisterContextLinux_arm64::WriteRegister(
 ::memcpy(dst, reg_value.GetBytes(), reg_info->byte_size);
 
 return WriteMTEControl();
+  } else if (IsTLS(reg)) {
+error = ReadTLSTPIDR();
+if (error.Fail())
+  return error;
+
+offset = reg_info->byte_offset - GetRegisterInfo().GetTLSOffset();
+assert(offset < GetTLSTPIDRSize());
+dst = (uint8_t *)GetTLSTPIDR() + offset;
+::memcpy(dst, reg_value.GetBytes(), reg_info->byte_size);
+
+return WriteTLSTPIDR();
   }
 
   return Status("Failed to write register value");
@@ -490,6 +512,12 @@ Status 
NativeRegisterContextLinux_arm64::ReadAllRegisterValues(
   return error;
   }
 
+  // tpidr is always present but there will be more in future.
+  reg_data_byte_size += GetTLSTPIDRSize();
+  error = ReadTLSTPIDR();
+  if (error.Fail())
+return error;
+
   data_sp.reset(new DataBufferHeap(reg_data_byte_size, 0));
   uint8_t *dst = data_sp->GetBytes();
 
@@ -507,6 +535,8 @@ Status 
NativeRegisterContextLinux_arm64::ReadAllRegisterValues(
   if (GetRegisterInfo().IsMTEEnabled())
 ::memcpy(dst, GetMTEControl(), GetMTEControlSize());
 
+  ::memcpy(dst, GetTLSTPIDR(), GetTLSTPIDRSize());
+
   return error;
 }
 
@@ -641,6 +671,10 @@ bool NativeRegisterContextLinux_arm64::IsMTE(unsigned reg) 
const {
   return GetRegisterInfo().IsMTEReg(reg);
 }
 
+bool NativeRegisterContextLinux_arm64::IsTLS(unsigned reg) const {
+  return GetRegisterInfo().IsTLSReg(reg);
+}
+
 llvm::Error NativeRegisterContextLinux_arm64::ReadHardwareDebugInfo() {
   if (

[Lldb-commits] [PATCH] D152516: [lldb][AArch64] Add thread local storage tpidr register

2023-06-19 Thread David Spickett via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7e229217f421: [lldb][AArch64] Add thread local storage tpidr 
register (authored by DavidSpickett).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152516/new/

https://reviews.llvm.org/D152516

Files:
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
  lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
  lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
  lldb/test/API/linux/aarch64/tls_register/Makefile
  lldb/test/API/linux/aarch64/tls_register/TestAArch64LinuxTLSRegister.py
  lldb/test/API/linux/aarch64/tls_register/main.c

Index: lldb/test/API/linux/aarch64/tls_register/main.c
===
--- /dev/null
+++ lldb/test/API/linux/aarch64/tls_register/main.c
@@ -0,0 +1,24 @@
+#include 
+#include 
+
+int main() {
+  // Save tpidr to restore later.
+  uint64_t tpidr = 0;
+  __asm__ volatile("mrs %0, tpidr_el0" : "=r"(tpidr));
+
+  // Set a pattern for lldb to find.
+  uint64_t pattern = 0x1122334455667788;
+  __asm__ volatile("msr tpidr_el0, %0" ::"r"(pattern));
+
+  // Set break point at this line.
+  // lldb will now set its own pattern for us to find.
+
+  uint64_t new_tpidr = pattern;
+  __asm__ volatile("mrs %0, tpidr_el0" : "=r"(new_tpidr));
+  volatile bool tpidr_was_set = new_tpidr == 0x8877665544332211;
+
+  // Restore the original.
+  __asm__ volatile("msr tpidr_el0, %0" ::"r"(tpidr));
+
+  return 0; // Set break point 2 at this line.
+}
Index: lldb/test/API/linux/aarch64/tls_register/TestAArch64LinuxTLSRegister.py
===
--- /dev/null
+++ lldb/test/API/linux/aarch64/tls_register/TestAArch64LinuxTLSRegister.py
@@ -0,0 +1,66 @@
+"""
+Test lldb's ability to read and write the AArch64 TLS register tpidr.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class AArch64LinuxTLSRegister(TestBase):
+NO_DEBUG_INFO_TESTCASE = True
+
+@skipUnlessArch("aarch64")
+@skipUnlessPlatform(["linux"])
+def test_tls(self):
+self.build()
+self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+lldbutil.run_break_set_by_file_and_line(
+self,
+"main.c",
+line_number("main.c", "// Set break point at this line."),
+num_expected_locations=1,
+)
+
+lldbutil.run_break_set_by_file_and_line(
+self,
+"main.c",
+line_number("main.c", "// Set break point 2 at this line."),
+num_expected_locations=1,
+)
+
+self.runCmd("run", RUN_SUCCEEDED)
+
+if self.process().GetState() == lldb.eStateExited:
+self.fail("Test program failed to run.")
+
+self.expect(
+"thread list",
+STOPPED_DUE_TO_BREAKPOINT,
+substrs=["stopped", "stop reason = breakpoint"],
+)
+
+# Since we can't predict what the value will be, the program has set
+# a target value for us to find.
+
+regs = self.thread().GetSelectedFrame().GetRegisters()
+tls_regs = regs.GetFirstValueByName("Thread Local Storage Registers")
+self.assertTrue(tls_regs.IsValid(), "No TLS registers found.")
+tpidr = tls_regs.GetChildMemberWithName("tpidr")
+self.assertTrue(tpidr.IsValid(), "No tpidr register found.")
+
+self.assertEqual(tpidr.GetValueAsUnsigned(), 0x1122334455667788)
+
+# Set our own value for the program to find.
+self.expect("register write tpidr 0x{:x}".format(0x8877665544332211))
+self.expect("continue")
+
+self.expect(
+"thread list",
+STOPPED_DUE_TO_BREAKPOINT,
+substrs=["stopped", "stop reason = breakpoint"],
+)
+
+self.expect("p tpidr_was_set", substrs=["true"])
\ No newline at end of file
Index: lldb/test/API/linux/aarch64/tls_register/Makefile
===
--- /dev/null
+++ lldb/test/API/linux/aarch64/tls_register/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
Index: lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
===
--- lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
+++ lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h
@@ -28,6 +28,7 @@
 eRegsetMaskSVE = 1,
 eRegsetMaskPAuth = 2,
 eRegsetMaskMTE = 4,
+eRegsetMaskTLS = 8,
 eRegsetMaskDynamic = ~1,
   };
 
@@ -102,6 +103,8 @@
 
   void AddRegSetMTE();
 
+  void AddRegSetTLS();
+
   uint32_t ConfigureVectorLength(uint32_t sve_vq);
 
   bool VectorSizeIsValid(uint

[Lldb-commits] [PATCH] D153043: [lldb] Fix handling of cfi_restore in the unwinder

2023-06-19 Thread Michael Buch via Phabricator via lldb-commits
Michael137 added a comment.

This is now failing with:

  clang: warning: argument unused during compilation: 
'-fmodules-cache-path=/Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/lldb-test-build.noindex/module-cache-clang/lldb-shell'
 [-Wunused-command-line-argument]
  Undefined symbols for architecture x86_64:
"abort", referenced from:
asm_main in eh-frame-dwarf-unwind-abort-edbc93.o
   (maybe you meant: g_hard_abort)
  ld: symbol(s) not found for architecture x86_64

https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/56648/execution/node/74/log/?consoleFull


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153043/new/

https://reviews.llvm.org/D153043

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


[Lldb-commits] [lldb] 7ac0ff5 - [lldb] Make test for D153043 independent of external symbols

2023-06-19 Thread Jaroslav Sevcik via lldb-commits

Author: Jaroslav Sevcik
Date: 2023-06-20T07:28:30+02:00
New Revision: 7ac0ff562ab8b0c2134b17333f4efa6fbbeab48c

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

LOG: [lldb] Make test for D153043 independent of external symbols

This removes dependence on the libc abort function.

Added: 


Modified: 
lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s

Removed: 




diff  --git a/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s 
b/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s
index 660bb14395e8d..95099ce42d3f5 100644
--- a/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s
+++ b/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind-abort.s
@@ -10,7 +10,7 @@ asm_main:
 .cfi_offset 6, -16
 movq%rsp, %rbp
 .cfi_def_cfa_register 6
-callq   abort
+callq   abort_function
 .L:
 .cfi_def_cfa 7, 8
 .cfi_restore 6
@@ -18,6 +18,12 @@ asm_main:
 ud2
 .cfi_endproc
 
+.globl abort_function
+abort_function:
+.cfi_startproc
+ud2
+.cfi_endproc
+
.data
.globl  g_hard_abort
 g_hard_abort:



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


[Lldb-commits] [lldb] a18b17b - [lldb] Make the test for D153043 linux-only

2023-06-19 Thread Jaroslav Sevcik via lldb-commits

Author: Jaroslav Sevcik
Date: 2023-06-20T07:57:47+02:00
New Revision: a18b17b1befd833165ec34da581cb83ebab43ace

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

LOG: [lldb] Make the test for D153043 linux-only

Added: 


Modified: 
lldb/test/Shell/Unwind/eh-frame-dwarf-unwind-abort.test

Removed: 




diff  --git a/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind-abort.test 
b/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind-abort.test
index ccf973d9313c2..477a656a711f9 100644
--- a/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind-abort.test
+++ b/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind-abort.test
@@ -1,7 +1,6 @@
 # Test restoring of register values.
 
-# UNSUPPORTED: system-windows
-# REQUIRES: target-x86_64, native
+# REQUIRES: target-x86_64, system-linux, native
 
 # RUN: %clang_host %p/Inputs/call-asm.c 
%p/Inputs/eh-frame-dwarf-unwind-abort.s -o %t
 # RUN: %lldb %t -s %s -o exit | FileCheck %s



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