[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

2024-05-13 Thread Omair Javaid via lldb-commits

omjavaid wrote:

> > LLDB became unresponsive on windows when a `thread backtrace` command was 
> > issued after hitting the exception i have temporarily reverted the change 
> > to make buildbot green.
> 
> Could you please give me some more information about the problem? I don't 
> have access to a windows arm machine, and the failure message doesn't give me 
> much to go on.

I will try to debug and get back with more information. If you need specific 
information or logs please let me know.

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


[Lldb-commits] [lldb] 6cfac49 - [lldb][DWARF] Mark delayed-definition-die-searching.test unsupported on Windows

2024-05-13 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2024-05-14T03:58:26+05:00
New Revision: 6cfac497e96978f2bfc50a00b51c198f2ed50f82

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

LOG: [lldb][DWARF] Mark delayed-definition-die-searching.test unsupported on 
Windows

This marks delayed-definition-die-searching.test as unsupported on
Windows. Clang uses link.exe as default linker if not marked explicitly
to use lld. When used with link.exe clang produces PDB format debug info
even when -gdwarf is specified.
This test will be unsupported until we make lldb-aarch64-windows buildbot
to use lld.

Added: 


Modified: 
lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test

Removed: 




diff  --git 
a/lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test 
b/lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test
index 836fcd7b587bc..d253981b498c8 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test
+++ b/lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test
@@ -1,5 +1,7 @@
 # Test definition DIE searching is delayed until complete type is required.
 
+# UNSUPPORTED: system-windows
+
 # RUN: split-file %s %t
 # RUN: %clangxx_host %t/main.cpp %t/t1_def.cpp -gdwarf -o %t.out
 # RUN: %lldb -b %t.out -s %t/lldb.cmd | FileCheck %s



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


[Lldb-commits] [lldb] bc17361 - [lldb][DWARF] Fix delayed-definition-die-searching.test for Windows

2024-05-13 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2024-05-13T16:53:15+05:00
New Revision: bc17361c2baa0351f7f19b716fbe76bc9f99e903

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

LOG: [lldb][DWARF] Fix delayed-definition-die-searching.test for Windows

This is follow up fix on top of 9a7262c2601874e5aa64c5db19746770212d4b44

This fixes delayed-definition-die-searching.test to use -gdwarf. This is
required to explicitly select DWARF instead of PDB on windows.

Fixe LLDB build lldb-aarch64-windows:
https://lab.llvm.org/buildbot/#/builders/219/builds/11303

Added: 


Modified: 
lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test

Removed: 




diff  --git 
a/lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test 
b/lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test
index a2b36dadedd21..836fcd7b587bc 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test
+++ b/lldb/test/Shell/SymbolFile/DWARF/delayed-definition-die-searching.test
@@ -1,7 +1,7 @@
 # Test definition DIE searching is delayed until complete type is required.
 
 # RUN: split-file %s %t
-# RUN: %clangxx_host %t/main.cpp %t/t1_def.cpp -g -o %t.out
+# RUN: %clangxx_host %t/main.cpp %t/t1_def.cpp -gdwarf -o %t.out
 # RUN: %lldb -b %t.out -s %t/lldb.cmd | FileCheck %s
 
 # CHECK: (lldb) p v1
@@ -31,4 +31,4 @@ int main() {
 struct t1 { // this CU contains definition DIE for t1.
   int x;
 };
-t1 v2;
\ No newline at end of file
+t1 v2;



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


[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

2024-05-13 Thread Omair Javaid via lldb-commits

omjavaid wrote:

LLDB became unresponsive on windows when a `thread backtrace` command was 
issued  after hitting the exception
i have temporarily reverted the change to make buildbot green.

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


[Lldb-commits] [lldb] 4b44502 - Revert "[lldb/aarch64] Fix unwinding when signal interrupts a leaf function (#91321)"

2024-05-13 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2024-05-13T16:05:02+05:00
New Revision: 4b44502ac81259630b422e791a82e0252e6478c3

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

LOG: Revert "[lldb/aarch64] Fix unwinding when signal interrupts a leaf 
function (#91321)"

This reverts commit fd1bd53ba5a06f344698a55578f6a5d79c457e30.

TestInterruptBacktrace was broken on AArch64/Windows as a result of this change.
See lldb-aarch64-windows buildbot here:
https://lab.llvm.org/buildbot/#/builders/219/builds/11261

Added: 


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

lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
lldb/source/Target/RegisterContextUnwind.cpp
lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp

Removed: 
lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c
lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test



diff  --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp 
b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
index 62ecac3e0831d..6ca4fb052457e 100644
--- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
+++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
@@ -444,8 +444,6 @@ bool EmulateInstructionARM64::CreateFunctionEntryUnwind(
 
   // Our previous Call Frame Address is the stack pointer
   row->GetCFAValue().SetIsRegisterPlusOffset(gpr_sp_arm64, 0);
-  row->SetRegisterLocationToSame(gpr_lr_arm64, /*must_replace=*/false);
-  row->SetRegisterLocationToSame(gpr_fp_arm64, /*must_replace=*/false);
 
   unwind_plan.AppendRow(row);
   unwind_plan.SetSourceName("EmulateInstructionARM64");

diff  --git 
a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
 
b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 49edd40544e32..c4a171ec7d01b 100644
--- 
a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ 
b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -424,6 +424,8 @@ size_t UnwindAssemblyInstEmulation::WriteMemory(
 log->PutString(strm.GetString());
   }
 
+  const bool cant_replace = false;
+
   switch (context.type) {
   default:
   case EmulateInstruction::eContextInvalid:
@@ -465,7 +467,7 @@ size_t UnwindAssemblyInstEmulation::WriteMemory(
 m_pushed_regs[reg_num] = addr;
 const int32_t offset = addr - m_initial_sp;
 m_curr_row->SetRegisterLocationToAtCFAPlusOffset(reg_num, offset,
- /*can_replace=*/true);
+ cant_replace);
 m_curr_row_modified = true;
   }
 }

diff  --git a/lldb/source/Target/RegisterContextUnwind.cpp 
b/lldb/source/Target/RegisterContextUnwind.cpp
index e2d712cb72eae..13e101413a477 100644
--- a/lldb/source/Target/RegisterContextUnwind.cpp
+++ b/lldb/source/Target/RegisterContextUnwind.cpp
@@ -1555,12 +1555,12 @@ RegisterContextUnwind::SavedLocationForRegister(
   }
 
   if (unwindplan_regloc.IsSame()) {
-if (!m_all_registers_available &&
+if (!IsFrameZero() &&
 (regnum.GetAsKind(eRegisterKindGeneric) == LLDB_REGNUM_GENERIC_PC ||
  regnum.GetAsKind(eRegisterKindGeneric) == LLDB_REGNUM_GENERIC_RA)) {
   UnwindLogMsg("register %s (%d) is marked as 'IsSame' - it is a pc or "
-   "return address reg on a frame which does not have all "
-   "registers available -- treat as if we have no information",
+   "return address reg on a non-zero frame -- treat as if we "
+   "have no information",
regnum.GetName(), regnum.GetAsKind(eRegisterKindLLDB));
   return UnwindLLDB::RegisterSearchResult::eRegisterNotFound;
 } else {

diff  --git a/lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c 
b/lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c
deleted file mode 100644
index 9a751330623f4..0
--- a/lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include 
-#include 
-
-int __attribute__((naked)) signal_generating_add(int a, int b) {
-  asm("add w0, w1, w0\n\t"
-  "udf #0xdead\n\t"
-  "ret");
-}
-
-void sigill_handler(int) { _exit(0); }
-
-int main() {
-  signal(SIGILL, sigill_handler);
-  return signal_generating_add(42, 47);
-}

diff  --git a/lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test 
b/lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test
deleted file mode 100644
index 0580d0cf734ae..0
--- a/lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test

[Lldb-commits] [lldb] 0a6103e - Revert "[lldb] Attempt to fix signal-in-leaf-function-aarch64 on darwin"

2024-05-13 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2024-05-13T16:05:02+05:00
New Revision: 0a6103eaeb7f22c009f9add87c84780b6f7f293a

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

LOG: Revert "[lldb] Attempt to fix signal-in-leaf-function-aarch64 on darwin"

This reverts commit b903badd73a2467fdd4e363231f2bf9b0704b546.

TestInterruptBacktrace was broken on AArch64/Windows as a result of this change.
see lldb-aarch64-windows buildbot here:
https://lab.llvm.org/buildbot/#/builders/219/builds/11261

Added: 


Modified: 
lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c
lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test

Removed: 




diff  --git a/lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c 
b/lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c
index fe020affcad0f..9a751330623f4 100644
--- a/lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c
+++ b/lldb/test/Shell/Unwind/Inputs/signal-in-leaf-function-aarch64.c
@@ -7,7 +7,7 @@ int __attribute__((naked)) signal_generating_add(int a, int b) {
   "ret");
 }
 
-void sigill_handler(int signo) { _exit(0); }
+void sigill_handler(int) { _exit(0); }
 
 int main() {
   signal(SIGILL, sigill_handler);

diff  --git a/lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test 
b/lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test
index 09f17c174bbfd..0580d0cf734ae 100644
--- a/lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test
+++ b/lldb/test/Shell/Unwind/signal-in-leaf-function-aarch64.test
@@ -4,9 +4,6 @@
 # RUN: %clang_host %S/Inputs/signal-in-leaf-function-aarch64.c -o %t
 # RUN: %lldb -s %s -o exit %t | FileCheck %s
 
-# Convert EXC_BAD_INSTRUCTION to SIGILL on darwin
-settings set platform.plugin.darwin.ignored-exceptions EXC_BAD_INSTRUCTION
-
 breakpoint set -n sigill_handler
 # CHECK: Breakpoint 1: where = {{.*}}`sigill_handler
 



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


[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

2024-05-13 Thread Omair Javaid via lldb-commits

omjavaid wrote:

@labath this seems to have broken lldb-aarch64-windows bot with 
TestInterruptBacktrace.py failing on 
num_frames = thread.GetNumFrames()


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


[Lldb-commits] [lldb] 7fc2fbb - Revert "DebugInfoD tests + fixing issues exposed by tests (#85693)"

2024-03-22 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2024-03-23T03:31:56+05:00
New Revision: 7fc2fbb3f1961e0ad0722c2d749ddd6264195a1c

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

LOG: Revert "DebugInfoD tests + fixing issues exposed by tests (#85693)"

This reverts commit 6d939a6ec69adf284cdbef2034b49fd02ba503fc.

This broke following LLDB bots:
https://lab.llvm.org/buildbot/#/builders/96/builds/54867
https://lab.llvm.org/buildbot/#/builders/17/builds/50824

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/make/Makefile.rules
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolLocator/CMakeLists.txt
lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp

Removed: 
lldb/test/API/debuginfod/Normal/Makefile
lldb/test/API/debuginfod/Normal/TestDebuginfod.py
lldb/test/API/debuginfod/Normal/main.c
lldb/test/API/debuginfod/SplitDWARF/Makefile
lldb/test/API/debuginfod/SplitDWARF/TestDebuginfodDWP.py
lldb/test/API/debuginfod/SplitDWARF/main.c



diff  --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 75efcde1f04023..bfd249ccd43f2e 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -51,7 +51,7 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
 #
 # GNUWin32 uname gives "windows32" or "server version windows32" while
 # some versions of MSYS uname return "MSYS_NT*", but most environments
-# standardize on "Windows_NT", so we'll make it consistent here.
+# standardize on "Windows_NT", so we'll make it consistent here. 
 # When running tests from Visual Studio, the environment variable isn't
 # inherited all the way down to the process spawned for make.
 #--
@@ -210,12 +210,6 @@ else
ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
DSYM = $(EXE).debug
endif
-
-   ifeq "$(MAKE_DWP)" "YES"
-   MAKE_DWO := YES
-   DWP_NAME = $(EXE).dwp
-   DYLIB_DWP_NAME = $(DYLIB_NAME).dwp
-   endif
 endif
 
 LIMIT_DEBUG_INFO_FLAGS =
@@ -363,7 +357,6 @@ ifneq "$(OS)" "Darwin"
 
OBJCOPY ?= $(call replace_cc_with,objcopy)
ARCHIVER ?= $(call replace_cc_with,ar)
-   DWP ?= $(call replace_cc_with,dwp)
override AR = $(ARCHIVER)
 endif
 
@@ -534,10 +527,6 @@ ifneq "$(CXX)" ""
endif
 endif
 
-ifeq "$(GEN_GNU_BUILD_ID)" "YES"
-   LDFLAGS += -Wl,--build-id
-endif
-
 #--
 # DYLIB_ONLY variable can be used to skip the building of a.out.
 # See the sections below regarding dSYM file as well as the building of
@@ -576,25 +565,11 @@ else
 endif
 else
 ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
-ifeq "$(SAVE_FULL_DEBUG_BINARY)" "YES"
-   cp "$(EXE)" "$(EXE).full"
-endif
$(OBJCOPY) --only-keep-debug "$(EXE)" "$(DSYM)"
$(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DSYM)" "$(EXE)" "$(EXE)"
 endif
-ifeq "$(MAKE_DWP)" "YES"
-   $(DWP) -o "$(DWP_NAME)" $(DWOS)
-endif
 endif
 
-
-#--
-# Support emitting the content of the GNU build-id into a file
-# This needs to be used in conjunction with GEN_GNU_BUILD_ID := YES
-#--
-$(EXE).uuid : $(EXE)
-   $(OBJCOPY) --dump-section=.note.gnu.build-id=$@ $<
-
 #--
 # Make the dylib
 #--
@@ -635,15 +610,9 @@ endif
 else
$(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -shared -o "$(DYLIB_FILENAME)"
 ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
-   ifeq "$(SAVE_FULL_DEBUG_BINARY)" "YES"
-   cp "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).full"
-   endif
$(OBJCOPY) --only-keep-debug "$(DYLIB_FILENAME)" 
"$(DYLIB_FILENAME).debug"
$(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DYLIB_FILENAME).debug" 
"$(DYLIB_FILENAME)" "$(DYLIB_FILENAME)"
 endif
-ifeq "$(MAKE_DWP)" "YES"
-   $(DWP) -o $(DYLIB_DWP_FILE) $(DYLIB_DWOS)
-endif
 endif
 
 #--

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 08ce7b82b0c16a..5f67658f86ea96 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -4377,38 +4377,26 @@ const std::shared_ptr 
::GetDwpSymbolFile() {
 FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();

[Lldb-commits] [lldb] 4406e4a - Revert "Missed a null-ptr check in previous PR for Debuginfod testing (#86292)"

2024-03-22 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2024-03-23T03:31:25+05:00
New Revision: 4406e4a8bd5acadd980d84356b36030cadf9a61d

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

LOG: Revert "Missed a null-ptr check in previous PR for Debuginfod testing 
(#86292)"

This reverts commit b1575f9082071702bd6aaa2600ce9fe011a091e9.

Added: 


Modified: 
lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp 
b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
index a9956aa9075fe2..91b8b4a979e0c7 100644
--- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
+++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
@@ -53,7 +53,7 @@ static bool IsDwpSymbolFile(const lldb::ModuleSP _sp,
   ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
   module_sp, _spec, 0, FileSystem::Instance().GetByteSize(file_spec),
   dwp_file_data_sp, dwp_file_data_offset);
-  if (!dwp_obj_file || !ObjectFileELF::classof(dwp_obj_file.get()))
+  if (!ObjectFileELF::classof(dwp_obj_file.get()))
 return false;
   // The presence of a debug_cu_index section is the key identifying feature of
   // a DWP file. Make sure we don't fill in the section list on dwp_obj_file



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


[Lldb-commits] [lldb] DebugInfoD tests + fixing issues exposed by tests (PR #85693)

2024-03-22 Thread Omair Javaid via lldb-commits

omjavaid wrote:

both commits from this PR broke LLDB buildbots on Arm and AArch64 Linux.
New tests apparently are failing on Arm/AArch64 Linux.
https://lab.llvm.org/buildbot/#/builders/96/builds/54867
https://lab.llvm.org/buildbot/#/builders/17/builds/50824

I will be reverting 
[b1575f9](https://github.com/llvm/llvm-project/commit/b1575f9082071702bd6aaa2600ce9fe011a091e9)
[6d939a6](https://github.com/llvm/llvm-project/commit/6d939a6ec69adf284cdbef2034b49fd02ba503fc)


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


[Lldb-commits] [lldb] Add new API in SBTarget for loading core from SBFile (PR #71769)

2023-11-19 Thread Omair Javaid via lldb-commits

omjavaid wrote:

I have reverted this temporarily as it broke  TestLinuxCore.py on 
lldb-*-windows. Kindly have a look at
https://lab.llvm.org/buildbot/#/builders/219/builds/7014

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


[Lldb-commits] [lldb] c1fe190 - Revert "Add new API in SBTarget for loading core from SBFile (#71769)"

2023-11-19 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-11-20T11:12:34+05:00
New Revision: c1fe1900491ae773e45e41604af25312e5fc6559

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

LOG: Revert "Add new API in SBTarget for loading core from SBFile (#71769)"

This reverts commit e2fb816c4f0286ddf8b1030148a343d5efc14e01.
It breaks TestLinuxCore.py on lldb-*-windows. See buildbot below:
https://lab.llvm.org/buildbot/#/builders/219/builds/7014

Added: 


Modified: 
lldb/include/lldb/API/SBTarget.h
lldb/source/API/SBTarget.cpp
lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py

Removed: 




diff  --git a/lldb/include/lldb/API/SBTarget.h 
b/lldb/include/lldb/API/SBTarget.h
index 8e44cd5513c5b20..83087623088c5b4 100644
--- a/lldb/include/lldb/API/SBTarget.h
+++ b/lldb/include/lldb/API/SBTarget.h
@@ -184,7 +184,6 @@ class LLDB_API SBTarget {
 
   SBProcess LoadCore(const char *core_file);
   SBProcess LoadCore(const char *core_file, lldb::SBError );
-  SBProcess LoadCore(const SBFile , lldb::SBError );
 
   /// Launch a new process with sensible defaults.
   ///

diff  --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 9632627e3cefc42..2d029554492a05c 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -16,7 +16,6 @@
 #include "lldb/API/SBEnvironment.h"
 #include "lldb/API/SBEvent.h"
 #include "lldb/API/SBExpressionOptions.h"
-#include "lldb/API/SBFile.h"
 #include "lldb/API/SBFileSpec.h"
 #include "lldb/API/SBListener.h"
 #include "lldb/API/SBModule.h"
@@ -261,31 +260,6 @@ SBProcess SBTarget::LoadCore(const char *core_file, 
lldb::SBError ) {
   return sb_process;
 }
 
-SBProcess SBTarget::LoadCore(const SBFile , lldb::SBError ) {
-  LLDB_INSTRUMENT_VA(this, file, error);
-
-  SBProcess sb_process;
-  TargetSP target_sp(GetSP());
-  if (target_sp) {
-FileSP file_sp = file.GetFile();
-FileSpec filespec;
-file_sp->GetFileSpec(filespec);
-FileSystem::Instance().Resolve(filespec);
-ProcessSP process_sp(target_sp->CreateProcess(
-target_sp->GetDebugger().GetListener(), "", , false));
-if (process_sp) {
-  error.SetError(process_sp->LoadCore());
-  if (error.Success())
-sb_process.SetSP(process_sp);
-} else {
-  error.SetErrorString("Failed to create the process");
-}
-  } else {
-error.SetErrorString("SBTarget is invalid");
-  }
-  return sb_process;
-}
-
 SBProcess SBTarget::LaunchSimple(char const **argv, char const **envp,
  const char *working_directory) {
   LLDB_INSTRUMENT_VA(this, argv, envp, working_directory);

diff  --git 
a/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py 
b/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
index a6a8518f9397da3..58f104eb49de245 100644
--- a/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
+++ b/lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
@@ -53,11 +53,6 @@ def test_x86_64(self):
 """Test that lldb can read the process information from an x86_64 
linux core file."""
 self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions, 
"a.out")
 
-@skipIfLLVMTargetMissing("X86")
-def test_x86_64_fd(self):
-"""Test that lldb can read the process information from an x86_64 
linux core file."""
-self.do_test_fd("linux-x86_64", self._x86_64_pid, 
self._x86_64_regions, "a.out")
-
 @skipIfLLVMTargetMissing("SystemZ")
 def test_s390x(self):
 """Test that lldb can read the process information from an s390x linux 
core file."""
@@ -762,19 +757,6 @@ def do_test(self, filename, pid, region_count, 
thread_name):
 
 self.dbg.DeleteTarget(target)
 
-def do_test_fd(self, filename, pid, region_count, thread_name):
-file_object = open(filename + ".core", "r")
-fd = file_object.fileno()
-file = lldb.SBFile(fd, "r", True)
-target = self.dbg.CreateTarget(filename + ".out")
-error = lldb.SBError()
-process = target.LoadCore(file, error)
-
-self.check_all(process, pid, region_count, thread_name)
-
-self.dbg.DeleteTarget(target)
-
-
 
 def replace_path(binary, replace_from, replace_to):
 src = replace_from.encode()



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


[Lldb-commits] [lldb] [lldb][AArch64] Read mte_ctrl register from core files (PR #69689)

2023-10-24 Thread Omair Javaid via lldb-commits

https://github.com/omjavaid approved this pull request.

Looks good to me.

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


[Lldb-commits] [lldb] [lldb][AArch64] Invalidate SVG prior to reconfiguring ZA regdef (PR #66768)

2023-10-24 Thread Omair Javaid via lldb-commits

https://github.com/omjavaid approved this pull request.


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


[Lldb-commits] [lldb] [lldb][AArch64] Invalidate SVG prior to reconfiguring ZA regdef (PR #66768)

2023-10-24 Thread Omair Javaid via lldb-commits


@@ -783,6 +783,11 @@ void GDBRemoteRegisterContext::AArch64Reconfigure() {
   std::optional svg_reg_value;
   const RegisterInfo *svg_reg_info = m_reg_info_sp->GetRegisterInfo("svg");
   if (svg_reg_info) {
+// When vg is written it is automatically made invalid. Writing vg will 
also
+// change svg if we're in streaming mode but it will not be made invalid
+// so do this manually so the following read gets the latest svg value.

omjavaid wrote:

Sorry for the delay on this PR. I agree with your approach.

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


[Lldb-commits] [lldb] [lldb][AArch64] Add isAArch64SMEFA64 check to SME testing (PR #68094)

2023-10-20 Thread Omair Javaid via lldb-commits

https://github.com/omjavaid approved this pull request.


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


[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-20 Thread Omair Javaid via lldb-commits

https://github.com/omjavaid approved this pull request.


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


[Lldb-commits] [lldb] [lldb][AArch64] Invalidate SVG prior to reconfiguring ZA regdef (PR #66768)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -783,6 +783,11 @@ void GDBRemoteRegisterContext::AArch64Reconfigure() {
   std::optional svg_reg_value;
   const RegisterInfo *svg_reg_info = m_reg_info_sp->GetRegisterInfo("svg");
   if (svg_reg_info) {
+// When vg is written it is automatically made invalid. Writing vg will 
also
+// change svg if we're in streaming mode but it will not be made invalid
+// so do this manually so the following read gets the latest svg value.

omjavaid wrote:

I am wondering whether we should find a way to make svg and vg inter dependent 
to make sure they are invalidated together whenever an update happens. Do you 
see a way within RegisterInfo class to link registers together. I dont fully 
remember but i believe this could be done.

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


[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits

https://github.com/omjavaid commented:

The document looks great but I have left some comments. They are just more like 
my opinions you may consider some or all of them while updating this document.

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


[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -0,0 +1,190 @@
+Using LLDB On AArch64 Linux
+===
+
+This page explains the details of debugging certain AArch64 extensions using
+LLDB. If something is not mentioned here, it likely works as you would expect.
+
+This is not a replacement for ptrace and Linux Kernel documentation. This 
covers
+how LLDB has chosen to use those things and how that effects your experience as
+a user.
+
+Scalable Vector Extension (SVE)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+In LLDB you will be able to see the following new registers:
+
+* ``z0-z31`` vector registers, each one has size equal to the vector length.
+* ``p0-p15`` predicate registers, each one containing 1 bit per byte in the 
vector
+  length. Making each one vector length / 8 sized.
+* ``ffr`` the first fault register, same size as a predicate register.
+* ``vg``, the vector length in "granules". Each granule is 8 bytes.
+
+.. code-block::
+
+   Scalable Vector Extension Registers:
+ vg = 0x0002
+ z0 = {0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 <...> }
+   <...>
+ p0 = {0xff 0xff}
+   <...>
+ffr = {0xff 0xff}
+
+The example above has a vector length of 16 bytes. Within LLDB you will always
+see "vg" as in the ``vg`` register, which is 2 in this case (8*2 = 16).
+Elsewhere you may see "vq" which is the vector length in quadwords (16 bytes)
+elsewhere. Where you see "vl", it is in bytes.
+
+Changing the Vector Length
+..
+
+While you can count the size of a P or Z register, it is intended that ``vg`` 
be
+used to find the current vector length.
+
+vg can be written. Writing the current vector length changes nothing. If you
+increase the vector length, the registers will likely be reset to 0. If you
+decrease it, LLDB will truncate the Z registers but everything else will be 
reset
+to 0.
+
+Generally you should not assume that SVE state after changing the vector length
+is in any way the same as it was previously. If you need to do it, do it before
+a function's first use of SVE.
+
+Z Register Presentation
+...
+
+LLDB makes no attempt to predict how an SVE Z register will be used. Even if 
the
+next SVE instruction (which may some distance away) would use, for example, 32
+bit elements, LLDB prints ``z0`` as single bytes.
+
+If you know what format you are going to use, give a format option::
+
+  (lldb) register read z0 -f uint32_t[]
+  z0 = {0x01010101 0x01010101 0x01010101 0x01010101}
+
+FPSIMD and SVE Modes
+
+
+Prior to the debugee's first use of SVE, it is in what the Linux Kernel terms
+SIMD mode. Only the FPU is being used. In this state LLDB will still show the
+SVE registers however the values are simply the FPU values zero extended up to
+the vector length.
+
+On first access to SVE, the process goes into SVE mode. Now the Z values are
+in the real Z registers.
+
+You can also trigger this with LLDB by writing to an SVE register. Note that
+there is no way to undo this change from within LLDB. However, the debugee
+itself could do something to end up back in SIMD mode.
+
+Expression evaluation
+.
+
+If you evaluate an expression, all SVE state is saved prior to, and restored
+after the expression has been evaluated. Including the register values and
+vector length.
+
+Scalable Matrix Extension (SME)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+SME adds a "Streaming Mode" to SVE. This mode has its own vector length.
+
+In LLDB you will see the following new registers:
+
+* ``tpidr2``, an extra per thread pointer reserved for use by the SME ABI.
+  This is not scalable, just pointer sized aka 64 bit.
+* ``z0-z31`` streaming SVE registers. These have the same names as the
+  non-streaming registers and therefore you will only see the active set in
+  LLDB. You cannot read or write the inactive mode's registers. Their size
+  is the same as the streaming vector length.
+* ``za`` the Array Storage register. The "Matrix" part of "Scalable Matrix
+  Extension". This is a square made up of rows of length equal to the streaming
+  vector length (svl). Meaning that the total size is svl * svl.
+* ``svg`` the vector length in granules. This acts the same as ``vg`` for SVE.
+  Except that where ``vg`` shows the length for the active mode, ``svg`` will
+  always show the streaming vector length, even in non-streaming mode. This
+  register is read only.

[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -0,0 +1,190 @@
+Using LLDB On AArch64 Linux
+===
+
+This page explains the details of debugging certain AArch64 extensions using
+LLDB. If something is not mentioned here, it likely works as you would expect.
+
+This is not a replacement for ptrace and Linux Kernel documentation. This 
covers
+how LLDB has chosen to use those things and how that effects your experience as
+a user.
+
+Scalable Vector Extension (SVE)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+In LLDB you will be able to see the following new registers:
+
+* ``z0-z31`` vector registers, each one has size equal to the vector length.
+* ``p0-p15`` predicate registers, each one containing 1 bit per byte in the 
vector
+  length. Making each one vector length / 8 sized.
+* ``ffr`` the first fault register, same size as a predicate register.
+* ``vg``, the vector length in "granules". Each granule is 8 bytes.
+
+.. code-block::
+
+   Scalable Vector Extension Registers:
+ vg = 0x0002
+ z0 = {0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 <...> }
+   <...>
+ p0 = {0xff 0xff}
+   <...>
+ffr = {0xff 0xff}
+
+The example above has a vector length of 16 bytes. Within LLDB you will always
+see "vg" as in the ``vg`` register, which is 2 in this case (8*2 = 16).
+Elsewhere you may see "vq" which is the vector length in quadwords (16 bytes)
+elsewhere. Where you see "vl", it is in bytes.
+
+Changing the Vector Length
+..
+
+While you can count the size of a P or Z register, it is intended that ``vg`` 
be
+used to find the current vector length.
+
+vg can be written. Writing the current vector length changes nothing. If you
+increase the vector length, the registers will likely be reset to 0. If you
+decrease it, LLDB will truncate the Z registers but everything else will be 
reset
+to 0.
+
+Generally you should not assume that SVE state after changing the vector length
+is in any way the same as it was previously. If you need to do it, do it before
+a function's first use of SVE.
+
+Z Register Presentation
+...
+
+LLDB makes no attempt to predict how an SVE Z register will be used. Even if 
the
+next SVE instruction (which may some distance away) would use, for example, 32
+bit elements, LLDB prints ``z0`` as single bytes.
+
+If you know what format you are going to use, give a format option::
+
+  (lldb) register read z0 -f uint32_t[]
+  z0 = {0x01010101 0x01010101 0x01010101 0x01010101}
+
+FPSIMD and SVE Modes
+
+
+Prior to the debugee's first use of SVE, it is in what the Linux Kernel terms
+SIMD mode. Only the FPU is being used. In this state LLDB will still show the
+SVE registers however the values are simply the FPU values zero extended up to
+the vector length.
+
+On first access to SVE, the process goes into SVE mode. Now the Z values are
+in the real Z registers.
+
+You can also trigger this with LLDB by writing to an SVE register. Note that
+there is no way to undo this change from within LLDB. However, the debugee
+itself could do something to end up back in SIMD mode.
+
+Expression evaluation
+.
+
+If you evaluate an expression, all SVE state is saved prior to, and restored
+after the expression has been evaluated. Including the register values and
+vector length.
+
+Scalable Matrix Extension (SME)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+SME adds a "Streaming Mode" to SVE. This mode has its own vector length.
+
+In LLDB you will see the following new registers:
+
+* ``tpidr2``, an extra per thread pointer reserved for use by the SME ABI.
+  This is not scalable, just pointer sized aka 64 bit.
+* ``z0-z31`` streaming SVE registers. These have the same names as the
+  non-streaming registers and therefore you will only see the active set in
+  LLDB. You cannot read or write the inactive mode's registers. Their size
+  is the same as the streaming vector length.
+* ``za`` the Array Storage register. The "Matrix" part of "Scalable Matrix
+  Extension". This is a square made up of rows of length equal to the streaming
+  vector length (svl). Meaning that the total size is svl * svl.
+* ``svg`` the vector length in granules. This acts the same as ``vg`` for SVE.
+  Except that where ``vg`` shows the length for the active mode, ``svg`` will
+  always show the streaming vector length, even in non-streaming mode. This
+  register is read only.

[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -0,0 +1,190 @@
+Using LLDB On AArch64 Linux
+===
+
+This page explains the details of debugging certain AArch64 extensions using
+LLDB. If something is not mentioned here, it likely works as you would expect.
+
+This is not a replacement for ptrace and Linux Kernel documentation. This 
covers
+how LLDB has chosen to use those things and how that effects your experience as
+a user.
+
+Scalable Vector Extension (SVE)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+In LLDB you will be able to see the following new registers:
+
+* ``z0-z31`` vector registers, each one has size equal to the vector length.
+* ``p0-p15`` predicate registers, each one containing 1 bit per byte in the 
vector
+  length. Making each one vector length / 8 sized.
+* ``ffr`` the first fault register, same size as a predicate register.
+* ``vg``, the vector length in "granules". Each granule is 8 bytes.
+
+.. code-block::
+
+   Scalable Vector Extension Registers:
+ vg = 0x0002
+ z0 = {0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 <...> }
+   <...>
+ p0 = {0xff 0xff}
+   <...>
+ffr = {0xff 0xff}
+
+The example above has a vector length of 16 bytes. Within LLDB you will always
+see "vg" as in the ``vg`` register, which is 2 in this case (8*2 = 16).
+Elsewhere you may see "vq" which is the vector length in quadwords (16 bytes)
+elsewhere. Where you see "vl", it is in bytes.
+
+Changing the Vector Length
+..
+
+While you can count the size of a P or Z register, it is intended that ``vg`` 
be
+used to find the current vector length.
+
+vg can be written. Writing the current vector length changes nothing. If you
+increase the vector length, the registers will likely be reset to 0. If you
+decrease it, LLDB will truncate the Z registers but everything else will be 
reset
+to 0.
+
+Generally you should not assume that SVE state after changing the vector length
+is in any way the same as it was previously. If you need to do it, do it before
+a function's first use of SVE.
+
+Z Register Presentation
+...
+
+LLDB makes no attempt to predict how an SVE Z register will be used. Even if 
the
+next SVE instruction (which may some distance away) would use, for example, 32
+bit elements, LLDB prints ``z0`` as single bytes.
+
+If you know what format you are going to use, give a format option::
+
+  (lldb) register read z0 -f uint32_t[]
+  z0 = {0x01010101 0x01010101 0x01010101 0x01010101}
+
+FPSIMD and SVE Modes
+
+
+Prior to the debugee's first use of SVE, it is in what the Linux Kernel terms
+SIMD mode. Only the FPU is being used. In this state LLDB will still show the
+SVE registers however the values are simply the FPU values zero extended up to
+the vector length.
+
+On first access to SVE, the process goes into SVE mode. Now the Z values are
+in the real Z registers.
+
+You can also trigger this with LLDB by writing to an SVE register. Note that
+there is no way to undo this change from within LLDB. However, the debugee
+itself could do something to end up back in SIMD mode.
+
+Expression evaluation
+.
+
+If you evaluate an expression, all SVE state is saved prior to, and restored
+after the expression has been evaluated. Including the register values and
+vector length.
+
+Scalable Matrix Extension (SME)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+SME adds a "Streaming Mode" to SVE. This mode has its own vector length.
+
+In LLDB you will see the following new registers:
+
+* ``tpidr2``, an extra per thread pointer reserved for use by the SME ABI.
+  This is not scalable, just pointer sized aka 64 bit.
+* ``z0-z31`` streaming SVE registers. These have the same names as the
+  non-streaming registers and therefore you will only see the active set in
+  LLDB. You cannot read or write the inactive mode's registers. Their size
+  is the same as the streaming vector length.
+* ``za`` the Array Storage register. The "Matrix" part of "Scalable Matrix
+  Extension". This is a square made up of rows of length equal to the streaming
+  vector length (svl). Meaning that the total size is svl * svl.
+* ``svg`` the vector length in granules. This acts the same as ``vg`` for SVE.
+  Except that where ``vg`` shows the length for the active mode, ``svg`` will
+  always show the streaming vector length, even in non-streaming mode. This
+  register is read only.

[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -0,0 +1,190 @@
+Using LLDB On AArch64 Linux
+===
+
+This page explains the details of debugging certain AArch64 extensions using
+LLDB. If something is not mentioned here, it likely works as you would expect.
+
+This is not a replacement for ptrace and Linux Kernel documentation. This 
covers
+how LLDB has chosen to use those things and how that effects your experience as
+a user.
+
+Scalable Vector Extension (SVE)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+In LLDB you will be able to see the following new registers:
+
+* ``z0-z31`` vector registers, each one has size equal to the vector length.
+* ``p0-p15`` predicate registers, each one containing 1 bit per byte in the 
vector
+  length. Making each one vector length / 8 sized.
+* ``ffr`` the first fault register, same size as a predicate register.
+* ``vg``, the vector length in "granules". Each granule is 8 bytes.
+
+.. code-block::
+
+   Scalable Vector Extension Registers:
+ vg = 0x0002
+ z0 = {0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 <...> }
+   <...>
+ p0 = {0xff 0xff}
+   <...>
+ffr = {0xff 0xff}
+
+The example above has a vector length of 16 bytes. Within LLDB you will always
+see "vg" as in the ``vg`` register, which is 2 in this case (8*2 = 16).
+Elsewhere you may see "vq" which is the vector length in quadwords (16 bytes)
+elsewhere. Where you see "vl", it is in bytes.
+
+Changing the Vector Length
+..
+
+While you can count the size of a P or Z register, it is intended that ``vg`` 
be
+used to find the current vector length.
+
+vg can be written. Writing the current vector length changes nothing. If you

omjavaid wrote:

vg register also has write access to update SVE vector length during a debug 
session.

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


[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -0,0 +1,190 @@
+Using LLDB On AArch64 Linux
+===
+
+This page explains the details of debugging certain AArch64 extensions using
+LLDB. If something is not mentioned here, it likely works as you would expect.
+
+This is not a replacement for ptrace and Linux Kernel documentation. This 
covers
+how LLDB has chosen to use those things and how that effects your experience as
+a user.
+
+Scalable Vector Extension (SVE)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+In LLDB you will be able to see the following new registers:
+
+* ``z0-z31`` vector registers, each one has size equal to the vector length.
+* ``p0-p15`` predicate registers, each one containing 1 bit per byte in the 
vector
+  length. Making each one vector length / 8 sized.
+* ``ffr`` the first fault register, same size as a predicate register.
+* ``vg``, the vector length in "granules". Each granule is 8 bytes.
+
+.. code-block::
+
+   Scalable Vector Extension Registers:
+ vg = 0x0002
+ z0 = {0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 <...> }
+   <...>
+ p0 = {0xff 0xff}
+   <...>
+ffr = {0xff 0xff}
+
+The example above has a vector length of 16 bytes. Within LLDB you will always
+see "vg" as in the ``vg`` register, which is 2 in this case (8*2 = 16).
+Elsewhere you may see "vq" which is the vector length in quadwords (16 bytes)
+elsewhere. Where you see "vl", it is in bytes.

omjavaid wrote:

Elsewhere in start and end of this sentence seems to be a typo.

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


[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -0,0 +1,190 @@
+Using LLDB On AArch64 Linux
+===
+
+This page explains the details of debugging certain AArch64 extensions using
+LLDB. If something is not mentioned here, it likely works as you would expect.
+
+This is not a replacement for ptrace and Linux Kernel documentation. This 
covers
+how LLDB has chosen to use those things and how that effects your experience as
+a user.
+
+Scalable Vector Extension (SVE)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+In LLDB you will be able to see the following new registers:
+
+* ``z0-z31`` vector registers, each one has size equal to the vector length.
+* ``p0-p15`` predicate registers, each one containing 1 bit per byte in the 
vector
+  length. Making each one vector length / 8 sized.
+* ``ffr`` the first fault register, same size as a predicate register.
+* ``vg``, the vector length in "granules". Each granule is 8 bytes.
+
+.. code-block::
+
+   Scalable Vector Extension Registers:
+ vg = 0x0002
+ z0 = {0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 <...> }
+   <...>
+ p0 = {0xff 0xff}
+   <...>
+ffr = {0xff 0xff}
+
+The example above has a vector length of 16 bytes. Within LLDB you will always
+see "vg" as in the ``vg`` register, which is 2 in this case (8*2 = 16).
+Elsewhere you may see "vq" which is the vector length in quadwords (16 bytes)
+elsewhere. Where you see "vl", it is in bytes.
+
+Changing the Vector Length
+..
+
+While you can count the size of a P or Z register, it is intended that ``vg`` 
be
+used to find the current vector length.
+
+vg can be written. Writing the current vector length changes nothing. If you
+increase the vector length, the registers will likely be reset to 0. If you
+decrease it, LLDB will truncate the Z registers but everything else will be 
reset
+to 0.
+
+Generally you should not assume that SVE state after changing the vector length
+is in any way the same as it was previously. If you need to do it, do it before
+a function's first use of SVE.
+
+Z Register Presentation
+...
+
+LLDB makes no attempt to predict how an SVE Z register will be used. Even if 
the

omjavaid wrote:

LLDB makes no attempt to predict how an SVE Z register should be visualized. 

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


[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -0,0 +1,190 @@
+Using LLDB On AArch64 Linux
+===
+
+This page explains the details of debugging certain AArch64 extensions using
+LLDB. If something is not mentioned here, it likely works as you would expect.
+
+This is not a replacement for ptrace and Linux Kernel documentation. This 
covers
+how LLDB has chosen to use those things and how that effects your experience as
+a user.
+
+Scalable Vector Extension (SVE)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+In LLDB you will be able to see the following new registers:
+
+* ``z0-z31`` vector registers, each one has size equal to the vector length.
+* ``p0-p15`` predicate registers, each one containing 1 bit per byte in the 
vector
+  length. Making each one vector length / 8 sized.
+* ``ffr`` the first fault register, same size as a predicate register.
+* ``vg``, the vector length in "granules". Each granule is 8 bytes.
+
+.. code-block::
+
+   Scalable Vector Extension Registers:
+ vg = 0x0002
+ z0 = {0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 <...> }
+   <...>
+ p0 = {0xff 0xff}
+   <...>
+ffr = {0xff 0xff}
+
+The example above has a vector length of 16 bytes. Within LLDB you will always
+see "vg" as in the ``vg`` register, which is 2 in this case (8*2 = 16).
+Elsewhere you may see "vq" which is the vector length in quadwords (16 bytes)
+elsewhere. Where you see "vl", it is in bytes.
+
+Changing the Vector Length
+..
+
+While you can count the size of a P or Z register, it is intended that ``vg`` 
be
+used to find the current vector length.
+
+vg can be written. Writing the current vector length changes nothing. If you
+increase the vector length, the registers will likely be reset to 0. If you
+decrease it, LLDB will truncate the Z registers but everything else will be 
reset
+to 0.
+
+Generally you should not assume that SVE state after changing the vector length
+is in any way the same as it was previously. If you need to do it, do it before
+a function's first use of SVE.
+
+Z Register Presentation
+...
+
+LLDB makes no attempt to predict how an SVE Z register will be used. Even if 
the
+next SVE instruction (which may some distance away) would use, for example, 32
+bit elements, LLDB prints ``z0`` as single bytes.
+
+If you know what format you are going to use, give a format option::
+
+  (lldb) register read z0 -f uint32_t[]
+  z0 = {0x01010101 0x01010101 0x01010101 0x01010101}
+
+FPSIMD and SVE Modes
+
+
+Prior to the debugee's first use of SVE, it is in what the Linux Kernel terms
+SIMD mode. Only the FPU is being used. In this state LLDB will still show the
+SVE registers however the values are simply the FPU values zero extended up to
+the vector length.
+
+On first access to SVE, the process goes into SVE mode. Now the Z values are
+in the real Z registers.
+
+You can also trigger this with LLDB by writing to an SVE register. Note that
+there is no way to undo this change from within LLDB. However, the debugee
+itself could do something to end up back in SIMD mode.
+
+Expression evaluation
+.
+
+If you evaluate an expression, all SVE state is saved prior to, and restored
+after the expression has been evaluated. Including the register values and
+vector length.
+
+Scalable Matrix Extension (SME)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+SME adds a "Streaming Mode" to SVE. This mode has its own vector length.
+
+In LLDB you will see the following new registers:
+
+* ``tpidr2``, an extra per thread pointer reserved for use by the SME ABI.
+  This is not scalable, just pointer sized aka 64 bit.
+* ``z0-z31`` streaming SVE registers. These have the same names as the
+  non-streaming registers and therefore you will only see the active set in
+  LLDB. You cannot read or write the inactive mode's registers. Their size
+  is the same as the streaming vector length.
+* ``za`` the Array Storage register. The "Matrix" part of "Scalable Matrix
+  Extension". This is a square made up of rows of length equal to the streaming
+  vector length (svl). Meaning that the total size is svl * svl.
+* ``svg`` the vector length in granules. This acts the same as ``vg`` for SVE.
+  Except that where ``vg`` shows the length for the active mode, ``svg`` will
+  always show the streaming vector length, even in non-streaming mode. This
+  register is read only.

[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits

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


[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits

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


[Lldb-commits] [lldb] [lldb][AArch64] Add release notes and documentation for SME (PR #66767)

2023-10-06 Thread Omair Javaid via lldb-commits


@@ -0,0 +1,190 @@
+Using LLDB On AArch64 Linux
+===
+
+This page explains the details of debugging certain AArch64 extensions using
+LLDB. If something is not mentioned here, it likely works as you would expect.
+
+This is not a replacement for ptrace and Linux Kernel documentation. This 
covers
+how LLDB has chosen to use those things and how that effects your experience as
+a user.
+
+Scalable Vector Extension (SVE)
+---
+
+See `here 
`__
+to learn about the extension and `here 
`__
+for the Linux Kernel's handling of it.
+
+In LLDB you will be able to see the following new registers:
+
+* ``z0-z31`` vector registers, each one has size equal to the vector length.
+* ``p0-p15`` predicate registers, each one containing 1 bit per byte in the 
vector
+  length. Making each one vector length / 8 sized.
+* ``ffr`` the first fault register, same size as a predicate register.
+* ``vg``, the vector length in "granules". Each granule is 8 bytes.
+
+.. code-block::
+
+   Scalable Vector Extension Registers:
+ vg = 0x0002
+ z0 = {0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 <...> }
+   <...>
+ p0 = {0xff 0xff}
+   <...>
+ffr = {0xff 0xff}
+
+The example above has a vector length of 16 bytes. Within LLDB you will always
+see "vg" as in the ``vg`` register, which is 2 in this case (8*2 = 16).
+Elsewhere you may see "vq" which is the vector length in quadwords (16 bytes)
+elsewhere. Where you see "vl", it is in bytes.

omjavaid wrote:

elsewhere seems typo.

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


[Lldb-commits] [lldb] [lldb][AArch64] Add isAArch64SMEFA64 check to SME testing (PR #68094)

2023-10-06 Thread Omair Javaid via lldb-commits

https://github.com/omjavaid commented:

After this change isAArch64SME check will be replaced on all locations? 

So the manual says "The SVE FFR predicate register is not architecturally 
visible when the PE is in Streaming SVE mode if FEAT_SME_FA64 is not 
implemented or not enabled at the current Exception level."

All SVE tests seem to use FFR does it mean isAArch64SME is now redundant as far 
as LLDB testing is concerned?

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


[Lldb-commits] [lldb] ec8df0c - [LLDB] Skip TestTlsGlobals.py for Linux Arm/AArch64

2023-09-28 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-09-28T16:16:41+05:00
New Revision: ec8df0c7e3a3d9e6352a3d8c5c4540a9d0352ca0

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

LOG: [LLDB] Skip TestTlsGlobals.py for Linux Arm/AArch64

Recently added TLS linux support fails on Arm/AArch64. I am skiping test
for now and will investigate the issue later.

Added: 


Modified: 
lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py

Removed: 




diff  --git a/lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py 
b/lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py
index a853b284c2cce4d..dfe29b451df0a66 100644
--- a/lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py
+++ b/lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py
@@ -38,6 +38,7 @@ def setUp(self):
 # TLS works 
diff erently on Windows, this would need to be implemented
 # separately.
 @skipIfWindows
+@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
 @skipIf(oslist=no_match([lldbplatformutil.getDarwinOSTriples(), "linux"]))
 def test(self):
 """Test thread-local storage."""



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


[Lldb-commits] [lldb] e821914 - [LLDB] Skip TestBSDArchives.py on windows

2023-09-06 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-09-06T14:03:21+05:00
New Revision: e82191469ec408a39cf13ebe6a7dfb03787f09c1

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

LOG: [LLDB] Skip TestBSDArchives.py on windows

This fixes LLDB windows buildbot after updates to TestBSDArchives.py.
https://lab.llvm.org/buildbot/#/builders/219/builds/5408
I have marked new failing test as an expected failure on Windows.

Added: 


Modified: 
lldb/test/API/functionalities/archives/TestBSDArchives.py

Removed: 




diff  --git a/lldb/test/API/functionalities/archives/TestBSDArchives.py 
b/lldb/test/API/functionalities/archives/TestBSDArchives.py
index cefcb95cb9e0b6..9ec21ba2e821c1 100644
--- a/lldb/test/API/functionalities/archives/TestBSDArchives.py
+++ b/lldb/test/API/functionalities/archives/TestBSDArchives.py
@@ -124,6 +124,10 @@ def test_frame_var_errors_when_archive_missing(self):
 self.check_frame_variable_errors(thread, error_strings)
 
 @skipIfRemote
+@expectedFailureAll(
+oslist=["windows"],
+bugnumber="llvm.org/pr24527.  Makefile.rules doesn't know how to build 
static libs on Windows",
+)
 def test_archive_specifications(self):
 """
 Create archives and make sure the information we get when retrieving



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


[Lldb-commits] [lldb] 8e946fe - Revert "[mlir][complex] Convert complex.abs to arith with fastmath flag"

2023-08-28 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-08-29T02:01:20+05:00
New Revision: 8e946fec0441e7a4eb4604c806afed20c6930cc4

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

LOG: Revert "[mlir][complex] Convert complex.abs to arith with fastmath flag"

This reverts commit 653f77690bb2473ff405ccc681c73217fae8b748.

This breaks lldb-aarch64-windows buildbot.
I have reproduced the issue on x86_64 Windows as well.
https://lab.llvm.org/buildbot/#/builders/219/builds/5130

Added: 
lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.exe

Modified: 
mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir

Removed: 




diff  --git a/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.exe 
b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.exe
new file mode 100644
index 00..3a2c64504ed93c
Binary files /dev/null and b/lldb/unittests/SymbolFile/PDB/Inputs/test-pdb.exe 
diff er

diff  --git a/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp 
b/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
index 2bcec4ea10f92c..9c05cadc2f07e0 100644
--- a/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
+++ b/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
@@ -35,18 +35,13 @@ struct AbsOpConversion : public 
OpConversionPattern {
 auto loc = op.getLoc();
 auto type = op.getType();
 
-arith::FastMathFlagsAttr fmf = op.getFastMathFlagsAttr();
-
 Value real =
 rewriter.create(loc, type, adaptor.getComplex());
 Value imag =
 rewriter.create(loc, type, adaptor.getComplex());
-Value realSqr =
-rewriter.create(loc, real, real, fmf.getValue());
-Value imagSqr =
-rewriter.create(loc, imag, imag, fmf.getValue());
-Value sqNorm =
-rewriter.create(loc, realSqr, imagSqr, fmf.getValue());
+Value realSqr = rewriter.create(loc, real, real);
+Value imagSqr = rewriter.create(loc, imag, imag);
+Value sqNorm = rewriter.create(loc, realSqr, imagSqr);
 
 rewriter.replaceOpWithNewOp(op, sqNorm);
 return success();

diff  --git a/mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir 
b/mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
index bc2ea0dd7a5847..5e8986a4a9a464 100644
--- a/mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
+++ b/mlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
@@ -707,19 +707,3 @@ func.func @complex_angle(%arg: complex) -> f32 {
 // CHECK: %[[IMAG:.*]] = complex.im %[[ARG]] : complex
 // CHECK: %[[RESULT:.*]] = math.atan2 %[[IMAG]], %[[REAL]] : f32
 // CHECK: return %[[RESULT]] : f32
-
-// -
-
-// CHECK-LABEL: func @complex_abs_with_fmf
-// CHECK-SAME: %[[ARG:.*]]: complex
-func.func @complex_abs_with_fmf(%arg: complex) -> f32 {
-  %abs = complex.abs %arg fastmath : complex
-  return %abs : f32
-}
-// CHECK: %[[REAL:.*]] = complex.re %[[ARG]] : complex
-// CHECK: %[[IMAG:.*]] = complex.im %[[ARG]] : complex
-// CHECK-DAG: %[[REAL_SQ:.*]] = arith.mulf %[[REAL]], %[[REAL]] 
fastmath : f32
-// CHECK-DAG: %[[IMAG_SQ:.*]] = arith.mulf %[[IMAG]], %[[IMAG]] 
fastmath : f32
-// CHECK: %[[SQ_NORM:.*]] = arith.addf %[[REAL_SQ]], %[[IMAG_SQ]] 
fastmath : f32
-// CHECK: %[[NORM:.*]] = math.sqrt %[[SQ_NORM]] : f32
-// CHECK: return %[[NORM]] : f32



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


[Lldb-commits] [lldb] 898b880 - [LLDB] Update AArch64/Windows XFAIl decorators on TestNamespace.py

2023-05-30 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-30T13:06:09+04:00
New Revision: 898b880308f1ce31520c939ab19366dc3b82c930

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

LOG: [LLDB] Update AArch64/Windows XFAIl decorators on TestNamespace.py

Added: 


Modified: 
lldb/test/API/lang/cpp/namespace/TestNamespace.py

Removed: 




diff  --git a/lldb/test/API/lang/cpp/namespace/TestNamespace.py 
b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
index 1dc9d00fcd993..3006699b6623a 100644
--- a/lldb/test/API/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
@@ -11,6 +11,7 @@
 
 class NamespaceBreakpointTestCase(TestBase):
 @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
+@expectedFailureAll(oslist=["windows"])
 def test_breakpoints_func_auto(self):
 """Test that we can set breakpoints correctly by basename to find all 
functions whose basename is "func"."""
 self.build()
@@ -37,7 +38,6 @@ def test_breakpoints_func_auto(self):
 )
 
 @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
-@expectedFailureAll(oslist=["windows"])
 def test_breakpoints_func_full(self):
 """Test that we can set breakpoints correctly by fullname to find all 
functions whose fully qualified name is "func"
 (no namespaces)."""



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


[Lldb-commits] [lldb] 7fb60b0 - [LLDB] Add XFAIL on AArch64/Windows to TestNamespace.py

2023-05-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-29T18:53:42+04:00
New Revision: 7fb60b0123e50389afbde0286a0e59923d154210

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

LOG: [LLDB] Add XFAIL on AArch64/Windows to TestNamespace.py

Added: 


Modified: 
lldb/test/API/lang/cpp/namespace/TestNamespace.py

Removed: 




diff  --git a/lldb/test/API/lang/cpp/namespace/TestNamespace.py 
b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
index 960cdac06dea..1dc9d00fcd99 100644
--- a/lldb/test/API/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
@@ -37,6 +37,7 @@ def test_breakpoints_func_auto(self):
 )
 
 @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
+@expectedFailureAll(oslist=["windows"])
 def test_breakpoints_func_full(self):
 """Test that we can set breakpoints correctly by fullname to find all 
functions whose fully qualified name is "func"
 (no namespaces)."""



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


[Lldb-commits] [lldb] ab05d91 - Revert "[LLDB] Add/Remove xfail for some API tests on Windows"

2023-05-29 Thread Muhammad Omair Javaid via lldb-commits

Author: tcwg
Date: 2023-05-29T17:39:36+04:00
New Revision: ab05d9134d18db34501985a01fbfc02609767587

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

LOG: Revert "[LLDB] Add/Remove xfail for some API tests on Windows"

This reverts commit 6ea1a0d4fc3823de143a288df2059b48dc01cf72.

It again marks XFAIL LLDB tests failing after
c384fcd3ea1dad782eaaea89b32fc33c0c3528b8

Added: 


Modified: 
lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py

lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
lldb/test/API/lang/c/step-target/TestStepTarget.py
lldb/test/API/lang/cpp/global_variables/TestCPPGlobalVariables.py
lldb/test/API/lang/cpp/namespace/TestNamespace.py
lldb/test/API/lang/cpp/static_members/TestCPPStaticMembers.py
lldb/test/API/python_api/function_symbol/TestDisasmAPI.py
lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
lldb/test/API/python_api/symbol-context/TestSymbolContext.py
lldb/test/API/python_api/target/TestTargetAPI.py
lldb/test/API/python_api/value/TestValueAPI.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py 
b/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
index 48377a75d23bb..438b92cdc4846 100644
--- a/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
+++ b/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
@@ -22,6 +22,7 @@ def cleanJITFiles(self):
 os.remove(j)
 return
 
+@expectedFailureAll(oslist=["windows"])
 def test_save_jit_objects(self):
 self.build()
 os.chdir(self.getBuildDir())

diff  --git 
a/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
 
b/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
index 745700a14a3f0..9f477f951cd86 100644
--- 
a/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
+++ 
b/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
@@ -12,17 +12,20 @@
 class TestScriptedResolver(TestBase):
 NO_DEBUG_INFO_TESTCASE = True
 
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_scripted_resolver(self):
 """Use a scripted resolver to set a by symbol name breakpoint"""
 self.build()
 self.do_test()
 
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_search_depths(self):
 """Make sure we are called at the right depths depending on what we 
return
 from __get_depth__"""
 self.build()
 self.do_test_depths()
 
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_command_line(self):
 """Test setting a resolver breakpoint from the command line"""
 self.build()

diff  --git 
a/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py 
b/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
index ae4847bb788fe..49a72c2863e74 100644
--- a/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
+++ b/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
@@ -25,7 +25,8 @@ def test_step_over_with_python_api(self):
 self.build()
 self.inline_stepping_step_over()
 
-@add_test_categories(["pyapi"])
+@add_test_categories(['pyapi'])
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
 def test_step_in_template_with_python_api(self):
 """Test stepping in to templated functions."""
 self.build()

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 1d4a0008f6b44..6c399b8a0a1b2 100644
--- a/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
+++ b/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
@@ -10,7 +10,9 @@
 
 
 class StepAvoidsNoDebugTestCase(TestBase):
-@add_test_categories(["pyapi"])
+
+@add_test_categories(['pyapi'])
+@expectedFailureAll(archs=["aarch64"], oslist=["windows"], 
bugnumber="llvm.org/pr56292")
 def test_step_out_with_python(self):
 """Test stepping out using avoid-no-debug with dsyms."""
 self.build()
@@ -24,8 +26,8 @@ def test_step_out_with_python(self):
 compiler_version=[">=", "3.9"],
 archs=["i386"],
 oslist=no_match(["freebsd"]),
-bugnumber="llvm.org/pr28549",
-)
+bugnumber="llvm.org/pr28549")

[Lldb-commits] [lldb] f2a8661 - [LLDB] Fix TestVarPath.py for AArch64 Windows

2023-05-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-29T16:17:13+04:00
New Revision: f2a866170c4961137608eee1c26f6eaa1e8e62a1

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

LOG: [LLDB] Fix TestVarPath.py for AArch64 Windows

Since 44bb442 LLDB TestVarPath.py crashes on AArch64 Windows.
GetValueForVariablePath function seems to be triggering the crash.
This patch disable parts of this test causing the crash.

Bug reported upstream:
https://github.com/llvm/llvm-project/issues/62983

Added: 


Modified: 
lldb/test/API/functionalities/var_path/TestVarPath.py

Removed: 




diff  --git a/lldb/test/API/functionalities/var_path/TestVarPath.py 
b/lldb/test/API/functionalities/var_path/TestVarPath.py
index 06b4a2d8da313..f79b2a7584ae9 100644
--- a/lldb/test/API/functionalities/var_path/TestVarPath.py
+++ b/lldb/test/API/functionalities/var_path/TestVarPath.py
@@ -5,6 +5,7 @@
 
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 
 
@@ -115,7 +116,7 @@ def do_test(self):
 self.assertSuccess(v.GetError(), "Make sure we find 'pt_sp'")
 # Make sure we don't crash when looking for non existant child
 # in type with synthetic children. This used to cause a crash.
-v = frame.GetValueForVariablePath("pt_sp->not_valid_child")
-self.assertTrue(
-v.GetError().Fail(), "Make sure we don't find 
'pt_sp->not_valid_child'"
-)
+if not self.isAArch64Windows():
+v = frame.GetValueForVariablePath("pt_sp->not_valid_child")
+self.assertTrue(v.GetError().Fail(),
+"Make sure we don't find 'pt_sp->not_valid_child'")



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


[Lldb-commits] [lldb] d093111 - [LLDB] Remove XFAIL on Windows decorator XPASSes

2023-05-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-29T12:13:16+04:00
New Revision: d093111ab135154cabc77e5bad625d9d7cd720d5

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

LOG: [LLDB] Remove XFAIL on Windows decorator XPASSes

Following tests are now passing on LLDB AArch64 Windows buildbot:
  lldb-api :: 
commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
  lldb-api :: 
functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
  lldb-api :: lang/cpp/constructors/TestCppConstructors.py
  lldb-api :: lang/cpp/namespace/TestNamespace.py
  lldb-api :: lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py

https://lab.llvm.org/buildbot/#/builders/219/builds/3012

This patch removes XFAIL decorator from all of the above.

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

Added: 


Modified: 

lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py

lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
lldb/test/API/lang/cpp/namespace/TestNamespace.py
lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
 
b/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
index c69b4e5b32ef5..ce74dd27cc179 100644
--- 
a/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
+++ 
b/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
@@ -6,6 +6,5 @@
 globals(),
 [
 decorators.expectedFailureAll(bugnumber="llvm.org/pr50814", 
compiler="gcc"),
-decorators.expectedFailureAll(oslist=["windows"]),
 ],
 )

diff  --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
 
b/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
index 47840102cf3cc..f602d017f28b7 100644
--- 
a/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
+++ 
b/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
@@ -16,7 +16,6 @@ def setUp(self):
 self.line = line_number("main.cpp", "// Set break point at this line.")
 
 @expectedFlakeyNetBSD
-@expectedFailureAll(oslist=["windows"])
 def test_with_run_command(self):
 """Test that that file and class static variables display correctly."""
 self.build()

diff  --git a/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py 
b/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
index 0c3de3aaf1a55..4c50de0cd7502 100644
--- a/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
+++ b/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
@@ -6,7 +6,6 @@
 
 class TestCase(TestBase):
 @expectedFailureAll(bugnumber="llvm.org/pr50814", compiler="gcc")
-@expectedFailureAll(oslist=["windows"])
 def test_constructors(self):
 self.build()
 lldbutil.run_to_source_breakpoint(

diff  --git a/lldb/test/API/lang/cpp/namespace/TestNamespace.py 
b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
index 1301342599df1..1dc9d00fcd993 100644
--- a/lldb/test/API/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
@@ -11,7 +11,6 @@
 
 class NamespaceBreakpointTestCase(TestBase):
 @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
-@expectedFailureAll(oslist=["windows"])
 def test_breakpoints_func_auto(self):
 """Test that we can set breakpoints correctly by basename to find all 
functions whose basename is "func"."""
 self.build()

diff  --git 
a/lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py 
b/lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py
index a307d091ed0d7..2321246a2e7e5 100644
--- a/lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py
+++ b/lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py
@@ -16,7 +16,6 @@ class by injecting a "$__lldb_expr" member function into the 
class. This
 
 class TestCase(TestBase):
 @no_debug_info_test
-@expectedFailureAll(oslist=["windows"])
 def test(self):
 self.build()
 lldbutil.run_to_source_breakpoint(



___
lldb-commits mailing list

[Lldb-commits] [lldb] a7c7c61 - [LLDB] Fix missing import in TestInterruptBacktrace.py

2023-05-22 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-22T15:47:05+04:00
New Revision: a7c7c61af63188a66bd1ad67f9f25b48e5722b58

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

LOG: [LLDB] Fix missing import in TestInterruptBacktrace.py

This fixed missing import of lldbsuite.test.decorators in 
TestInterruptBacktrace.py.

Added: 


Modified: 
lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py 
b/lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py
index 8d4161355122..ae2863c28f46 100644
--- a/lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py
+++ b/lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py
@@ -6,7 +6,7 @@
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
-
+from lldbsuite.test.decorators import *
 
 class TestInterruptingBacktrace(TestBase):
 



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


[Lldb-commits] [lldb] 5dfec67 - [LLDB] Skip TestInterruptBacktrace.py on Arm/Linux

2023-05-22 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-22T14:53:35+04:00
New Revision: 5dfec676c3ab4fa2b7ea95d203f97faf7768b77f

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

LOG: [LLDB] Skip TestInterruptBacktrace.py on Arm/Linux

TestInterruptBacktrace.py started randonmly failing on Arm/Linux
buildbot since e19387e6936c. This patch marks it skipped.

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

Added: 


Modified: 
lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py 
b/lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py
index 57a994d11035d..8d4161355122c 100644
--- a/lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py
+++ b/lldb/test/API/functionalities/bt-interrupt/TestInterruptBacktrace.py
@@ -12,6 +12,7 @@ class TestInterruptingBacktrace(TestBase):
 
 NO_DEBUG_INFO_TESTCASE = True
 
+@skipIf(oslist=["linux"], archs=["arm"])
 def test_backtrace_interrupt(self):
 """Use RequestInterrupt followed by stack operations
to ensure correct interrupt behavior for stacks."""



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


[Lldb-commits] [lldb] 617c31c - [LLDB] Fix typo in TestDataFormatterSynthVal.py

2023-05-16 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-16T10:13:06+04:00
New Revision: 617c31c6a1ddd57c6b750b3882c177175067a735

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

LOG: [LLDB] Fix typo in TestDataFormatterSynthVal.py

This is follow up to 039b28e14e6d to fix a typo to make sure skipped
part of test is only skipped for AArch64 Windows platform.

Added: 


Modified: 

lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
 
b/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
index 67619287ef65..6b0397626690 100644
--- 
a/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
+++ 
b/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
@@ -96,7 +96,7 @@ def cleanup():
 
 # check that an aptly defined synthetic provider does not affect
 # one-lining
-if self.isAArch64Windows():
+if not self.isAArch64Windows():
 self.expect(
 "expression struct Struct { myInt theInt{12}; }; Struct()",
 substrs=['(theInt = 12)'])



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


[Lldb-commits] [lldb] 039b28e - [LLDB] Fix TestDataFormatterSynthVal.py for AArch64/Windows

2023-05-15 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-16T00:14:20+04:00
New Revision: 039b28e14e6d5a4b9b9b333695dabe9dc57233b0

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

LOG: [LLDB] Fix TestDataFormatterSynthVal.py for AArch64/Windows

Since 44363f2 various tests have started passing but introduced a
expression evaluation failure in TestDataFormatterSynthVal.py.
This patch marks the expression evaluation part as skipped while rest
of the test passes.
This patch aslo introduces a new helper isAArch64Windows in lldbtest.py.

Added: 


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

lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py 
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 31539f6a768bd..0ca0fac7bb3f6 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1252,6 +1252,13 @@ def isAArch64PAuth(self):
 return True
 return self.isAArch64() and "paca" in self.getCPUInfo()
 
+def isAArch64Windows(self):
+"""Returns true if the architecture is AArch64 and platform windows."""
+if self.getPlatform() == 'windows':
+arch = self.getArchitecture().lower()
+return arch in ["aarch64", "arm64", "arm64e"]
+return False
+
 def getArchitecture(self):
 """Returns the architecture in effect the test suite is running 
with."""
 module = builder_module()

diff  --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
 
b/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
index 2e1367563cd7b..67619287ef65e 100644
--- 
a/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
+++ 
b/lldb/test/API/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
@@ -96,9 +96,10 @@ def cleanup():
 
 # check that an aptly defined synthetic provider does not affect
 # one-lining
-self.expect(
-"expression struct Struct { myInt theInt{12}; }; Struct()",
-substrs=['(theInt = 12)'])
+if self.isAArch64Windows():
+self.expect(
+"expression struct Struct { myInt theInt{12}; }; Struct()",
+substrs=['(theInt = 12)'])
 
 # check that we can use a synthetic value in a summary
 self.runCmd("type summary add hasAnInt -s ${var.theInt}")



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


[Lldb-commits] [lldb] 58e6caa - Revert "[lldb] Refactor SBFileSpec::GetDirectory"

2023-05-15 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-15T22:49:00+04:00
New Revision: 58e6caaba1cf623292c8898be30a5a56722432b3

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

LOG: Revert "[lldb] Refactor SBFileSpec::GetDirectory"

This reverts commit 2bea2d7b070dc5df723ce2b92dbc654b8bb1847e.

It introduced following failures on buildbot lldb-aarch64-windows:

lldb-api :: functionalities/process_save_core/TestProcessSaveCore.py
lldb-api :: python_api/symbol-context/TestSymbolContext.py

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

Added: 


Modified: 
lldb/source/API/SBFileSpec.cpp

Removed: 




diff  --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp
index 8668b64b4ce76..a7df9afc4b8eb 100644
--- a/lldb/source/API/SBFileSpec.cpp
+++ b/lldb/source/API/SBFileSpec.cpp
@@ -114,7 +114,9 @@ const char *SBFileSpec::GetFilename() const {
 const char *SBFileSpec::GetDirectory() const {
   LLDB_INSTRUMENT_VA(this);
 
-  return m_opaque_up->GetDirectory().GetCString();
+  FileSpec directory{*m_opaque_up};
+  directory.ClearFilename();
+  return directory.GetPathAsConstString().GetCString();
 }
 
 void SBFileSpec::SetFilename(const char *filename) {



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


[Lldb-commits] [lldb] 6ea1a0d - [LLDB] Add/Remove xfail for some API tests on Windows

2023-05-02 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-03T04:45:55+05:00
New Revision: 6ea1a0d4fc3823de143a288df2059b48dc01cf72

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

LOG: [LLDB] Add/Remove xfail for some API tests on Windows

This patch add or removes XFAIL decorator from various tests which were marked
xfail for windows.

since 44363f2 various tests have started passing but introduced a couple of new 
failures.
Weight is in favor of new XPasses and I have removed XFail decorator from them. 
Also
some new tests have started failing for which we need to file separate bugs. I 
have
marked them xfail for now and will add the bug id after investigating the issue.

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

Added: 


Modified: 

lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py

lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py

lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
lldb/test/API/lang/c/step-target/TestStepTarget.py
lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
lldb/test/API/lang/cpp/global_variables/TestCPPGlobalVariables.py
lldb/test/API/lang/cpp/namespace/TestNamespace.py
lldb/test/API/lang/cpp/static_members/TestCPPStaticMembers.py
lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py
lldb/test/API/python_api/function_symbol/TestDisasmAPI.py
lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
lldb/test/API/python_api/symbol-context/TestSymbolContext.py
lldb/test/API/python_api/target/TestTargetAPI.py
lldb/test/API/python_api/value/TestValueAPI.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
 
b/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
index e14f160f1e576..2ee90181d9327 100644
--- 
a/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
+++ 
b/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
@@ -2,4 +2,4 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-  [decorators.expectedFailureAll(bugnumber="llvm.org/pr50814", 
compiler="gcc")])
+  [decorators.expectedFailureAll(bugnumber="llvm.org/pr50814", 
compiler="gcc"), decorators.expectedFailureAll(oslist=["windows"])])

diff  --git 
a/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py 
b/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
index 157bed4880a3d..e3e20ad94707d 100644
--- a/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
+++ b/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
@@ -22,7 +22,6 @@ def cleanJITFiles(self):
 os.remove(j)
 return
 
-@expectedFailureAll(oslist=["windows"])
 def test_save_jit_objects(self):
 self.build()
 os.chdir(self.getBuildDir())

diff  --git 
a/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
 
b/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
index 8a143bdf3817a..edac8b1981fdf 100644
--- 
a/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
+++ 
b/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
@@ -13,20 +13,17 @@ class TestScriptedResolver(TestBase):
 
 NO_DEBUG_INFO_TESTCASE = True
 
-@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_scripted_resolver(self):
 """Use a scripted resolver to set a by symbol name breakpoint"""
 self.build()
 self.do_test()
 
-@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_search_depths(self):
 """ Make sure we are called at the right depths depending on what we 
return
 from __get_depth__"""
 self.build()
 self.do_test_depths()
 
-@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_command_line(self):
 """ Test setting a resolver breakpoint from the command line """
 self.build()

diff  --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
 

[Lldb-commits] [lldb] 9fdf82d - [LLDB] Fix broken Windows unittests build

2023-04-16 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-04-17T08:31:43+05:00
New Revision: 9fdf82dc32dc38e0b92dab3215a83d8f3c2f9bbf

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

LOG: [LLDB] Fix broken Windows unittests build

LLDB Windows tests were broken because SymbolFilePDBTests.cpp failed
to compile after 6cdfa295743729178ff6f15a8dcd36f8f7d27c2c.

This patch fixes the SymbolFilePDBTests.cpp. (Tested on Surface X Pro)

https://lab.llvm.org/buildbot/#/builders/219

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

Added: 


Modified: 
lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp

Removed: 




diff  --git a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp 
b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
index 2c49b34b34fe3..bd69d246072ca 100644
--- a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
+++ b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
@@ -456,7 +456,8 @@ TEST_F(SymbolFilePDBTests, TestClassInNamespace) {
   symfile->ParseDeclsForContext(CompilerDeclContext(
   clang_ast_ctx, static_cast(tu)));
 
-  auto ns_namespace = symfile->FindNamespace(ConstString("NS"), 
CompilerDeclContext());
+  auto ns_namespace =
+  symfile->FindNamespace(ConstString("NS"), CompilerDeclContext(), true);
   EXPECT_TRUE(ns_namespace.IsValid());
 
   symfile->FindTypes(ConstString("NSClass"), ns_namespace, 0, searched_files,



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


[Lldb-commits] [lldb] 71b3806 - Fix LLDB windows build

2023-03-06 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-03-07T05:37:15+04:00
New Revision: 71b38063b282937640e05ab219c2baa6ed7d4ac7

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

LOG: Fix LLDB windows build

LLDB WoA buildbot is failing due to pid_t redefinition after recent changes in
lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp.
Process.h includes PosixApi.h which defines pid_t. Python.h on windows also 
typedefs
pid_t. To make sure that we include Python.h before PosixApi this patch 
renforces
the workaround previously set up to guard this issue.

https://lab.llvm.org/buildbot/#/builders/219

Reviewed By: mib

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

Added: 


Modified: 

lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
 
b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
index cffa3bda3ab03..c985065835727 100644
--- 
a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
+++ 
b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
@@ -7,6 +7,10 @@
 
//===--===//
 
 #include "lldb/Host/Config.h"
+#if LLDB_ENABLE_PYTHON
+// LLDB Python header must be included first
+#include "lldb-python.h"
+#endif
 #include "lldb/Target/Process.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Status.h"
@@ -14,9 +18,6 @@
 
 #if LLDB_ENABLE_PYTHON
 
-// LLDB Python header must be included first
-#include "lldb-python.h"
-
 #include "SWIGPythonBridge.h"
 #include "ScriptInterpreterPythonImpl.h"
 #include "ScriptedProcessPythonInterface.h"



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


[Lldb-commits] [lldb] e85e5ab - [LLDB] XFAIL TestRunLocker.py for windows

2023-03-01 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-03-02T11:51:35+04:00
New Revision: e85e5abdceff6983a7ca1b647a97d0e0aaf6bf38

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

LOG: [LLDB] XFAIL TestRunLocker.py for windows

TestRunLocker.py is failing on windows x64 and AArch64 buildbots.
Buildbot log suggests that test needs some minor modification for
windows which I will do later.

https://lab.llvm.org/buildbot/#/builders/83/builds/29680
https://lab.llvm.org/buildbot/#/builders/219/builds/942

Added: 


Modified: 
lldb/test/API/python_api/run_locker/TestRunLocker.py

Removed: 




diff  --git a/lldb/test/API/python_api/run_locker/TestRunLocker.py 
b/lldb/test/API/python_api/run_locker/TestRunLocker.py
index 191400d6c024f..c257684d22c24 100644
--- a/lldb/test/API/python_api/run_locker/TestRunLocker.py
+++ b/lldb/test/API/python_api/run_locker/TestRunLocker.py
@@ -7,6 +7,7 @@
 
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 
 
@@ -14,11 +15,13 @@ class TestRunLocker(TestBase):
 
 NO_DEBUG_INFO_TESTCASE = True
 
+@expectedFailureAll(oslist=["windows"])
 def test_run_locker(self):
 """Test that the run locker is set correctly when we launch"""
 self.build()
 self.runlocker_test(False)
 
+@expectedFailureAll(oslist=["windows"])
 def test_run_locker_stop_at_entry(self):
 """Test that the run locker is set correctly when we launch"""
 self.build()



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


[Lldb-commits] [lldb] 588da01 - Revert "[LLDB] XFAIL TestRunLocker.py on Windows"

2023-03-01 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-03-02T11:22:25+04:00
New Revision: 588da01621a1f8efd139e677526b64c1e5ecf303

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

LOG: Revert "[LLDB] XFAIL TestRunLocker.py on Windows"

This reverts commit 9d28e00e741cb19684111656803434aceef4c2a0.

Added: 


Modified: 
lldb/test/API/python_api/run_locker/TestRunLocker.py

Removed: 




diff  --git a/lldb/test/API/python_api/run_locker/TestRunLocker.py 
b/lldb/test/API/python_api/run_locker/TestRunLocker.py
index ff34d47142b41..191400d6c024f 100644
--- a/lldb/test/API/python_api/run_locker/TestRunLocker.py
+++ b/lldb/test/API/python_api/run_locker/TestRunLocker.py
@@ -14,13 +14,11 @@ class TestRunLocker(TestBase):
 
 NO_DEBUG_INFO_TESTCASE = True
 
-@expectedFailureAll(oslist=["windows"])
 def test_run_locker(self):
 """Test that the run locker is set correctly when we launch"""
 self.build()
 self.runlocker_test(False)
 
-@expectedFailureAll(oslist=["windows"])
 def test_run_locker_stop_at_entry(self):
 """Test that the run locker is set correctly when we launch"""
 self.build()



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


[Lldb-commits] [lldb] 9d28e00 - [LLDB] XFAIL TestRunLocker.py on Windows

2023-03-01 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-03-02T11:05:23+04:00
New Revision: 9d28e00e741cb19684111656803434aceef4c2a0

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

LOG: [LLDB] XFAIL TestRunLocker.py on Windows

Added: 


Modified: 
lldb/test/API/python_api/run_locker/TestRunLocker.py

Removed: 




diff  --git a/lldb/test/API/python_api/run_locker/TestRunLocker.py 
b/lldb/test/API/python_api/run_locker/TestRunLocker.py
index 191400d6c024f..ff34d47142b41 100644
--- a/lldb/test/API/python_api/run_locker/TestRunLocker.py
+++ b/lldb/test/API/python_api/run_locker/TestRunLocker.py
@@ -14,11 +14,13 @@ class TestRunLocker(TestBase):
 
 NO_DEBUG_INFO_TESTCASE = True
 
+@expectedFailureAll(oslist=["windows"])
 def test_run_locker(self):
 """Test that the run locker is set correctly when we launch"""
 self.build()
 self.runlocker_test(False)
 
+@expectedFailureAll(oslist=["windows"])
 def test_run_locker_stop_at_entry(self):
 """Test that the run locker is set correctly when we launch"""
 self.build()



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


[Lldb-commits] [lldb] bde5d31 - Revert "Revert "[lldb] Make SBSection::GetSectionData call Section::GetSectionData.""

2023-01-30 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-01-30T16:49:15+05:00
New Revision: bde5d31e96f556fed30bf9120cc6ff05a2116b64

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

LOG: Revert "Revert "[lldb] Make SBSection::GetSectionData call 
Section::GetSectionData.""

This reverts commit e1bbe50f5a48e9b5407de9e5f4ab8197dedc85c5.

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

Added: 
lldb/test/API/python_api/section/compressed-sections.yaml

Modified: 
lldb/source/API/SBSection.cpp
lldb/test/API/python_api/section/TestSectionAPI.py

Removed: 




diff  --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index 3a9cf20e484a..b7b94f3ece1a 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -182,35 +182,10 @@ SBData SBSection::GetSectionData(uint64_t offset, 
uint64_t size) {
   SBData sb_data;
   SectionSP section_sp(GetSP());
   if (section_sp) {
-const uint64_t sect_file_size = section_sp->GetFileSize();
-if (sect_file_size > 0) {
-  ModuleSP module_sp(section_sp->GetModule());
-  if (module_sp) {
-ObjectFile *objfile = module_sp->GetObjectFile();
-if (objfile) {
-  const uint64_t sect_file_offset =
-  objfile->GetFileOffset() + section_sp->GetFileOffset();
-  const uint64_t file_offset = sect_file_offset + offset;
-  uint64_t file_size = size;
-  if (file_size == UINT64_MAX) {
-file_size = section_sp->GetByteSize();
-if (file_size > offset)
-  file_size -= offset;
-else
-  file_size = 0;
-  }
-  auto data_buffer_sp = FileSystem::Instance().CreateDataBuffer(
-  objfile->GetFileSpec().GetPath(), file_size, file_offset);
-  if (data_buffer_sp && data_buffer_sp->GetByteSize() > 0) {
-DataExtractorSP data_extractor_sp(
-new DataExtractor(data_buffer_sp, objfile->GetByteOrder(),
-  objfile->GetAddressByteSize()));
-
-sb_data.SetOpaque(data_extractor_sp);
-  }
-}
-  }
-}
+DataExtractor section_data;
+section_sp->GetSectionData(section_data);
+sb_data.SetOpaque(
+std::make_shared(section_data, offset, size));
   }
   return sb_data;
 }

diff  --git a/lldb/test/API/python_api/section/TestSectionAPI.py 
b/lldb/test/API/python_api/section/TestSectionAPI.py
index ab9ae56238c8..684de3f3eec6 100644
--- a/lldb/test/API/python_api/section/TestSectionAPI.py
+++ b/lldb/test/API/python_api/section/TestSectionAPI.py
@@ -11,6 +11,8 @@
 
 class SectionAPITestCase(TestBase):
 
+@no_debug_info_test
+@skipIfXmlSupportMissing
 def test_get_target_byte_size(self):
 d = {'EXE': 'b.out'}
 self.build(dictionary=d)
@@ -38,6 +40,8 @@ def test_get_target_byte_size(self):
 self.assertIsNotNone(data_section)
 self.assertEqual(data_section.target_byte_size, 1)
 
+@no_debug_info_test
+@skipIfXmlSupportMissing
 def test_get_alignment(self):
 exe = self.getBuildArtifact("aligned.out")
 self.yaml2obj("aligned.yaml", exe)
@@ -48,3 +52,20 @@ def test_get_alignment(self):
 section = target.modules[0].sections[0]
 self.assertEqual(section.GetAlignment(), 0x1000)
 self.assertEqual(section.alignment, 0x1000)
+
+@no_debug_info_test
+@skipIfXmlSupportMissing
+def test_compressed_section_data(self):
+exe = self.getBuildArtifact("compressed-sections.out")
+self.yaml2obj("compressed-sections.yaml", exe)
+target = self.dbg.CreateTarget(exe)
+self.assertTrue(target, VALID_TARGET)
+
+# exe contains a single section with SHF_COMPRESSED. Check that
+# GetSectionData returns the uncompressed data and not the raw contents
+# of the section.
+section = target.modules[0].sections[0]
+section_data = section.GetSectionData().uint8s
+self.assertEqual(section_data,
+ [0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90])
+

diff  --git a/lldb/test/API/python_api/section/compressed-sections.yaml 
b/lldb/test/API/python_api/section/compressed-sections.yaml
new file mode 100644
index ..a41307ef7d1f
--- /dev/null
+++ b/lldb/test/API/python_api/section/compressed-sections.yaml
@@ -0,0 +1,11 @@
+--- !ELF
+FileHeader:
+  Class:   ELFCLASS32
+  Data:ELFDATA2LSB
+  Type:ET_REL
+  Machine: EM_386
+Sections:
+  - Name:.compressed
+Type:SHT_PROGBITS
+Flags:   [ SHF_COMPRESSED ]
+Content: 010008000100789c533070084828689809c802c1



___

[Lldb-commits] [lldb] e1bbe50 - Revert "[lldb] Make SBSection::GetSectionData call Section::GetSectionData."

2023-01-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-01-30T12:34:37+05:00
New Revision: e1bbe50f5a48e9b5407de9e5f4ab8197dedc85c5

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

LOG: Revert "[lldb] Make SBSection::GetSectionData call 
Section::GetSectionData."

This reverts commit 805600c7d573cf88cf035d01a2ea9389fc24d435.

LLDB windows buildbots were broken by the TestSectionAPI.py test. I dont
have full context of the commit to fix it. Reverting it temporarily.

https://lab.llvm.org/buildbot/#/builders/83/builds/28617
https://lab.llvm.org/buildbot/#/builders/219/builds/180

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

Added: 


Modified: 
lldb/source/API/SBSection.cpp
lldb/test/API/python_api/section/TestSectionAPI.py

Removed: 
lldb/test/API/python_api/section/compressed-sections.yaml



diff  --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index b7b94f3ece1a6..3a9cf20e484a5 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -182,10 +182,35 @@ SBData SBSection::GetSectionData(uint64_t offset, 
uint64_t size) {
   SBData sb_data;
   SectionSP section_sp(GetSP());
   if (section_sp) {
-DataExtractor section_data;
-section_sp->GetSectionData(section_data);
-sb_data.SetOpaque(
-std::make_shared(section_data, offset, size));
+const uint64_t sect_file_size = section_sp->GetFileSize();
+if (sect_file_size > 0) {
+  ModuleSP module_sp(section_sp->GetModule());
+  if (module_sp) {
+ObjectFile *objfile = module_sp->GetObjectFile();
+if (objfile) {
+  const uint64_t sect_file_offset =
+  objfile->GetFileOffset() + section_sp->GetFileOffset();
+  const uint64_t file_offset = sect_file_offset + offset;
+  uint64_t file_size = size;
+  if (file_size == UINT64_MAX) {
+file_size = section_sp->GetByteSize();
+if (file_size > offset)
+  file_size -= offset;
+else
+  file_size = 0;
+  }
+  auto data_buffer_sp = FileSystem::Instance().CreateDataBuffer(
+  objfile->GetFileSpec().GetPath(), file_size, file_offset);
+  if (data_buffer_sp && data_buffer_sp->GetByteSize() > 0) {
+DataExtractorSP data_extractor_sp(
+new DataExtractor(data_buffer_sp, objfile->GetByteOrder(),
+  objfile->GetAddressByteSize()));
+
+sb_data.SetOpaque(data_extractor_sp);
+  }
+}
+  }
+}
   }
   return sb_data;
 }

diff  --git a/lldb/test/API/python_api/section/TestSectionAPI.py 
b/lldb/test/API/python_api/section/TestSectionAPI.py
index b01ddece0de36..ab9ae56238c8b 100644
--- a/lldb/test/API/python_api/section/TestSectionAPI.py
+++ b/lldb/test/API/python_api/section/TestSectionAPI.py
@@ -48,18 +48,3 @@ def test_get_alignment(self):
 section = target.modules[0].sections[0]
 self.assertEqual(section.GetAlignment(), 0x1000)
 self.assertEqual(section.alignment, 0x1000)
-
-def test_compressed_section_data(self):
-exe = self.getBuildArtifact("compressed-sections.out")
-self.yaml2obj("compressed-sections.yaml", exe)
-target = self.dbg.CreateTarget(exe)
-self.assertTrue(target, VALID_TARGET)
-
-# exe contains a single section with SHF_COMPRESSED. Check that
-# GetSectionData returns the uncompressed data and not the raw contents
-# of the section.
-section = target.modules[0].sections[0]
-section_data = section.GetSectionData().uint8s
-self.assertEqual(section_data,
- [0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90])
-

diff  --git a/lldb/test/API/python_api/section/compressed-sections.yaml 
b/lldb/test/API/python_api/section/compressed-sections.yaml
deleted file mode 100644
index a41307ef7d1fc..0
--- a/lldb/test/API/python_api/section/compressed-sections.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
 !ELF
-FileHeader:
-  Class:   ELFCLASS32
-  Data:ELFDATA2LSB
-  Type:ET_REL
-  Machine: EM_386
-Sections:
-  - Name:.compressed
-Type:SHT_PROGBITS
-Flags:   [ SHF_COMPRESSED ]
-Content: 010008000100789c533070084828689809c802c1



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


[Lldb-commits] [lldb] 21be357 - [LLDB] Skip python exception unit test on AArch64/Windows

2023-01-03 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-01-03T18:42:43+04:00
New Revision: 21be357873c0325495c7f6599259579735f54f3e

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

LOG: [LLDB] Skip python exception unit test on AArch64/Windows

This patch marks python exception test as skipped for AArch64/Windows
platform. This is temporary to make LLDB WoA buildbot happy until a proper
fix is found.

Added: 


Modified: 
lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp

Removed: 




diff  --git 
a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp 
b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index 8dd55a5c6a611..2bf713e085760 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -788,6 +788,8 @@ main = foo
 testing::ContainsRegex("line 7, in baz"),
 
testing::ContainsRegex("ZeroDivisionError");
 
+#if !((defined(_WIN32) || defined(_WIN64)) && (defined(__aarch64__) || 
defined(_M_ARM64)))
+
   static const char script2[] = R"(
 class MyError(Exception):
   def __str__(self):
@@ -804,6 +806,8 @@ def main():
llvm::Failed(testing::Property(
::ReadBacktrace,
testing::ContainsRegex("unprintable MyError";
+
+#endif
 }
 
 TEST_F(PythonDataObjectsTest, TestRun) {



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


[Lldb-commits] [lldb] 2b8c308 - [LLDB] Skip TestThreadSpecificBreakpoint.py on AArch64/Windows

2023-01-03 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-01-03T18:42:43+04:00
New Revision: 2b8c308fa1d3ba504c1bde16f262683685b19726

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

LOG: [LLDB] Skip TestThreadSpecificBreakpoint.py on AArch64/Windows

TestThreadSpecificBreakpoint.py is flaky on AArch64/Windows buildbot
and results in timeout randomly. This patch marks the test skipped.

Added: 


Modified: 

lldb/test/API/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
 
b/lldb/test/API/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
index 521e56109ea38..f5561ef856ed6 100644
--- 
a/lldb/test/API/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
+++ 
b/lldb/test/API/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
@@ -26,6 +26,7 @@ class ThreadSpecificBreakTestCase(TestBase):
 @add_test_categories(['pyapi'])
 
 @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], 
archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios 
problem - breakpoint with tid qualifier isn't working
+@skipIf(oslist=['windows'], archs=['aarch64']) # Flaky on buildbot
 def test_thread_id(self):
 self.do_test(set_thread_id)
 
@@ -35,6 +36,7 @@ def test_thread_name(self):
 self.do_test(set_thread_name)
 
 @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], 
archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios 
problem - breakpoint with tid qualifier isn't working
+@skipIf(oslist=['windows'], archs=['aarch64']) # Flaky on buildbot
 def test_current_token(self):
 self.do_test(using_current)
 



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


[Lldb-commits] [lldb] dbee45d - [LLDB] Enable TestSignedTypes.py for AArch64/Windows

2023-01-02 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-01-02T19:33:45+04:00
New Revision: dbee45d8fea97dca9666b09688cc7548d5023c4e

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

LOG: [LLDB] Enable TestSignedTypes.py for AArch64/Windows

TestSignedTypes.py passes on AArch64 Windows. This patch disables this
test only for i[3-6]86 and x86_64 Windows platform.

Added: 


Modified: 
lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py

Removed: 




diff  --git a/lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py 
b/lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
index e94dabe7ac48f..015eaea547dc4 100644
--- a/lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
+++ b/lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py
@@ -20,7 +20,7 @@ def setUp(self):
 self.line = line_number(
 self.source, '// Set break point at this line.')
 
-@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
+@expectedFailureAll(oslist=["windows"], archs=["i[3-6]86", "x86_64"], 
bugnumber="llvm.org/pr24489")
 def test(self):
 """Test that variables with signed types display correctly."""
 self.build()



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


[Lldb-commits] [lldb] 58e9cc1 - Revert "[lldb] Remove redundant .c_str() and .get() calls"

2022-12-19 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-12-19T13:52:10+05:00
New Revision: 58e9cc13e24f668a33abdae201d59a02e10c22c0

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

LOG: Revert "[lldb] Remove redundant .c_str() and .get() calls"

This reverts commit fbaf48be0ff6fb24b9aa8fe9c2284fe88a8798dd.

This has broken all LLDB buildbots:
https://lab.llvm.org/buildbot/#/builders/68/builds/44990
https://lab.llvm.org/buildbot/#/builders/96/builds/33160

Added: 


Modified: 
lldb/include/lldb/Target/Process.h
lldb/source/API/SBCommandReturnObject.cpp
lldb/source/API/SBExpressionOptions.cpp
lldb/source/API/SBSourceManager.cpp
lldb/source/Breakpoint/BreakpointResolverScripted.cpp
lldb/source/Commands/CommandObjectBreakpoint.cpp
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Commands/CommandObjectHelp.cpp
lldb/source/Commands/CommandObjectMultiword.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Core/Disassembler.cpp
lldb/source/Core/FormatEntity.cpp
lldb/source/Core/IOHandlerCursesGUI.cpp
lldb/source/Expression/REPL.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/OptionArgParser.cpp
lldb/source/Interpreter/OptionValueArch.cpp
lldb/source/Interpreter/ScriptInterpreter.cpp

lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
lldb/source/Plugins/ExpressionParser/Clang/NameSearchContext.cpp

lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp

lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.cpp
lldb/source/Plugins/Language/ObjC/Cocoa.cpp
lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
lldb/source/Plugins/Platform/Android/AdbClient.cpp
lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwinDevice.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp

lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.h
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp

lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h
lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
lldb/source/Target/LanguageRuntime.cpp
lldb/source/Target/TargetList.cpp
lldb/source/Target/Thread.cpp
lldb/source/Target/ThreadPlanStack.cpp
lldb/tools/debugserver/source/DNBTimer.h
lldb/tools/lldb-vscode/BreakpointBase.cpp

Removed: 




diff  --git a/lldb/include/lldb/Target/Process.h 
b/lldb/include/lldb/Target/Process.h
index 8bb8b85e22fbc..47040137078f6 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -2704,7 +2704,7 @@ void PruneThreadPlans();
   };
 
   void SetNextEventAction(Process::NextEventAction *next_event_action) {
-if (m_next_event_action_up)
+if (m_next_event_action_up.get())
   m_next_event_action_up->HandleBeingUnshipped();
 
 m_next_event_action_up.reset(next_event_action);

diff  --git a/lldb/source/API/SBCommandReturnObject.cpp 
b/lldb/source/API/SBCommandReturnObject.cpp
index bf9c66453c90b..7d2c102b3d8c1 100644
--- a/lldb/source/API/SBCommandReturnObject.cpp
+++ b/lldb/source/API/SBCommandReturnObject.cpp
@@ -292,7 +292,7 @@ void SBCommandReturnObject::PutCString(const char *string, 
int len) {
 return;
   } else if (len > 0) {
 std::string buffer(string, len);
-ref().AppendMessage(buffer);
+ref().AppendMessage(buffer.c_str());
   } else
 ref().AppendMessage(string);
 }

diff  --git a/lldb/source/API/SBExpressionOptions.cpp 
b/lldb/source/API/SBExpressionOptions.cpp
index 6ae57f24606af..d07acbc0aa2db 100644
--- a/lldb/source/API/SBExpressionOptions.cpp
+++ b/lldb/source/API/SBExpressionOptions.cpp
@@ -254,5 +254,5 @@ EvaluateExpressionOptions *SBExpressionOptions::get() const 
{
 }
 
 EvaluateExpressionOptions ::ref() const {
-  return *m_opaque_up;

[Lldb-commits] [lldb] d599ac4 - [LLDB] Xfail TestVSCode_eventStatistic.py on Arm/AArch64 Linux

2022-11-15 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-11-16T10:45:24+04:00
New Revision: d599ac41aabddeb2442db7b31faacf143d63abe4

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

LOG: [LLDB] Xfail TestVSCode_eventStatistic.py on Arm/AArch64 Linux

This patch marks TestVSCode_eventStatistic.py as xfail on Arm/AArch64
Linux platform. test_initialized_event testcase is failing. See buildbot
logs below:

https://lab.llvm.org/buildbot/#/builders/17/builds/30199
https://lab.llvm.org/buildbot/#/builders/96/builds/31528

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

Added: 


Modified: 
lldb/test/API/tools/lldb-vscode/eventStatistic/TestVSCode_eventStatistic.py

Removed: 




diff  --git 
a/lldb/test/API/tools/lldb-vscode/eventStatistic/TestVSCode_eventStatistic.py 
b/lldb/test/API/tools/lldb-vscode/eventStatistic/TestVSCode_eventStatistic.py
index b70e21ef7d9d..2b7630795dca 100644
--- 
a/lldb/test/API/tools/lldb-vscode/eventStatistic/TestVSCode_eventStatistic.py
+++ 
b/lldb/test/API/tools/lldb-vscode/eventStatistic/TestVSCode_eventStatistic.py
@@ -70,6 +70,7 @@ def test_terminated_event(self):
 
 @skipIfWindows
 @skipIfRemote
+@expectedFailureAll(oslist=['linux'], archs=['arm', 'aarch64'])
 def test_initialized_event(self):
 '''
 Initialized Event



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


[Lldb-commits] [lldb] 4db7832 - [LLDB] Make API tests to run using MSYS tools

2022-09-01 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-09-01T14:00:46+05:00
New Revision: 4db78322031ffbd5ea607d7ff66fed5fafb40d68

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

LOG: [LLDB] Make API tests to run using MSYS tools

MSYS 'uname' on windows returns "MSYS_NT*" instead of windows32 and also
MSYS 'pwd' returns non-windows path string.
This patch fixes Makefile.rules to make adjustments required to run LLDB
API tests using MSYS tools.

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

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/make/Makefile.rules

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 36ef02810152..937a2ae06fc4 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -49,8 +49,9 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
 #--
 # If OS is not defined, use 'uname -s' to determine the OS name.
 #
-# uname on Windows gives "windows32" or "server version windows32", but most
-# environments standardize on "Windows_NT", so we'll make it consistent here.
+# GNUWin32 uname gives "windows32" or "server version windows32" while
+# some versions of MSYS uname return "MSYS_NT*", but most environments
+# standardize on "Windows_NT", so we'll make it consistent here. 
 # When running tests from Visual Studio, the environment variable isn't
 # inherited all the way down to the process spawned for make.
 #--
@@ -58,6 +59,11 @@ HOST_OS := $(shell uname -s)
 ifneq (,$(findstring windows32,$(HOST_OS)))
HOST_OS := Windows_NT
 endif
+
+ifneq (,$(findstring MSYS_NT,$(HOST_OS)))
+   HOST_OS := Windows_NT
+endif
+
 ifeq "$(OS)" ""
OS := $(HOST_OS)
 endif
@@ -68,9 +74,12 @@ endif
 # Some versions of make on Windows will search for other shells such as
 # C:\cygwin\bin\sh.exe. This shell fails for numerous 
diff erent reasons
 # so default to using cmd.exe.
+# Also reset BUILDDIR value because "pwd" returns cygwin or msys path
+# which needs to be converted to windows path.
 #--
 ifeq "$(OS)" "Windows_NT"
SHELL = $(WINDIR)\system32\cmd.exe
+   BUILDDIR := $(shell echo %cd%)
 endif
 
 #--



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


[Lldb-commits] [lldb] 0e6a71e - [LLDB] Make build.py use uname to set platform

2022-09-01 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-09-01T14:00:47+05:00
New Revision: 0e6a71e6a3d11f6d9c9664b56f304757edf1c82e

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

LOG: [LLDB] Make build.py use uname to set platform

This patch makes build helper script build.py to use platform.uname for
machine/architecture detection. Visual studio environment when set using
various batch files like vcvars*.bat set PLATFORM environment variable
however VsDevCmd.bat does not set PLATFORM variable.

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

Added: 


Modified: 
lldb/test/Shell/helper/build.py

Removed: 




diff  --git a/lldb/test/Shell/helper/build.py b/lldb/test/Shell/helper/build.py
index 4b1fe239239a..96684b7b3e66 100755
--- a/lldb/test/Shell/helper/build.py
+++ b/lldb/test/Shell/helper/build.py
@@ -2,6 +2,7 @@
 
 import argparse
 import os
+import platform
 import shutil
 import signal
 import subprocess
@@ -274,7 +275,7 @@ class MsvcBuilder(Builder):
 def __init__(self, toolchain_type, args):
 Builder.__init__(self, toolchain_type, args, '.obj')
 
-if os.getenv('PLATFORM') == 'arm64':
+if platform.uname().machine.lower() == 'arm64':
 self.msvc_arch_str = 'arm' if self.arch == '32' else 'arm64'
 else:
 self.msvc_arch_str = 'x86' if self.arch == '32' else 'x64'



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


[Lldb-commits] [lldb] 849ca46 - [LLDB] Skip TestFunctionTemplateSpecializationTempArgs for Arm64/Windows

2022-08-24 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-08-24T20:07:00+05:00
New Revision: 849ca4626e9706d7b132ea696c5bf8c0ba0dc977

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

LOG: [LLDB] Skip TestFunctionTemplateSpecializationTempArgs for Arm64/Windows

This test fails on buildbot while passes on standalone builds. I am
marking it as skipped until actual problem is found and resolved.

Added: 


Modified: 

lldb/test/API/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py
 
b/lldb/test/API/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py
index 5bbed6e88751..a065153832af 100644
--- 
a/lldb/test/API/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py
+++ 
b/lldb/test/API/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py
@@ -5,6 +5,7 @@
 
 class TestFunctionTemplateSpecializationTempArgs(TestBase):
 
+@skipIf(oslist=['windows'], archs=['aarch64'])
 def test_function_template_specialization_temp_args(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] a1bf0c0 - [LLDB] Skip buildbot failures AArch64/Windows

2022-08-02 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-08-02T16:59:12+05:00
New Revision: a1bf0c08947d54a38cf10fed8e2b88fed2d50e52

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

LOG: [LLDB] Skip buildbot failures AArch64/Windows

TestInlineStepping.py is flaky while TestUseSourceCache.py fails on
Windows 11 only. Marked them skipped to make buildbot happy.

Added: 


Modified: 
lldb/test/API/commands/settings/use_source_cache/TestUseSourceCache.py
lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py

Removed: 




diff  --git 
a/lldb/test/API/commands/settings/use_source_cache/TestUseSourceCache.py 
b/lldb/test/API/commands/settings/use_source_cache/TestUseSourceCache.py
index b6b279aaec65a..712642d0ce01e 100644
--- a/lldb/test/API/commands/settings/use_source_cache/TestUseSourceCache.py
+++ b/lldb/test/API/commands/settings/use_source_cache/TestUseSourceCache.py
@@ -17,6 +17,7 @@ def test_set_use_source_cache_false(self):
 self.set_use_source_cache_and_test(False)
 
 @skipIf(hostoslist=no_match(["windows"]))
+@skipIf(oslist=['windows'], archs=['aarch64']) # Fails on windows 11
 def test_set_use_source_cache_true(self):
 """Test that after 'set use-source-cache false', files are locked."""
 self.set_use_source_cache_and_test(True)

diff  --git 
a/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py 
b/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
index 64045739984c7..7c5ae442cc5b9 100644
--- a/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
+++ b/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
@@ -11,6 +11,7 @@
 class TestInlineStepping(TestBase):
 
 @add_test_categories(['pyapi'])
+@skipIf(oslist=['windows'], archs=['aarch64']) # Flaky on buildbot
 @expectedFailureAll(
 compiler="icc",
 bugnumber="# Not really a bug.  ICC combines two inlined functions.")



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


[Lldb-commits] [lldb] f827b4b - [LLDB] Fix TestConvenienceVariables.test AArch64/Windows

2022-07-13 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-13T16:46:55+05:00
New Revision: f827b4b657d5922beef3799337e91ba98fce852e

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

LOG: [LLDB] Fix TestConvenienceVariables.test AArch64/Windows

This patch fixes TestConvenienceVariables.test for AArch64 Windows.
Clang/LLD was unable to find printf apparently available as a macro
definition in stdio.h.

Added: 


Modified: 
lldb/test/Shell/Driver/Inputs/hello.cpp
lldb/test/Shell/Driver/TestConvenienceVariables.test

Removed: 




diff  --git a/lldb/test/Shell/Driver/Inputs/hello.cpp 
b/lldb/test/Shell/Driver/Inputs/hello.cpp
index 1ec0677aeb2c7..7a46e19b927a5 100644
--- a/lldb/test/Shell/Driver/Inputs/hello.cpp
+++ b/lldb/test/Shell/Driver/Inputs/hello.cpp
@@ -1,11 +1,6 @@
-// The build.py script always runs the compiler in C++ mode, regardless of the
-// file extension. This results in mangled names presented to the linker which
-// in turn cannot find the printf symbol.
-extern "C" {
-int printf(const char *format, ...);
+#include
 
 int main(int argc, char **argv) {
   printf("Hello World\n");
   return 0;
 }
-}

diff  --git a/lldb/test/Shell/Driver/TestConvenienceVariables.test 
b/lldb/test/Shell/Driver/TestConvenienceVariables.test
index 63ba15ec7468c..45dc7673bfc51 100644
--- a/lldb/test/Shell/Driver/TestConvenienceVariables.test
+++ b/lldb/test/Shell/Driver/TestConvenienceVariables.test
@@ -19,7 +19,7 @@ CHECK-NEXT: SBProcess: pid = {{[0-9]+}}, state = stopped, 
threads = {{[0-9]+}},
 CHECK: script print(lldb.thread.GetStopDescription(100))
 CHECK-NEXT: breakpoint 1.1
 CHECK: script lldb.frame.GetLineEntry().GetLine()
-CHECK-NEXT: 8
+CHECK-NEXT: 4
 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
 CHECK-NEXT: hello.c
 CHECK: script lldb.frame.GetFunctionName()



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


[Lldb-commits] [lldb] 7610524 - [LLDB] Fix TestThreadAPI.py for AArch64/Windows

2022-07-13 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-13T16:30:09+05:00
New Revision: 7610524af3c99e63ec6b3a452c45af51ffae57fa

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

LOG: [LLDB] Fix TestThreadAPI.py for AArch64/Windows

This patch fixes TestThreadAPI for AArch64 windows by switching over to
PDB debug info instead of DWARF. This is needed to step over library
functions like printf as there is debug info mismatch between DWARF and
PDB. PDB DWARF interworking is not fully supported by LLDB at the
moment.

Added: 


Modified: 
lldb/test/API/python_api/thread/Makefile

Removed: 




diff  --git a/lldb/test/API/python_api/thread/Makefile 
b/lldb/test/API/python_api/thread/Makefile
index 30749db9a67cf..57ef8f826d22d 100644
--- a/lldb/test/API/python_api/thread/Makefile
+++ b/lldb/test/API/python_api/thread/Makefile
@@ -1,3 +1,5 @@
 CXX_SOURCES ?= main.cpp
 
+DEBUG_INFO_FLAG := -g
+
 include Makefile.rules



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


[Lldb-commits] [lldb] b82b018 - [LLDB] XFail TestLoadUnload.test_static_init_during_load AArch64/Windows

2022-07-13 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-13T16:18:18+05:00
New Revision: b82b0187129ddb40d85c6fc0847c536967273600

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

LOG: [LLDB] XFail TestLoadUnload.test_static_init_during_load AArch64/Windows

This patch fixes marks TestLoadUnload.test_static_init_during_load as
xfail for AArch64 windows. It is failing similar to Linux and already
marked xfail for linux.

Added: 


Modified: 
lldb/test/API/functionalities/load_unload/TestLoadUnload.py

Removed: 




diff  --git a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py 
b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
index 70d08f4884c08..d310c08d77426 100644
--- a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
@@ -377,6 +377,7 @@ def run_step_over_load(self):
 # We can't find a breakpoint location for d_init before launching because
 # executable dependencies are resolved relative to the debuggers PWD. Bug?
 @expectedFailureAll(oslist=["freebsd", "linux", "netbsd"], 
triple=no_match('aarch64-.*-android'))
+@expectedFailureAll(oslist=["windows"], archs=["aarch64"])
 def test_static_init_during_load(self):
 """Test that we can set breakpoints correctly in static initializers"""
 self.copy_shlibs_to_remote()



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


[Lldb-commits] [lldb] 891319f - [LLDB] Fix pointers.test for AArch64/Windows

2022-07-13 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-13T15:55:31+05:00
New Revision: 891319f654c102572cf7028ed04bbaf6c59e7bff

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

LOG: [LLDB] Fix pointers.test for AArch64/Windows

pointers.test started failing again for AArch64 windows after D125509
This patch fixes the test to make it pass on AArch64 windows again.

LLDB AArch64 Windows buildbot running at:
https://lab.llvm.org/staging/#/builders/207

Added: 


Modified: 
lldb/test/Shell/SymbolFile/PDB/pointers.test

Removed: 




diff  --git a/lldb/test/Shell/SymbolFile/PDB/pointers.test 
b/lldb/test/Shell/SymbolFile/PDB/pointers.test
index 841fe8804b44c..a3e6f557fed6f 100644
--- a/lldb/test/Shell/SymbolFile/PDB/pointers.test
+++ b/lldb/test/Shell/SymbolFile/PDB/pointers.test
@@ -33,6 +33,6 @@ MAIN-SAME:(int (ST::*)(int){{( 
__attribute__\(\(thiscall\)\))?}}), scope = l
 F:   Function{[[FID2:.*]]}, demangled = {{.*}}f(int)
 F-NEXT:  Block{[[FID2]]}
 F: Variable{{.*}}, name = "this"
-F-SAME:(ST *), scope = parameter,{{( location = DW_OP.*,)?}} artificial
+F-SAME:(ST *), scope = parameter, location = {{(DW_OP.*)|()}}, 
artificial
 F: Variable{{.*}}, name = "x"
 F-SAME:(int), scope = parameter, decl = PointerTypeTest.cpp:8



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


[Lldb-commits] [lldb] 7b69843 - [LLDB] Catagory decorator for watchpoint test in TestCompletion.py

2022-07-12 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-12T17:15:33+05:00
New Revision: 7b69843f0b502bb765206f534d7f50dcf88a60e5

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

LOG: [LLDB] Catagory decorator for watchpoint test in TestCompletion.py

This patch adds watchpoint catagory decorator to watchpoint dependent
tests in TestCompletion.py.

Added: 


Modified: 
lldb/test/API/functionalities/completion/TestCompletion.py

Removed: 




diff  --git a/lldb/test/API/functionalities/completion/TestCompletion.py 
b/lldb/test/API/functionalities/completion/TestCompletion.py
index 17c1b29362ae9..49950e0cec13a 100644
--- a/lldb/test/API/functionalities/completion/TestCompletion.py
+++ b/lldb/test/API/functionalities/completion/TestCompletion.py
@@ -291,6 +291,7 @@ def test_help_watchpoint_s(self):
 self.complete_from_to('help watchpoint s', 'help watchpoint set ')
 
 @expectedFailureNetBSD
+@add_test_categories(["watchpoint"])
 def test_common_complete_watchpoint_ids(self):
 subcommands = ['enable', 'disable', 'delete', 'modify', 'ignore']
 



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


[Lldb-commits] [lldb] 68cc1ee - [LLDB] Fix NativePDB/local-variables.cpp for AArch64/Windows

2022-07-12 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-12T16:26:47+05:00
New Revision: 68cc1eeb1d7fbcaf307fbf199a7c61debf1dd1c1

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

LOG: [LLDB] Fix NativePDB/local-variables.cpp for AArch64/Windows

This patch fixes NativePDB/local-variables.cpp test for AArch64 Windows.
There are two changes:
1) Replace function breakpoint with line breakpoint required due to pr56288
2) Adjust "target modules dump ast" test as the output was slightly different
on AArch64/Windows.

Added: 


Modified: 
lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp

Removed: 




diff  --git 
a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit 
b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
index 0d7371e86f1cb..1071edd25c92b 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
@@ -1,4 +1,4 @@
-break set -n main
+break set -f local-variables.cpp -l 17
 run a b c d e f g
 p argc
 step

diff  --git a/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp 
b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
index 68b23d49a31e5..4779a28c8b380 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
@@ -22,7 +22,7 @@ int main(int argc, char **argv) {
 // CHECK-NEXT: Current executable set to '{{.*}}local-variables.cpp.tmp.exe'
 // CHECK-NEXT: (lldb) command source -s 0 '{{.*}}local-variables.lldbinit'
 // CHECK-NEXT: Executing commands in '{{.*}}local-variables.lldbinit'.
-// CHECK-NEXT: (lldb) break set -n main
+// CHECK-NEXT: (lldb) break set -f local-variables.cpp -l 17
 // CHECK-NEXT: Breakpoint 1: where = local-variables.cpp.tmp.exe`main + {{.*}} 
at local-variables.cpp:{{.*}}, address = {{.*}}
 // CHECK-NEXT: (lldb) run a b c d e f g
 // CHECK-NEXT: Process {{.*}} stopped
@@ -158,6 +158,6 @@ int main(int argc, char **argv) {
 // CHECK-NEXT: | `-ParmVarDecl {{.*}} argv 'char **'
 // CHECK-NEXT: |-FunctionDecl {{.*}} __scrt_common_main_seh 'int ()' static 
 // CHECK-NEXT: |-FunctionDecl {{.*}} invoke_main 'int ()' inline
-// CHECK-NEXT: `-FunctionDecl {{.*}} Function 'int (int, char)'
+// CHECK: `-FunctionDecl {{.*}} Function 'int (int, char)'
 // CHECK-NEXT:   |-ParmVarDecl {{.*}} Param1 'int'
 // CHECK-NEXT:   `-ParmVarDecl {{.*}} Param2 'char'



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


[Lldb-commits] [lldb] bb9b30f - [LLDB] Remove TestLoadUnload.py Arm/Linux Xfail decorator

2022-07-05 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-06T01:39:52+04:00
New Revision: bb9b30ffbe7c80c94807f01eb31429e4f9f2ce2e

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

LOG: [LLDB] Remove TestLoadUnload.py Arm/Linux Xfail decorator

This is a follow up on my last commit where one of the decorator was
left unremoved.

This patch removes Xfail decorator from TestLoadUnload.py as it is now
passing on Arm/Linux buildbot.

Added: 


Modified: 
lldb/test/API/functionalities/load_unload/TestLoadUnload.py

Removed: 




diff  --git a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py 
b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
index 58123251a64e..70d08f4884c0 100644
--- a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
@@ -201,7 +201,6 @@ def test_dyld_library_path(self):
 hostoslist=["windows"],
 triple='.*-android')
 @expectedFailureAll(oslist=["windows"]) # process load not implemented
-@expectedFailureAll(oslist=["linux"], archs=["arm"]) # Fails on ubuntu 
jammy
 def test_lldb_process_load_and_unload_commands(self):
 self.setSvr4Support(False)
 self.run_lldb_process_load_and_unload_commands()



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


[Lldb-commits] [lldb] 5cca2ef - [LLDB] Remove TestLoadUnload.py Arm/Linux Xfail decorator

2022-07-05 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-06T01:14:40+04:00
New Revision: 5cca2ef3c35a08ce439e65e04a8d18d5bb4a6e4e

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

LOG: [LLDB] Remove TestLoadUnload.py Arm/Linux Xfail decorator

This patch removes Xfail decorator from TestLoadUnload.py as it is now
passing on Arm/Linux buildbot.

Added: 


Modified: 
lldb/test/API/functionalities/load_unload/TestLoadUnload.py

Removed: 




diff  --git a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py 
b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
index eb5c5592cd8c7..58123251a64e5 100644
--- a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
@@ -295,7 +295,6 @@ def run_lldb_process_load_and_unload_commands(self):
 self.runCmd("process continue")
 
 @expectedFailureAll(oslist=["windows"]) # breakpoint not hit
-@expectedFailureAll(oslist=["linux"], archs=["arm"]) # Fails on ubuntu 
jammy
 def test_load_unload(self):
 self.setSvr4Support(False)
 self.run_load_unload()



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


[Lldb-commits] [lldb] b7b1109 - [LLDB] Fix decorator import in TestTwoHitsOneActual.py

2022-07-05 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-05T15:26:26+04:00
New Revision: b7b11091efd2f9e5e90bc449b1c2591ae0af9648

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

LOG: [LLDB] Fix decorator import in TestTwoHitsOneActual.py

Added: 


Modified: 

lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
 
b/lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
index cd3c314358f7..6e5c721b6900 100644
--- 
a/lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
+++ 
b/lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
@@ -7,6 +7,7 @@
 
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 
 



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


[Lldb-commits] [lldb] 3b2496e - [LLDB] Skip TestTwoHitsOneActual.py on Arm/AArch64 Linux

2022-07-05 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-05T15:01:51+04:00
New Revision: 3b2496e8faae2ba99f2d56f11f1cb44b68c353ae

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

LOG: [LLDB] Skip TestTwoHitsOneActual.py on Arm/AArch64 Linux

This test has some race condition which is making it hang on LLDB
Arm/AArch64 Linux buildbot. I am marking it as skipped until we
investigate whats going wrong.

Added: 


Modified: 

lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
 
b/lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
index 530e715d3c3a9..cd3c314358f75 100644
--- 
a/lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
+++ 
b/lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
@@ -14,6 +14,7 @@ class TestTwoHitsOneActual(TestBase):
 
 NO_DEBUG_INFO_TESTCASE = True
 
+@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
 def test_two_hits_one_actual(self):
 """There can be many tests in a test case - describe this test here."""
 self.build()



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


[Lldb-commits] [lldb] ba14e4d - [LLDB] Disable TestGdbRemoteFork* for Arm/AArch64 Linux

2022-07-05 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-05T13:45:26+04:00
New Revision: ba14e4d65cddb6057374c71232e17cbc03be974d

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

LOG: [LLDB] Disable TestGdbRemoteFork* for Arm/AArch64 Linux

This test is causing some trouble with LLDB Arm/AArch64 Linux buildbot.
I am disabling is temporarily to make buildbot green.

Added: 


Modified: 
lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py

Removed: 




diff  --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py 
b/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
index 0c169de3f4d06..a67c566d265ba 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
@@ -7,6 +7,11 @@
 
 
 class TestGdbRemoteFork(GdbRemoteForkTestBase):
+def setUp(self):
+GdbRemoteForkTestBase.setUp(self)
+if self.getPlatform() == "linux" and self.getArchitecture() in ['arm', 
'aarch64']:
+self.skipTest("Unsupported for Arm/AArch64 Linux")
+
 @add_test_categories(["fork"])
 def test_fork_multithreaded(self):
 _, _, child_pid, _ = self.start_fork_test(["thread:new"]*2 + ["fork"])

diff  --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py 
b/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
index 764f238a51eea..7ba3764855137 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
@@ -5,6 +5,11 @@
 
 
 class TestGdbRemoteForkNonStop(GdbRemoteForkTestBase):
+def setUp(self):
+GdbRemoteForkTestBase.setUp(self)
+if self.getPlatform() == "linux" and self.getArchitecture() in ['arm', 
'aarch64']:
+self.skipTest("Unsupported for Arm/AArch64 Linux")
+
 @add_test_categories(["fork"])
 def test_vfork_nonstop(self):
 parent_pid, parent_tid = self.fork_and_detach_test("vfork",



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


[Lldb-commits] [lldb] 3d477bb - [LLDB] Xfail TestStepNoDebug.py AArch64/Windows

2022-07-01 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-07-01T12:25:43+04:00
New Revision: 3d477bbeee55ca965553778e62085a37d062323f

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

LOG: [LLDB] Xfail TestStepNoDebug.py AArch64/Windows

LLDB fails to step in/out/over code with missing debug information.
This is only reproducible on AArch64/Windows. I have reported a issue
upstream at llvm.org/pr56292

This patch Xfail TestStepNoDebug.py for AArch64/Windows.

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 9c72b0f03f791..98b80051368a9 100644
--- a/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
+++ b/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
@@ -14,6 +14,7 @@
 class StepAvoidsNoDebugTestCase(TestBase):
 
 @add_test_categories(['pyapi'])
+@expectedFailureAll(archs=["aarch64"], oslist=["windows"], 
bugnumber="llvm.org/pr56292")
 def test_step_out_with_python(self):
 """Test stepping out using avoid-no-debug with dsyms."""
 self.build()
@@ -31,6 +32,7 @@ def test_step_out_with_python(self):
 archs=["i386"],
 oslist=no_match(["freebsd"]),
 bugnumber="llvm.org/pr28549")
+@expectedFailureAll(archs=["aarch64"], oslist=["windows"], 
bugnumber="llvm.org/pr56292")
 def test_step_over_with_python(self):
 """Test stepping over using avoid-no-debug with dwarf."""
 self.build()
@@ -48,6 +50,7 @@ def test_step_over_with_python(self):
 archs=["i386"],
 oslist=no_match(["freebsd"]),
 bugnumber="llvm.org/pr28549")
+@expectedFailureAll(archs=["aarch64"], oslist=["windows"], 
bugnumber="llvm.org/pr56292")
 def test_step_in_with_python(self):
 """Test stepping in using avoid-no-debug with dwarf."""
 self.build()



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


[Lldb-commits] [lldb] 8e9360d - Fix PDB/func-symbols.test for Arm/Windows

2022-06-30 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-30T17:58:19+04:00
New Revision: 8e9360db1b4128ad4d90a6fe1cf1c20879976f64

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

LOG: Fix PDB/func-symbols.test for Arm/Windows

PDB/func-symbols.test was orignally written for 32bit x86, keeping in
mind cdecl and stdcall calling conventions which does name mangling for
example like adding "_" underscore before function name.
This is only x86 specific but purpose of pointers.test is NOT to test
calling convention.
I have made a minor change to make this test pass on Windows/Arm.

Added: 


Modified: 
lldb/test/Shell/SymbolFile/PDB/func-symbols.test

Removed: 




diff  --git a/lldb/test/Shell/SymbolFile/PDB/func-symbols.test 
b/lldb/test/Shell/SymbolFile/PDB/func-symbols.test
index 676be1c632b03..5990952938e67 100644
--- a/lldb/test/Shell/SymbolFile/PDB/func-symbols.test
+++ b/lldb/test/Shell/SymbolFile/PDB/func-symbols.test
@@ -27,7 +27,7 @@ CHECK-ONE-DAG: Function{[[UID1]]}, mangled = 
?Func_arg_void@@YAXXZ, demangled =
 CHECK-ONE-DAG: Function{[[UID2]]}, mangled = ?Func_arg_none@@YAXXZ, demangled 
= {{.*}}, type = [[TY2]]
 CHECK-ONE-DAG: Function{[[UID3]]}, mangled = ?Func_varargs@@YAXZZ, demangled = 
{{.*}}, type = [[TY3]]
 CHECK-ONE-DAG: Function{[[UID4]]}, mangled = ?Func@NS@@YAXDH@Z, demangled = 
{{.*}}, type = [[TY4]]
-CHECK-ONE-DAG: Function{[[UID5]]}, mangled = _main, demangled = {{.*}}, type = 
[[TY5]]
+CHECK-ONE-DAG: Function{[[UID5]]}, mangled = {{_?}}main, demangled = {{.*}}, 
type = [[TY5]]
 CHECK-ONE-DAG: Function{[[UID6]]}, demangled = {{.*}}`anonymous 
namespace'::Func{{.*}}, type = [[TY6]]
 CHECK-ONE-DAG: Function{[[UID7]]}, demangled = {{.*}}StaticFunction{{.*}}, 
type = [[TY7]]
 CHECK-ONE-DAG: Function{[[UID8]]}, mangled = ?Func@A@MemberTest@@QAAHHZZ, 
demangled = {{.*}}, type = [[TY8]]



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


[Lldb-commits] [lldb] dd01d9a - Fix TestCommandScript.py for Arm/Windows

2022-06-30 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-30T17:48:28+04:00
New Revision: dd01d9aadb6107075c1c2254a2de0670a4d2f0ed

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

LOG: Fix TestCommandScript.py for Arm/Windows

TestCommandScript.py fails on Arm/Windows due following issues:
https://llvm.org/pr56288
https://llvm.org/pr56292

LLDB fails to skip prologue and also step over library function or
nodebug functions fails due to PDB/DWARF mismatch.

This patch replace function breakpoint with line breakpoint so that we
can expect LLDB to stop on desired line. Also replace dwarf with PDB
debug info for this test only.

Added: 


Modified: 
lldb/test/API/commands/command/script/Makefile
lldb/test/API/commands/command/script/TestCommandScript.py

Removed: 




diff  --git a/lldb/test/API/commands/command/script/Makefile 
b/lldb/test/API/commands/command/script/Makefile
index 8b20bcb05..c9a35c808f22b 100644
--- a/lldb/test/API/commands/command/script/Makefile
+++ b/lldb/test/API/commands/command/script/Makefile
@@ -1,3 +1,5 @@
 CXX_SOURCES := main.cpp
 
+DEBUG_INFO_FLAG := -g
+
 include Makefile.rules

diff  --git a/lldb/test/API/commands/command/script/TestCommandScript.py 
b/lldb/test/API/commands/command/script/TestCommandScript.py
index 6f369470803f9..756cb4a3632f8 100644
--- a/lldb/test/API/commands/command/script/TestCommandScript.py
+++ b/lldb/test/API/commands/command/script/TestCommandScript.py
@@ -113,7 +113,7 @@ def cleanup():
 self.expect("longwait",
 substrs=['Done; if you saw the delays I am doing OK'])
 
-self.runCmd("b main")
+self.runCmd("break set -f main.cpp -l 48")
 self.runCmd("run")
 self.runCmd("mysto 3")
 self.expect("frame variable array",



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


[Lldb-commits] [lldb] 8b7f5ee - [LLDB] Fix TestSTL.py Makefile to remove -gdwarf O0

2022-06-30 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-30T14:06:21+04:00
New Revision: 8b7f5ee5f05a0972802055204a423009d3398a0d

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

LOG: [LLDB] Fix TestSTL.py Makefile to remove -gdwarf O0

This is a follow up to my previous commit where TestSTL.py got broken
due to 9c6e04359282e9051f7b2744b99266ece32db001.
Now that we force dwarf symbols by default on windows we dont need to
specifically put -gdwarf O0 in debug flags for this test.

Added: 


Modified: 
lldb/test/API/lang/cpp/stl/Makefile

Removed: 




diff  --git a/lldb/test/API/lang/cpp/stl/Makefile 
b/lldb/test/API/lang/cpp/stl/Makefile
index 3c20771e6dba..8b20bcb0 100644
--- a/lldb/test/API/lang/cpp/stl/Makefile
+++ b/lldb/test/API/lang/cpp/stl/Makefile
@@ -1,5 +1,3 @@
 CXX_SOURCES := main.cpp
 
-DEBUG_INFO_FLAG := -gdwarf -O0
-
 include Makefile.rules



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


[Lldb-commits] [lldb] 5fe0da6 - [LLDB] Fix TestSTL.py on Windows

2022-06-30 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-30T13:27:14+04:00
New Revision: 5fe0da6d7bcda22b03c470bef030030fa2d6d6f0

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

LOG: [LLDB] Fix TestSTL.py on Windows

TestSTL.py was broken by 9c6e04359282e9051f7b2744b99266ece32db001.
This patch fixes it with changes to its Makefile.

Added: 


Modified: 
lldb/test/API/lang/cpp/stl/Makefile

Removed: 




diff  --git a/lldb/test/API/lang/cpp/stl/Makefile 
b/lldb/test/API/lang/cpp/stl/Makefile
index 4617d67aca299..3c20771e6dba6 100644
--- a/lldb/test/API/lang/cpp/stl/Makefile
+++ b/lldb/test/API/lang/cpp/stl/Makefile
@@ -1,4 +1,5 @@
 CXX_SOURCES := main.cpp
-CFLAGS := -g -O0
+
+DEBUG_INFO_FLAG := -gdwarf -O0
 
 include Makefile.rules



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


[Lldb-commits] [lldb] 9c6e043 - [LLDB] Allow API tests to override -gdwarf on Windows

2022-06-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-29T23:24:18+04:00
New Revision: 9c6e04359282e9051f7b2744b99266ece32db001

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

LOG: [LLDB] Allow API tests to override -gdwarf on Windows

This patch fixes LLDB API tests MakeFile.rules to allow overriding of
debug symbol flags when compiling tests for Windows.
Previously windows tests were forced to emit only dwarf debug symbols
as majority of the tests rely on dwarf debug info. After this patch
any test can override debug symbol flag by setting DEBUG_INFO_FLAG
variable in its make file.

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/make/Makefile.rules

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 9023128067f5e..b065a43cb1934 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -212,6 +212,12 @@ ifneq (,$(findstring clang,$(CC)))
MODULE_DEBUG_INFO_FLAGS += -gmodules
 endif
 
+# If the OS is Windows, we need to pass -gdwarf to clang, otherwise it will 
build
+# with codeview by default but all the tests rely on dwarf.
+ifeq "$(OS)" "Windows_NT"
+   DEBUG_INFO_FLAG ?= -gdwarf
+endif
+
 DEBUG_INFO_FLAG ?= -g
 
 CFLAGS ?= $(DEBUG_INFO_FLAG) -O0
@@ -236,12 +242,6 @@ endif
 
 CFLAGS += $(NO_LIMIT_DEBUG_INFO_FLAGS) $(ARCH_CFLAGS)
 
-# If the OS is Windows, we need to pass -gdwarf to clang, otherwise it will 
build
-# with codeview by default but all the tests rely on dwarf.
-ifeq "$(OS)" "Windows_NT"
-   CFLAGS += -gdwarf
-endif
-
 # Use this one if you want to build one part of the result without debug 
information:
 ifeq "$(OS)" "Darwin"
CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) 
$(ARCH_CFLAGS) $(CFLAGS_EXTRAS) -isysroot "$(SDKROOT)"



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


[Lldb-commits] [lldb] f5ba0a3 - Fix inline-record.test for Arm/Windows

2022-06-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-29T23:21:02+04:00
New Revision: f5ba0a3d059380c62dd06cc8091e6aee53f3401f

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

LOG: Fix inline-record.test for Arm/Windows

This patch fixes inline-record.test to run on multiple platforms
including Arm/Windows. Test is fixed to expect any value for id
fields of functions and blocks returned by 'image lookup' command.
This field can be any value as it is internally generated id.

Added: 


Modified: 
lldb/test/Shell/SymbolFile/Breakpad/inline-record.test

Removed: 




diff  --git a/lldb/test/Shell/SymbolFile/Breakpad/inline-record.test 
b/lldb/test/Shell/SymbolFile/Breakpad/inline-record.test
index ebf777657f883..280fc96130a51 100644
--- a/lldb/test/Shell/SymbolFile/Breakpad/inline-record.test
+++ b/lldb/test/Shell/SymbolFile/Breakpad/inline-record.test
@@ -5,46 +5,46 @@
 # CHECK-LABEL: (lldb) image lookup -a 0x400010 -v
 # CHECK:   Summary: inline-record.out`f1 [inlined] inlined_f1 at a.c:3
 # CHECK-NEXT:   inline-record.out`f1 at a.c:8
-# CHECK:  Function: id = {0x}, name = "f1", range = 
[0x00400010-0x00400020)
-# CHECK-NEXT:   Blocks: id = {0x}, range = [0x00400010-0x00400020)
-# CHECK-NEXT:   id = {0x0010}, ranges = 
[0x00400010-0x00400015)[0x00400017-0x0040001b), name = "inlined_f1"
+# CHECK:  Function: id = {{.*}}, name = "f1", range = 
[0x00400010-0x00400020)
+# CHECK-NEXT:   Blocks: id = {{.*}}, range = [0x00400010-0x00400020)
+# CHECK-NEXT:   id = {{.*}}, ranges = 
[0x00400010-0x00400015)[0x00400017-0x0040001b), name = "inlined_f1"
 
 # CHECK-LABEL: (lldb) image lookup -a 0x400016 -v
 # CHECK:   Summary: inline-record.out`f1 + 6 at a.c:3
 # CHECK-NOT:inline-record.out`f1
-# CHECK:  Function: id = {0x}, name = "f1", range = 
[0x00400010-0x00400020)
-# CHECK-NEXT:   Blocks: id = {0x}, range = [0x00400010-0x00400020)
+# CHECK:  Function: id = {{.*}}, name = "f1", range = 
[0x00400010-0x00400020)
+# CHECK-NEXT:   Blocks: id = {{.*}}, range = [0x00400010-0x00400020)
 
 # CHECK-LABEL: (lldb) image lookup -a 0x400023 -v
 # CHECK:  Summary: inline-record.out`f2 + 3 [inlined] inlined_f2 at b.c:2
 # CHECK-NEXT:  inline-record.out`f2 + 3 [inlined] inlined_f1 at b.c:4
 # CHECK-NEXT:  inline-record.out`f2 + 3 at a.c:3
-# CHECK:  Function: id = {0x0001}, name = "f2", range = 
[0x00400020-0x00400030)
-# CHECK-NEXT:   Blocks: id = {0x0001}, range = [0x00400020-0x00400030)
-# CHECK-NEXT:   id = {0x0043}, range = [0x00400023-0x0040002d), 
name = "inlined_f1"
-# CHECK-NEXT:   id = {0x0057}, range = [0x00400023-0x00400028), 
name = "inlined_f2"
+# CHECK:  Function: id = {{.*}}, name = "f2", range = 
[0x00400020-0x00400030)
+# CHECK-NEXT:   Blocks: id = {{.*}}, range = [0x00400020-0x00400030)
+# CHECK-NEXT:   id = {{.*}}, range = [0x00400023-0x0040002d), name = 
"inlined_f1"
+# CHECK-NEXT:   id = {{.*}}, range = [0x00400023-0x00400028), name = 
"inlined_f2"
 
 # CHECK-LABEL: (lldb) image lookup -a 0x400029 -v
 # CHECK:  Summary: inline-record.out`f2 + 9 [inlined] inlined_f1 + 6 at 
b.c:2
 # CHECK-NEXT:  inline-record.out`f2 + 3 at a.c:3
-# CHECK:  Function: id = {0x0001}, name = "f2", range = 
[0x00400020-0x00400030)
-# CHECK-NEXT:   Blocks: id = {0x0001}, range = [0x00400020-0x00400030)
-# CHECK-NEXT:   id = {0x0043}, range = [0x00400023-0x0040002d), 
name = "inlined_f1"
+# CHECK:  Function: id = {{.*}}, name = "f2", range = 
[0x00400020-0x00400030)
+# CHECK-NEXT:   Blocks: id = {{.*}}, range = [0x00400020-0x00400030)
+# CHECK-NEXT:   id = {{.*}}, range = [0x00400023-0x0040002d), name = 
"inlined_f1"
 
 # CHECK-LABEL: (lldb) image lookup -a 0x400030 -v
 # CHECK:   Summary: inline-record.out`f3 [inlined] inlined_f1 at b.c:3
 # CHECK-NEXT:   inline-record.out`f3 at 3
-# CHECK:  Function: id = {0x0002}, name = "f3", range = 
[0x00400030-0x00400040)
-# CHECK-NEXT:   Blocks: id = {0x0002}, range = [0x00400030-0x00400040)
-# CHECK-NEXT:   id = {0x0085}, range = [0x00400030-0x00400035), 
name = "inlined_f1"
+# CHECK:  Function: id = {{.*}}, name = "f3", range = 
[0x00400030-0x00400040)
+# CHECK-NEXT:   Blocks: id = {{.*}}, range = [0x00400030-0x00400040)
+# CHECK-NEXT:   id = {{.*}}, range = [0x00400030-0x00400035), name = 
"inlined_f1"
 
 
 # CHECK-LABEL: (lldb) image lookup -a 0x400035 -v
 # CHECK:  Summary: inline-record.out`f3 + 5 [inlined]  at b.c:3
 # CHECK-NEXT:  

[Lldb-commits] [lldb] 01bc838 - [LLDB] Add PDB/calling-conventions.test for Arm/Windows

2022-06-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-29T12:58:16+04:00
New Revision: 01bc838e4512ad645f72afd1d6b613d12c929aa4

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

LOG: [LLDB] Add PDB/calling-conventions.test for Arm/Windows

This patch renames PDB/calling-conventions.test to calling-conventions-x86.test.
Also restrict it to run only for target-x86*.
This patch also adds a arm specific test PDB/calling-conventions-arm.test which
tests that x86 specifc calling convention decorators are ignored by Arm 
compiler.

Reviewed By: labath

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

Added: 
lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test
lldb/test/Shell/SymbolFile/PDB/calling-conventions-x86.test

Modified: 


Removed: 
lldb/test/Shell/SymbolFile/PDB/calling-conventions.test



diff  --git a/lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test 
b/lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test
new file mode 100644
index 0..07dc89d460293
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test
@@ -0,0 +1,11 @@
+REQUIRES: system-windows, lld, (target-arm || target-aarch64) 
+RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%t.exe 
%S/Inputs/CallingConventionsTest.cpp
+RUN: %build --compiler=clang-cl --arch=64 --nodefaultlib --output=%t.exe 
%S/Inputs/CallingConventionsTest.cpp
+RUN: lldb-test symbols -dump-ast %t.exe | FileCheck %s
+
+CHECK: Module: {{.*}}
+CHECK-DAG: int (*FuncCCallPtr)();
+CHECK-DAG: int (*FuncStdCallPtr)();
+CHECK-DAG: int (*FuncFastCallPtr)();
+CHECK-DAG: int (*FuncVectorCallPtr)();
+CHECK-DAG: int (S::*FuncThisCallPtr)();

diff  --git a/lldb/test/Shell/SymbolFile/PDB/calling-conventions-x86.test 
b/lldb/test/Shell/SymbolFile/PDB/calling-conventions-x86.test
new file mode 100644
index 0..065c8b69b06dd
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/PDB/calling-conventions-x86.test
@@ -0,0 +1,19 @@
+REQUIRES: system-windows, lld, (target-x86 || target-x86_64) 
+RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%t.exe 
%S/Inputs/CallingConventionsTest.cpp \
+RUN:  && lldb-test symbols -dump-ast %t.exe | FileCheck --check-prefix 
32BIT-CHECK %s
+RUN: %build --compiler=clang-cl --arch=64 --nodefaultlib --output=%t.exe 
%S/Inputs/CallingConventionsTest.cpp \
+RUN:  && lldb-test symbols -dump-ast %t.exe | FileCheck --check-prefix 
64BIT-CHECK %s
+
+64BIT-CHECK: Module: {{.*}}
+64BIT-CHECK-DAG: int (*FuncCCallPtr)();
+64BIT-CHECK-DAG: int (*FuncStdCallPtr)();
+64BIT-CHECK-DAG: int (*FuncFastCallPtr)();
+64BIT-CHECK-DAG: int (*FuncVectorCallPtr)() __attribute__((vectorcall));
+64BIT-CHECK-DAG: int (S::*FuncThisCallPtr)();
+
+32BIT-CHECK: Module: {{.*}}
+32BIT-CHECK-DAG: int (*FuncCCallPtr)();
+32BIT-CHECK-DAG: int (*FuncStdCallPtr)() __attribute__((stdcall));
+32BIT-CHECK-DAG: int (*FuncFastCallPtr)() __attribute__((fastcall));
+32BIT-CHECK-DAG: int (*FuncVectorCallPtr)() __attribute__((vectorcall));
+32BIT-CHECK-DAG: int (S::*FuncThisCallPtr)() __attribute__((thiscall));

diff  --git a/lldb/test/Shell/SymbolFile/PDB/calling-conventions.test 
b/lldb/test/Shell/SymbolFile/PDB/calling-conventions.test
deleted file mode 100644
index a85dc65ff04dd..0
--- a/lldb/test/Shell/SymbolFile/PDB/calling-conventions.test
+++ /dev/null
@@ -1,10 +0,0 @@
-REQUIRES: system-windows, lld
-RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%t.exe 
%S/Inputs/CallingConventionsTest.cpp
-RUN: lldb-test symbols -dump-ast %t.exe | FileCheck %s
-
-CHECK: Module: {{.*}}
-CHECK-DAG: int (*FuncCCallPtr)();
-CHECK-DAG: int (*FuncStdCallPtr)() __attribute__((stdcall));
-CHECK-DAG: int (*FuncFastCallPtr)() __attribute__((fastcall));
-CHECK-DAG: int (*FuncVectorCallPtr)() __attribute__((vectorcall));
-CHECK-DAG: int (S::*FuncThisCallPtr)() __attribute__((thiscall));



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


[Lldb-commits] [lldb] a18baf1 - [LLDB] Add Arm64 CodeView to LLDB regnum mapping

2022-06-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-29T12:50:57+04:00
New Revision: a18baf16c665aab5631faace24a9d0fdc6b071bf

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

LOG: [LLDB] Add Arm64 CodeView to LLDB regnum mapping

This patch writes a mapping structure for converting  CodeView Arm64 register 
numbers to LLDB Arm64 regnums.

This fixes various symbols and variable location test failures on 
AArch64/Windows.

Reviewed By: DavidSpickett

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

Added: 


Modified: 
lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp 
b/lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp
index ca9ddcec287fc..3d8030916c84f 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp
@@ -10,10 +10,196 @@
 
 #include "lldb/lldb-defines.h"
 
+#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
 #include "Plugins/Process/Utility/lldb-x86-register-enums.h"
 
 using namespace lldb_private;
 
+static const uint32_t g_code_view_to_lldb_registers_arm64[] = {
+LLDB_INVALID_REGNUM, // NONE
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+gpr_w0_arm64,  // ARM64_W0, 10)
+gpr_w1_arm64,  // ARM64_W1, 11)
+gpr_w2_arm64,  // ARM64_W2, 12)
+gpr_w3_arm64,  // ARM64_W3, 13)
+gpr_w4_arm64,  // ARM64_W4, 14)
+gpr_w5_arm64,  // ARM64_W5, 15)
+gpr_w6_arm64,  // ARM64_W6, 16)
+gpr_w7_arm64,  // ARM64_W7, 17)
+gpr_w8_arm64,  // ARM64_W8, 18)
+gpr_w9_arm64,  // ARM64_W9, 19)
+gpr_w10_arm64, // ARM64_W10, 20)
+gpr_w11_arm64, // ARM64_W11, 21)
+gpr_w12_arm64, // ARM64_W12, 22)
+gpr_w13_arm64, // ARM64_W13, 23)
+gpr_w14_arm64, // ARM64_W14, 24)
+gpr_w15_arm64, // ARM64_W15, 25)
+gpr_w16_arm64, // ARM64_W16, 26)
+gpr_w17_arm64, // ARM64_W17, 27)
+gpr_w18_arm64, // ARM64_W18, 28)
+gpr_w19_arm64, // ARM64_W19, 29)
+gpr_w20_arm64, // ARM64_W20, 30)
+gpr_w21_arm64, // ARM64_W21, 31)
+gpr_w22_arm64, // ARM64_W22, 32)
+gpr_w23_arm64, // ARM64_W23, 33)
+gpr_w24_arm64, // ARM64_W24, 34)
+gpr_w25_arm64, // ARM64_W25, 35)
+gpr_w26_arm64, // ARM64_W26, 36)
+gpr_w27_arm64, // ARM64_W27, 37)
+gpr_w28_arm64, // ARM64_W28, 38)
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+gpr_x0_arm64,  // ARM64_X0, 50)
+gpr_x1_arm64,  // ARM64_X1, 51)
+gpr_x2_arm64,  // ARM64_X2, 52)
+gpr_x3_arm64,  // ARM64_X3, 53)
+gpr_x4_arm64,  // ARM64_X4, 54)
+gpr_x5_arm64,  // ARM64_X5, 55)
+gpr_x6_arm64,  // ARM64_X6, 56)
+gpr_x7_arm64,  // ARM64_X7, 57)
+gpr_x8_arm64,  // ARM64_X8, 58)
+gpr_x9_arm64,  // ARM64_X9, 59)
+gpr_x10_arm64, // ARM64_X10, 60)
+gpr_x11_arm64, // ARM64_X11, 61)
+gpr_x12_arm64, // ARM64_X12, 62)
+gpr_x13_arm64, // ARM64_X13, 63)
+gpr_x14_arm64, // ARM64_X14, 64)
+gpr_x15_arm64, // ARM64_X15, 65)
+gpr_x16_arm64, // ARM64_X16, 66)
+gpr_x17_arm64, // ARM64_X17, 67)
+gpr_x18_arm64, // ARM64_X18, 68)
+gpr_x19_arm64, // ARM64_X19, 69)
+gpr_x20_arm64, // ARM64_X20, 70)
+gpr_x21_arm64, // ARM64_X21, 71)
+gpr_x22_arm64, // ARM64_X22, 72)
+gpr_x23_arm64, // ARM64_X23, 73)
+gpr_x24_arm64, // ARM64_X24, 74)
+gpr_x25_arm64, // ARM64_X25, 75)
+gpr_x26_arm64, // ARM64_X26, 76)
+gpr_x27_arm64, // ARM64_X27, 77)
+gpr_x28_arm64, // ARM64_X28, 78)
+gpr_fp_arm64,  // ARM64_FP, 79)
+gpr_lr_arm64,  // ARM64_LR, 80)
+gpr_sp_arm64,  // ARM64_SP, 81)
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+gpr_cpsr_arm64, // ARM64_NZCV, 90)
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,
+fpu_s0_arm64,  // (ARM64_S0, 100)
+fpu_s1_arm64,  // (ARM64_S1, 101)
+fpu_s2_arm64,  // (ARM64_S2, 102)
+fpu_s3_arm64,  // (ARM64_S3, 103)
+fpu_s4_arm64,  // (ARM64_S4, 104)
+fpu_s5_arm64,  // (ARM64_S5, 105)
+fpu_s6_arm64,  // (ARM64_S6, 106)
+fpu_s7_arm64,  // (ARM64_S7, 107)
+   

[Lldb-commits] [lldb] 695c22c - [LLDB] Fix PDB/pointers.test for 32bit Arm/Windows

2022-06-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-29T12:47:02+04:00
New Revision: 695c22c84a36daf0ed12b212c2ac9772f45c61f3

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

LOG: [LLDB] Fix PDB/pointers.test for 32bit Arm/Windows

PDB/pointers.test was orignally written for 32bit x86 keeping in mind
__cdecl and __stdcall calling conventions which does name mangling for
example like adding "_" underscore before function name.
This is only x86 specific but purpose of pointers.test is NOT to test
calling convention.
I am have made a few minor changes to this test which will make it pass
when run on Windows/Arm platform.

Reviewed By: mstorsjo

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

Added: 


Modified: 
lldb/test/Shell/SymbolFile/PDB/pointers.test

Removed: 




diff  --git a/lldb/test/Shell/SymbolFile/PDB/pointers.test 
b/lldb/test/Shell/SymbolFile/PDB/pointers.test
index a8f84f14783de..841fe8804b44c 100644
--- a/lldb/test/Shell/SymbolFile/PDB/pointers.test
+++ b/lldb/test/Shell/SymbolFile/PDB/pointers.test
@@ -19,7 +19,7 @@ MAIN-ST-NEXT: int a;
 MAIN-ST-NEXT: int {{.*}}f(int);
 MAIN-ST-NEXT:}
 
-MAIN:   Function{[[FID1:.*]]}, mangled = _main
+MAIN:   Function{[[FID1:.*]]}, mangled = {{_?}}main
 MAIN-NEXT:  Block{[[FID1]]}
 MAIN: Variable{{.*}}, name = "array_pointer"
 MAIN-SAME:(int (*)[2][4]), scope = local
@@ -28,11 +28,11 @@ MAIN-SAME:(int *), scope = local
 MAIN: Variable{{.*}}, name = "p_member_field"
 MAIN-SAME:(int ST::*), scope = local
 MAIN: Variable{{.*}}, name = "p_member_method"
-MAIN-SAME:(int (ST::*)(int) __attribute__((thiscall))), scope = local
+MAIN-SAME:(int (ST::*)(int){{( __attribute__\(\(thiscall\)\))?}}), scope = 
local
 
 F:   Function{[[FID2:.*]]}, demangled = {{.*}}f(int)
 F-NEXT:  Block{[[FID2]]}
 F: Variable{{.*}}, name = "this"
-F-SAME:(ST *), scope = parameter, location = {{.*}}, artificial
+F-SAME:(ST *), scope = parameter,{{( location = DW_OP.*,)?}} artificial
 F: Variable{{.*}}, name = "x"
 F-SAME:(int), scope = parameter, decl = PointerTypeTest.cpp:8



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


[Lldb-commits] [lldb] 91d61c1 - [LLDB] Mark TestExprsChar Xfail for Windows/AArch64

2022-06-24 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-24T13:59:22+04:00
New Revision: 91d61c1431c2ec46fa7a243db1643154580ab043

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

LOG: [LLDB] Mark TestExprsChar Xfail for Windows/AArch64

test_unsigned_char test in TestExprsChar.py fails on AArch64/Windows
platform. There is known bug already present for the failure for various
arch/os combinations. This patch marks the test as xfail for
windows/AArch64.

Added: 


Modified: 
lldb/test/API/commands/expression/char/TestExprsChar.py

Removed: 




diff  --git a/lldb/test/API/commands/expression/char/TestExprsChar.py 
b/lldb/test/API/commands/expression/char/TestExprsChar.py
index cd9c55b5a44bb..849615ef91453 100644
--- a/lldb/test/API/commands/expression/char/TestExprsChar.py
+++ b/lldb/test/API/commands/expression/char/TestExprsChar.py
@@ -38,5 +38,6 @@ def test_signed_char(self):
 'arm64_32'],
 bugnumber="llvm.org/pr23069, ")
 @expectedFailureAll(triple='mips*', bugnumber="llvm.org/pr23069")
+@expectedFailureAll(oslist=['windows'], archs=['aarch64'], 
bugnumber="llvm.org/pr23069")
 def test_unsigned_char(self):
 self.do_test(dictionary={'CFLAGS_EXTRAS': '-funsigned-char'})



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


[Lldb-commits] [lldb] 3fd9aeb - [LLDB] XFAIL TestLoadUnload fails on Arm/Ubuntu Jammy

2022-06-17 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-17T12:06:35+04:00
New Revision: 3fd9aebbb75ab0966bd767e15ba6a69cad17f160

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

LOG: [LLDB] XFAIL TestLoadUnload fails on Arm/Ubuntu Jammy

This patch marks following tests as XFAIL for Arm/Ubuntu Jammy 22.04:
test_lldb_process_load_and_unload_commands
test_load_unload

Added: 


Modified: 
lldb/test/API/functionalities/load_unload/TestLoadUnload.py

Removed: 




diff  --git a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py 
b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
index f3b715c4c35ed..15e602cc784db 100644
--- a/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
+++ b/lldb/test/API/functionalities/load_unload/TestLoadUnload.py
@@ -203,6 +203,7 @@ def test_dyld_library_path(self):
 hostoslist=["windows"],
 triple='.*-android')
 @expectedFailureAll(oslist=["windows"]) # process load not implemented
+@expectedFailureAll(oslist=["linux"], archs=["arm"]) # Fails on ubuntu 
jammy
 def test_lldb_process_load_and_unload_commands(self):
 self.setSvr4Support(False)
 self.run_lldb_process_load_and_unload_commands()
@@ -296,6 +297,7 @@ def run_lldb_process_load_and_unload_commands(self):
 self.runCmd("process continue")
 
 @expectedFailureAll(oslist=["windows"]) # breakpoint not hit
+@expectedFailureAll(oslist=["linux"], archs=["arm"]) # Fails on ubuntu 
jammy
 def test_load_unload(self):
 self.setSvr4Support(False)
 self.run_load_unload()



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


[Lldb-commits] [lldb] 7daa9a9 - [LLDB] Remove decorator from XPASSes AArch64/Windows

2022-06-07 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-07T19:30:26+04:00
New Revision: 7daa9a9b40a22c8ebac529f2fe7772191f2cea5a

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

LOG: [LLDB] Remove decorator from XPASSes AArch64/Windows

This patch remove XFAIL decorator from tests which as passing on AArch64
Windows. This is tested on surface pro x using tot llvm and clang 14.0.3
as compiler with visual studio 2019 x86_arm64 environment.

Added: 


Modified: 
lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
lldb/test/API/api/multiple-targets/TestMultipleTargets.py
lldb/test/API/commands/expression/char/TestExprsChar.py
lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py
lldb/test/API/functionalities/return-value/TestReturnValue.py

lldb/test/API/lang/cpp/class-template-non-type-parameter-pack/TestClassTemplateNonTypeParameterPack.py

lldb/test/API/lang/cpp/class-template-type-parameter-pack/TestClassTemplateTypeParameterPack.py

Removed: 




diff  --git 
a/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py 
b/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
index c7aa2eced83d9..1de460a5ac43a 100644
--- a/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
+++ b/lldb/test/API/api/command-return-object/TestSBCommandReturnObject.py
@@ -15,7 +15,7 @@ class TestSBCommandReturnObject(TestBase):
 
 @skipIfNoSBHeaders
 @expectedFailureAll(
-oslist=["windows"],
+oslist=["windows"], archs=["i[3-6]86", "x86_64"],
 bugnumber="llvm.org/pr43570")
 def test_sb_command_return_object(self):
 env = {self.dylibPath: self.getLLDBLibraryEnvVal()}

diff  --git a/lldb/test/API/api/multiple-targets/TestMultipleTargets.py 
b/lldb/test/API/api/multiple-targets/TestMultipleTargets.py
index 94b09c71ce2f1..02b231f219914 100644
--- a/lldb/test/API/api/multiple-targets/TestMultipleTargets.py
+++ b/lldb/test/API/api/multiple-targets/TestMultipleTargets.py
@@ -20,7 +20,7 @@ class TestMultipleTargets(TestBase):
 @skipIfNoSBHeaders
 @skipIfHostIncompatibleWithRemote
 @expectedFailureAll(
-oslist=["windows"],
+oslist=["windows"], archs=["i[3-6]86", "x86_64"],
 bugnumber="llvm.org/pr20282")
 @expectedFlakeyNetBSD
 def test_multiple_targets(self):

diff  --git a/lldb/test/API/commands/expression/char/TestExprsChar.py 
b/lldb/test/API/commands/expression/char/TestExprsChar.py
index a7f37e868b4dd..ab3d4f40265ff 100644
--- a/lldb/test/API/commands/expression/char/TestExprsChar.py
+++ b/lldb/test/API/commands/expression/char/TestExprsChar.py
@@ -20,10 +20,9 @@ def do_test(self, dictionary=None):
 def test_default_char(self):
 self.do_test()
 
-@skipIf(oslist=["linux"], archs=["arm"], bugnumber="llvm.org/pr23069")
+@skipIf(oslist=["linux"], archs=["aarch64", "arm"], 
bugnumber="llvm.org/pr23069")
 @expectedFailureAll(
 archs=[
-"aarch64",
 "powerpc64le",
 "s390x"],
 bugnumber="llvm.org/pr23069")

diff  --git a/lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py 
b/lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py
index f5122b84839a9..69308a58d3f55 100644
--- a/lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py
+++ b/lldb/test/API/commands/expression/xvalue/TestXValuePrinting.py
@@ -7,7 +7,7 @@ class ExprXValuePrintingTestCase(TestBase):
 
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
+@expectedFailureAll(oslist=["windows"], archs=["i[3-6]86", "x86_64"], 
bugnumber="llvm.org/pr21765")
 def test(self):
 """Printing an xvalue should work."""
 self.build()

diff  --git a/lldb/test/API/functionalities/return-value/TestReturnValue.py 
b/lldb/test/API/functionalities/return-value/TestReturnValue.py
index 517ed46a4fe9f..9f4745cb79018 100644
--- a/lldb/test/API/functionalities/return-value/TestReturnValue.py
+++ b/lldb/test/API/functionalities/return-value/TestReturnValue.py
@@ -175,7 +175,7 @@ def test_with_python(self):
 "3.6"],
 archs=["i386"])
 @expectedFailureAll(compiler=["gcc"], archs=["x86_64", "i386"])
-@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+@expectedFailureAll(oslist=["windows"], archs=["i[3-6]86", "x86_64"], 
bugnumber="llvm.org/pr24778")
 def test_vector_values(self):
 self.build()
 exe = self.getBuildArtifact("a.out")

diff  --git 
a/lldb/test/API/lang/cpp/class-template-non-type-parameter-pack/TestClassTemplateNonTypeParameterPack.py
 
b/lldb/test/API/lang/cpp/class-template-non-type-parameter-pack/TestClassTemplateNonTypeParameterPack.py

[Lldb-commits] [lldb] d3d9bbd - [LLDB] Fix TestBase.generateSource for AArch64/Windows

2022-06-07 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-07T19:25:35+04:00
New Revision: d3d9bbd104368850d5e362ce8c5982f468272ae8

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

LOG: [LLDB] Fix TestBase.generateSource for AArch64/Windows

This patch adds a minor fix in lldbtest.py TestBase.generateSource
function. Generated Python source with directory paths was not being
escaped properly. This fix makes sure we treat dir path as raw string.

Added: 


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

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py 
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index e1c8373eb29a4..5c536f4ed8ae4 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1775,7 +1775,7 @@ def generateSource(self, source):
 if self.hasDarwinFramework():
 include_stmt = "'#include <%s>' % os.path.join('LLDB', header)"
 else:
-include_stmt = "'#include <%s>' % os.path.join('" + public_api_dir 
+ "', header)"
+include_stmt = "'#include <%s>' % os.path.join(r'" + 
public_api_dir + "', header)"
 list = [eval(include_stmt) for header in public_headers if (
 header.startswith("SB") and header.endswith(".h"))]
 includes = '\n'.join(list)



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


[Lldb-commits] [lldb] e4ed7ca - [LLDB] Avoid using -fno-builtin for building API tests

2022-06-07 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-06-07T12:41:29+04:00
New Revision: e4ed7ca996ba5bb1be7b877c4c53ef2a5fb534f5

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

LOG: [LLDB] Avoid using -fno-builtin for building API tests

This patch removes use of -fno-builtin flag for building LLDB API
tests.

LLDB API tests are built using Makefile.rules where we were using
-fno-builtin flag to avoid gcc intrinsic optimization conflicting
with Android runtime in past.

Now that we no longer use gcc for building testsuite and compiling
LLDB API tests on AArch64/Windows require clang to optimize certain
calls like _setjmp to setjmpex as former is not implemented by
AArch64 windows runtime.

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/make/Makefile.rules

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 6917d73130c4a..9023128067f5e 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -214,7 +214,7 @@ endif
 
 DEBUG_INFO_FLAG ?= -g
 
-CFLAGS ?= $(DEBUG_INFO_FLAG) -O0 -fno-builtin
+CFLAGS ?= $(DEBUG_INFO_FLAG) -O0
 
 ifeq "$(OS)" "Darwin"
ifneq "$(SDKROOT)" ""



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


[Lldb-commits] [lldb] b876c23 - Revert "[lldb] Consider binary as module of last resort"

2022-05-23 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-05-23T11:19:48+05:00
New Revision: b876c23604c748bd267c1fcb0572845ee61549cc

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

LOG: Revert "[lldb] Consider binary as module of last resort"

This reverts commit a3c3482ceb529206b0ae4e7782e5496da5e0879d.
It broke LLDB API test TestBadAddressBreakpoints.py

Differential revision: https://reviews.llvm.org/D124731

Added: 


Modified: 
lldb/source/Breakpoint/BreakpointResolverAddress.cpp
lldb/source/Commands/Options.td

Removed: 
lldb/test/API/commands/breakpoint/set/address-nomodule/Makefile

lldb/test/API/commands/breakpoint/set/address-nomodule/TestBreakpointAddressNoModule.py
lldb/test/API/commands/breakpoint/set/address-nomodule/inferior.c



diff  --git a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp 
b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
index 9b6b6d29cbce8..c173fc0c2a7a6 100644
--- a/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
@@ -121,27 +121,16 @@ Searcher::CallbackReturn 
BreakpointResolverAddress::SearchCallback(
 
   if (filter.AddressPasses(m_addr)) {
 if (breakpoint.GetNumLocations() == 0) {
-  // If the address is just an offset ...
-  if (!m_addr.IsSectionOffset()) {
-ModuleSP containing_module_sp = nullptr;
+  // If the address is just an offset, and we're given a module, see if we
+  // can find the appropriate module loaded in the binary, and fix up
+  // m_addr to use that.
+  if (!m_addr.IsSectionOffset() && m_module_filespec) {
 Target  = breakpoint.GetTarget();
-if (m_module_filespec) {
-  // ... and we're given a module, see if we can find the
-  // appropriate module loaded in the binary, and fix up
-  // m_addr to use that.
-  ModuleSpec module_spec(m_module_filespec);
-  containing_module_sp =
-  target.GetImages().FindFirstModule(module_spec);
-} else {
-  // ... and we're not given a module, see if the offset is
-  // somewhere in the executable module. If it is, then we'll
-  // fix up m_addr to use that.
-  containing_module_sp = target.GetExecutableModule();
-}
-if (containing_module_sp) {
+ModuleSpec module_spec(m_module_filespec);
+ModuleSP module_sp = target.GetImages().FindFirstModule(module_spec);
+if (module_sp) {
   Address tmp_address;
-  if (containing_module_sp->ResolveFileAddress(m_addr.GetOffset(),
-   tmp_address))
+  if (module_sp->ResolveFileAddress(m_addr.GetOffset(), tmp_address))
 m_addr = tmp_address;
 }
   }

diff  --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td
index 284437887a0b9..c326f8a320748 100644
--- a/lldb/source/Commands/Options.td
+++ b/lldb/source/Commands/Options.td
@@ -128,15 +128,13 @@ let Command = "breakpoint set" in {
 Arg<"AddressOrExpression">, Required,
 Desc<"Set the breakpoint at the specified address.  If the address maps "
 "uniquely to a particular binary, then the address will be converted to "
-"a \"file\" address, so that the breakpoint will track that binary+offset "
+"a \"file\"address, so that the breakpoint will track that binary+offset "
 "no matter where the binary eventually loads.  Alternately, if you also "
 "specify the module - with the -s option - then the address will be "
 "treated as a file address in that module, and resolved accordingly.  "
 "Again, this will allow lldb to track that offset on subsequent reloads.  "
 "The module need not have been loaded at the time you specify this "
-"breakpoint, and will get resolved when the module is loaded.  If no "
-"module is specified, the binary being debugged is considered as a "
-"fallback.">;
+"breakpoint, and will get resolved when the module is loaded.">;
   def breakpoint_set_name : Option<"name", "n">, Group<3>, Arg<"FunctionName">,
 Completion<"Symbol">, Required,
 Desc<"Set the breakpoint by function name.  Can be repeated multiple times 
"

diff  --git a/lldb/test/API/commands/breakpoint/set/address-nomodule/Makefile 
b/lldb/test/API/commands/breakpoint/set/address-nomodule/Makefile
deleted file mode 100644
index 7c82a2dde6c2e..0
--- a/lldb/test/API/commands/breakpoint/set/address-nomodule/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-C_SOURCES := inferior.c
-
-include Makefile.rules

diff  --git 
a/lldb/test/API/commands/breakpoint/set/address-nomodule/TestBreakpointAddressNoModule.py
 

[Lldb-commits] [lldb] e3cd8fe - [LLDB] Skip TestCrashDuringStep.py AArch64/Windows

2022-04-20 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-04-21T05:10:37+05:00
New Revision: e3cd8fedcac31a037a38889abace9e0d0205c451

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

LOG: [LLDB] Skip TestCrashDuringStep.py AArch64/Windows

TestCrashDuringStep.py hangs on AArch64 windows with no resonable
possible fix. I am marking it skipped for now.

Added: 


Modified: 

lldb/test/API/functionalities/thread/crash_during_step/TestCrashDuringStep.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/thread/crash_during_step/TestCrashDuringStep.py 
b/lldb/test/API/functionalities/thread/crash_during_step/TestCrashDuringStep.py
index 6a3ef9527746e..e371cd74fa038 100644
--- 
a/lldb/test/API/functionalities/thread/crash_during_step/TestCrashDuringStep.py
+++ 
b/lldb/test/API/functionalities/thread/crash_during_step/TestCrashDuringStep.py
@@ -20,6 +20,7 @@ def setUp(self):
 
 # IO error due to breakpoint at invalid address
 @expectedFailureAll(triple=re.compile('^mips'))
+@skipIf(oslist=['windows'], archs=['aarch64'])
 def test_step_inst_with(self):
 """Test thread creation during step-inst handling."""
 self.build()



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


[Lldb-commits] [lldb] 5341b5f - [LLDB] Update inspect getargspec to getfullargspec

2022-04-20 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-04-21T01:33:26+05:00
New Revision: 5341b5f8d3cec9a38867bc4745fd680946300b87

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

LOG: [LLDB] Update inspect getargspec to getfullargspec

This patch replaces getargspec with getfullargspec in funcutils.py.
getargspec has been deprecated by python 11x release. This is
important to run LLDB testsuite in Windows/Arm64 platform
where Python native will be available from python release onwards.

Note: getfullargspec is not available in python 2

Reviewed By: labath

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

Added: 


Modified: 
lldb/packages/Python/lldbsuite/support/funcutils.py

Removed: 




diff  --git a/lldb/packages/Python/lldbsuite/support/funcutils.py 
b/lldb/packages/Python/lldbsuite/support/funcutils.py
index 648d95d23d970..af5da0061e1ca 100644
--- a/lldb/packages/Python/lldbsuite/support/funcutils.py
+++ b/lldb/packages/Python/lldbsuite/support/funcutils.py
@@ -1,7 +1,7 @@
 import inspect
 
 def requires_self(func):
-func_argc = len(inspect.getargspec(func).args)
+func_argc = len(inspect.getfullargspec(func).args)
 if func_argc == 0 or (
 getattr(
 func,



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


[Lldb-commits] [lldb] a1901f5 - [LLDB] Fix TestJobControl.py decorators import

2022-04-01 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-04-01T14:13:11+05:00
New Revision: a1901f501ca971e532f8386b479e13967cd32b93

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

LOG: [LLDB] Fix TestJobControl.py decorators import

Added: 


Modified: 
lldb/test/API/driver/job_control/TestJobControl.py

Removed: 




diff  --git a/lldb/test/API/driver/job_control/TestJobControl.py 
b/lldb/test/API/driver/job_control/TestJobControl.py
index 8afa65ac3b271..946938273c101 100644
--- a/lldb/test/API/driver/job_control/TestJobControl.py
+++ b/lldb/test/API/driver/job_control/TestJobControl.py
@@ -2,7 +2,7 @@
 Test lldb's handling of job control signals (SIGTSTP, SIGCONT).
 """
 
-
+from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.lldbpexpect import PExpectTest
 



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


[Lldb-commits] [lldb] c103eac - [LLDB] Skip TestJobControl.py AArch64/Arm Linux

2022-04-01 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-04-01T13:58:20+05:00
New Revision: c103eac9d8596cf154ccf5249f5c919badd831d6

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

LOG: [LLDB] Skip TestJobControl.py AArch64/Arm Linux

TestJobControl.py is randomly failing on AArch64/Arm Linux buildbots.
I am marking it as skipped to make buildbot stable.

Added: 


Modified: 
lldb/test/API/driver/job_control/TestJobControl.py

Removed: 




diff  --git a/lldb/test/API/driver/job_control/TestJobControl.py 
b/lldb/test/API/driver/job_control/TestJobControl.py
index 4faaaf0a9edca..8afa65ac3b271 100644
--- a/lldb/test/API/driver/job_control/TestJobControl.py
+++ b/lldb/test/API/driver/job_control/TestJobControl.py
@@ -10,7 +10,8 @@
 class JobControlTest(PExpectTest):
 
 mydir = TestBase.compute_mydir(__file__)
-
+
+@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
 def test_job_control(self):
 def post_spawn():
 self.child.expect("PID=([0-9]+)")



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


[Lldb-commits] [lldb] 5c6ee13 - [LLDB] Skip TestProcessIOHandlerInterrupt Arm/AArch64 Linux

2022-03-28 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-03-28T12:32:49+05:00
New Revision: 5c6ee1305e771bd40b523b4de4df8bffaa2e98ad

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

LOG: [LLDB] Skip TestProcessIOHandlerInterrupt Arm/AArch64 Linux

This patch skips TestProcessIOHandlerInterrupt on Arm/AArch64.
PExpect tests are not stable when run in containerized machine.

Added: 


Modified: 
lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py

Removed: 




diff  --git a/lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py 
b/lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py
index 707c84eeacdac..b1d93b6a30b1c 100644
--- a/lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py
+++ b/lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py
@@ -13,6 +13,7 @@ class TestCase(PExpectTest):
 
 mydir = TestBase.compute_mydir(__file__)
 
+@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
 def test(self):
 self.build(dictionary={"CXX_SOURCES":"cat.cpp"})
 self.launch(executable=self.getBuildArtifact())



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


[Lldb-commits] [lldb] de0b4f4 - [LLDB] Skip TestIOHandlerProcessSTDIO.py for Arm/AArch64 Linux

2022-03-08 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-03-08T14:15:41+05:00
New Revision: de0b4f4b86fdba0c41723484221575c21bc24ab2

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

LOG: [LLDB] Skip TestIOHandlerProcessSTDIO.py for Arm/AArch64 Linux

This patch disables TestIOHandlerProcessSTDIO.py for Arm/AArch64 Linux
to silence random test failures on buildbots. IO handler tests are known
to randomly fail on arm/aarch64 linux buildbots due to pexpect timeouts.

Added: 


Modified: 
lldb/test/API/iohandler/stdio/TestIOHandlerProcessSTDIO.py

Removed: 




diff  --git a/lldb/test/API/iohandler/stdio/TestIOHandlerProcessSTDIO.py 
b/lldb/test/API/iohandler/stdio/TestIOHandlerProcessSTDIO.py
index 0db9c56f37f93..cdfe173827581 100644
--- a/lldb/test/API/iohandler/stdio/TestIOHandlerProcessSTDIO.py
+++ b/lldb/test/API/iohandler/stdio/TestIOHandlerProcessSTDIO.py
@@ -11,6 +11,7 @@ class TestIOHandlerProcessSTDIO(PExpectTest):
 # PExpect uses many timeouts internally and doesn't play well
 # under ASAN on a loaded machine..
 @skipIfAsan
+@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
 def test(self):
 self.build()
 self.launch(executable=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] cc7bf4a - [LLDB] XFAIL TestUnambiguousTailCalls.py for Arm/Linux

2022-02-25 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-02-25T17:09:50+05:00
New Revision: cc7bf4afeefc6d3951871dcb091873243a563646

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

LOG: [LLDB] XFAIL TestUnambiguousTailCalls.py for Arm/Linux

This patch marks TestUnambiguousTailCalls.py as XFAIL on Arm/Linux.
Test started failing after 3c4ed02698afec021c6bca80740d1e58e3ee019e.

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

Added: 


Modified: 

lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
 
b/lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
index 19aad2ab1ec32..cef500f0e7754 100644
--- 
a/lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
+++ 
b/lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
@@ -2,6 +2,7 @@
 from lldbsuite.test import decorators
 
 decor = [decorators.skipUnlessHasCallSiteInfo,
+ decorators.skipIf(archs=['arm'],oslist=["linux"]),
  decorators.skipIf(dwarf_version=['<', '4']),
  decorators.skipIf(compiler="clang", compiler_version=['<', '11.0'])]
 lldbinline.MakeInlineTest(__file__, globals(), name="UnambiguousTailCalls_V5",



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


[Lldb-commits] [lldb] 317a2b1 - [LLDB] Remove XFAIL from minidebuginfo-set-and-hit-breakpoint.test

2022-02-25 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-02-25T15:55:05+05:00
New Revision: 317a2b1f6004708b28969c47b48526f6378c4e64

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

LOG: [LLDB] Remove XFAIL from minidebuginfo-set-and-hit-breakpoint.test

This patch removes XFAIL from minidebuginfo-set-and-hit-breakpoint.test.
Test started passing after 3c4ed02698afec021c6bca80740d1e58e3ee019e.

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

Added: 


Modified: 
lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test

Removed: 




diff  --git 
a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test 
b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test
index f361ccb585783..a9650614674ea 100644
--- a/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test
+++ b/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test
@@ -1,4 +1,3 @@
-# XFAIL: target-arm && linux-gnu
 # REQUIRES: system-linux, lzma, xz
 
 # We want to keep the symbol "multiplyByThree" in the .dynamic section and not



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


[Lldb-commits] [lldb] 73a961b - [LLDB] Port toolchain-msvc.test for Arm/AArch4 Windows

2022-02-09 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-02-09T17:40:39+05:00
New Revision: 73a961b9cca1ecaa16ca7d9a456961ab6510bd1c

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

LOG: [LLDB] Port toolchain-msvc.test for Arm/AArch4 Windows

This patch updates toolchain-msvc.test to cater for Arm64 windows platform.

Reviewed By: labath

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

Added: 


Modified: 
lldb/test/Shell/BuildScript/toolchain-msvc.test

Removed: 




diff  --git a/lldb/test/Shell/BuildScript/toolchain-msvc.test 
b/lldb/test/Shell/BuildScript/toolchain-msvc.test
index 85a8f0d62f0ca..0ffd44489729f 100644
--- a/lldb/test/Shell/BuildScript/toolchain-msvc.test
+++ b/lldb/test/Shell/BuildScript/toolchain-msvc.test
@@ -1,62 +1,62 @@
-REQUIRES: system-windows, msvc
-
-RUN: %build -n --verbose --arch=32 --compiler=msvc --mode=compile-and-link -o 
%t/foo.exe foobar.c \
-RUN:| FileCheck --check-prefix=X86 %s
-
-RUN: %build -n --verbose --arch=64 --compiler=msvc --mode=compile-and-link -o 
%t/foo.exe foobar.c \
-RUN:| FileCheck --check-prefix=X64 %s
-
-X86: Script Arguments:
-X86:   Arch: 32
-X86:   Compiler: msvc
-X86:   Outdir: {{.*}}
-X86:   Output: {{.*}}toolchain-msvc.test.tmp\foo.exe
-X86:   Nodefaultlib: False
-X86:   Opt: none
-X86:   Mode: compile
-X86:   Clean: True
-X86:   Verbose: True
-X86:   Dryrun: True
-X86:   Inputs: foobar.c
-X86: Cleaning {{.*}}toolchain-msvc.test.tmp\foobar.ilk
-X86: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.exe-foobar.obj
-X86: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.pdb
-X86: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.exe
-X86: compiling foobar.c -> foo.exe-foobar.obj
-X86:   Command Line: {{.*}}\{{[Hh]ost[Xx]64}}\x86\cl.exe
-X86: linking foo.exe-foobar.obj -> foo.exe
-X86:   Command Line: {{.*}}\{{[Hh]ost[Xx]64}}\x86\link.exe
-X86:   Env
-X86: LIB = {{.*}}\ATLMFC\lib\x86
-X86:   {{.*}}\lib\x86
-X86:   {{.*}}\ucrt\x86
-X86:   {{.*}}\um\x86
-X86: PATH = {{.*}}\bin\{{[Hh]ost[Xx]64}}\x64
-
-
-X64: Script Arguments:
-X64:   Arch: 64
-X64:   Compiler: msvc
-X64:   Outdir: {{.*}}
-X64:   Output: {{.*}}toolchain-msvc.test.tmp\foo.exe
-X64:   Nodefaultlib: False
-X64:   Opt: none
-X64:   Mode: compile
-X64:   Clean: True
-X64:   Verbose: True
-X64:   Dryrun: True
-X64:   Inputs: foobar.c
-X64: Cleaning {{.*}}toolchain-msvc.test.tmp\foobar.ilk
-X64: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.exe-foobar.obj
-X64: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.pdb
-X64: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.exe
-X64: compiling foobar.c -> foo.exe-foobar.obj
-X64:   Command Line: {{.*}}\{{[Hh]ost[Xx]64}}\x64\cl.exe
-X64: linking foo.exe-foobar.obj -> foo.exe
-X64:   Command Line: {{.*}}\{{[Hh]ost[Xx]64}}\x64\link.exe
-X64:   Env
-X64: LIB = {{.*}}\ATLMFC\lib\x64
-X64:   {{.*}}\lib\x64
-X64:   {{.*}}\ucrt\x64
-X64:   {{.*}}\um\x64
-X64: PATH = {{.*}}\bin\{{[Hh]ost[Xx]64}}\x64
+REQUIRES: system-windows, msvc
+
+RUN: %build -n --verbose --arch=32 --compiler=msvc --mode=compile-and-link -o 
%t/foo.exe foobar.c \
+RUN:| FileCheck --check-prefix=32BIT %s
+
+RUN: %build -n --verbose --arch=64 --compiler=msvc --mode=compile-and-link -o 
%t/foo.exe foobar.c \
+RUN:| FileCheck --check-prefix=64BIT %s
+
+32BIT: Script Arguments:
+32BIT:   Arch: 32
+32BIT:   Compiler: msvc
+32BIT:   Outdir: {{.*}}
+32BIT:   Output: {{.*}}toolchain-msvc.test.tmp\foo.exe
+32BIT:   Nodefaultlib: False
+32BIT:   Opt: none
+32BIT:   Mode: compile
+32BIT:   Clean: True
+32BIT:   Verbose: True
+32BIT:   Dryrun: True
+32BIT:   Inputs: foobar.c
+32BIT: Cleaning {{.*}}toolchain-msvc.test.tmp\foobar.ilk
+32BIT: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.exe-foobar.obj
+32BIT: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.pdb
+32BIT: Cleaning {{.*}}toolchain-msvc.test.tmp\foo.exe
+32BIT: compiling foobar.c -> foo.exe-foobar.obj
+32BIT:   Command Line: {{.*}}\{{[Hh]ost[Xx](64|86)}}\{{(x86|arm)}}\cl.exe
+32BIT: linking foo.exe-foobar.obj -> foo.exe
+32BIT:   Command Line: {{.*}}\{{[Hh]ost[Xx](64|86)}}\{{(x86|arm)}}\link.exe
+32BIT:   Env
+32BIT: LIB = {{.*}}\ATLMFC\lib\{{(x86|arm)}}
+32BIT:   {{.*}}\lib\{{(x86|arm)}}
+32BIT:   {{.*}}\ucrt\{{(x86|arm)}}
+32BIT:   {{.*}}\um\{{(x86|arm)}}
+32BIT: PATH = {{.*}}\bin\{{[Hh]ost[Xx](64|86)}}\{{(x86|x64)}}
+
+
+64BIT: Script Arguments:
+64BIT:   Arch: 64
+64BIT:   Compiler: msvc
+64BIT:   Outdir: {{.*}}
+64BIT:   Output: {{.*}}toolchain-msvc.test.tmp\foo.exe
+64BIT:   Nodefaultlib: False
+64BIT:   Opt: none
+64BIT:   Mode: compile
+64BIT:   Clean: True
+64BIT:   Verbose: True
+64BIT:   Dryrun: True
+64BIT:   Inputs: foobar.c
+64BIT: Cleaning {{.*}}toolchain-msvc.test.tmp\foobar.ilk
+64BIT: Cleaning 

[Lldb-commits] [lldb] 9c4e93c - [LLDB] Adjust compiler-full-path.test for Windows/Arm64

2022-01-19 Thread Muhammad Omair Javaid via lldb-commits

Author: TCWG
Date: 2022-01-19T19:47:03+05:00
New Revision: 9c4e93c71a80e9d6d4e9f1e9f90b14a6126e1f47

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

LOG: [LLDB] Adjust compiler-full-path.test for Windows/Arm64

This patch updates compiler-full-path.test to make sure it passes on
Windows Arm64 platform with MSVC.

Added: 


Modified: 
lldb/test/Shell/BuildScript/compiler-full-path.test

Removed: 




diff  --git a/lldb/test/Shell/BuildScript/compiler-full-path.test 
b/lldb/test/Shell/BuildScript/compiler-full-path.test
index 592024e690eb5..5a781f570bd9e 100644
--- a/lldb/test/Shell/BuildScript/compiler-full-path.test
+++ b/lldb/test/Shell/BuildScript/compiler-full-path.test
@@ -7,5 +7,5 @@ RUN:FileCheck %s --check-prefix=CHECK-MSVC
 CHECK-CLANG: Command Line: /path/to/my/clang
 CHECK-SAME: -o
 
-CHECK-MSVC: Command Line: /path/to/my/x64/cl.exe
+CHECK-MSVC: Command Line: /path/to/my{{(\/|\\)(arm64|x64)(\/|\\)}}cl.exe
 CHECK-SAME: /Fo



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


Re: [Lldb-commits] [PATCH] D117559: [lldb] Remove remote testing ability from lldb**-server** tests

2022-01-19 Thread Omair Javaid via lldb-commits
On Wed, 19 Jan 2022 at 17:53, Pavel Labath via Phabricator <
revi...@reviews.llvm.org> wrote:

> labath added a comment.
>
> In D117559#3254095 ,
> @DavidSpickett wrote:
>
> > I'm running
> `lldb/test/API/tools/lldb-server/memory-tagging/TestGdbRemoteMemoryTagging.py`.
> >
> > If the details matter any...
> >
> > In qemu:
> >
> >   $ ./build-cross/bin/lldb-server platform --server --listen
> 0.0.0.0:54321
> >
> > On the host:
> >
> >   $ ./bin/lldb-dotest --platform-name remote-linux --platform-url
> connect://:54321 --platform-working-dir /tmp/test_lldb -p
> TestGdbRemoteMemoryTagging.py --arch aarch64
>
> Got it. Thanks.
>
> > I have qemu setup so that any port lldb-server picks should be
> accessible from the host and the VM is just running the usual background
> linux stuff plus lldb-server. Not a lot to use up ports.
>
> The tricky part is that even individual parallel test runs (if you run the
> whole test suite, not just a single test like you did above) can race with
> each other.
>
> > Can you remind me what forward/reverse mean here? I guess that forward
> is us telling the remote the port to use, which might already be taken on
> the remote itself.
>
> Correct.
>
> > Then reverse is the remote launching the lldb-server on a port it
> chooses, then telling us what it chose.
>
> Not quite. In "reverse mode" it is the client (in this case -- the test
> suite) who is choosing a port and listening on it. lldb-server gets an
> address and it connects to it.
>
> We also have the method which you described (we probably have more
> connection methods than we should). That one is also reliable (though it
> gets fuzzy with IPv6, as then the port number alone does not uniquely
> identify an endpoint), but it has more moving parts, and it is not
> implemented in the test suite -- just in the client, which we don't use for
> these tests.
>
> One of the goals I am trying to achieve here is actually to be able to
> test the various connection methods at the lldb-server level, but for that
> I need to untangle the connection code from the rest of the test suite
> setup. And ideally I would only support one method (the simplest one) for
> the remote connections and have mark other tests `@skipIfRemote` -- the
> reason for that is that we'd need different code to (e.g.) read the
> server-selected port from a remote machine than we would for the local one,
> so this would be more of a test of the test suite than the server itself.
>
> In D117559#3254148 , @omjavaid
> wrote:
>
> > This doesnt interfere with LLDB tests for SVE. Rather I have not used it
> in a while for SVE tests I ahve using setup similar to to one David has
> explained above.
>
> If you're using the setup that David mentioned, then this would break that.
>
> I am going to try to make a patch to use reverse connect for these tests
> instead.
>
The current set of changes at least dont hurt. I actually tried a test run
with your patch applied before responding.


>
> > @labath Do you know if android adb based tests are being run anywhere?
> Are we still maintaining this support and does it work?
>
> I would guess "no", but I don't know, really. I created this patch to find
> that out myself. :)
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D117559/new/
>
> https://reviews.llvm.org/D117559
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] df13239 - [LLDB] Skip TestIOHandlerPythonREPLSigint.py on AArch64/Linux

2022-01-14 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-01-15T03:24:26+05:00
New Revision: df13239c1177c1c73fcd3422023f9d1224f57545

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

LOG: [LLDB] Skip TestIOHandlerPythonREPLSigint.py on AArch64/Linux

TestIOHandlerPythonREPLSigint.py is running falky on AArch64/Linux
buildbot failing randomly. Skipping it for AArch64/Linux as well.

Added: 


Modified: 

lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py

Removed: 




diff  --git 
a/lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
 
b/lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
index d6d8cca2f439f..996353d927ca7 100644
--- 
a/lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
+++ 
b/lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
@@ -23,6 +23,7 @@ def test_watchpoint_before_thread_start(self):
 """Test that we can hit a watchpoint we set before starting another 
thread"""
 self.do_watchpoint_test("Before running the thread")
 
+@skipIfWindows # This test is flaky on Windows
 def test_watchpoint_after_thread_launch(self):
 """Test that we can hit a watchpoint we set after launching another 
thread"""
 self.do_watchpoint_test("After launching the thread")

diff  --git a/lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py 
b/lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py
index 20d18ca974744..79ffb2a7e300c 100644
--- a/lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py
+++ b/lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py
@@ -25,7 +25,7 @@ def start_python_repl(self):
 # under ASAN on a loaded machine..
 @skipIfAsan
 @skipIfWindows
-@skipIf(oslist=["linux"], archs=["arm"])
+@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
 def test_while_evaluating_code(self):
 """ Tests SIGINT handling while Python code is being evaluated."""
 self.start_python_repl()



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


[Lldb-commits] [lldb] 3dc858f - [LLDB] Skip TestIOHandlerPythonREPLSigint.py on Arm/Linux

2022-01-14 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2022-01-14T15:46:54+05:00
New Revision: 3dc858f9847d1c2dc02e92ad703060b1bfa90ad0

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

LOG: [LLDB] Skip TestIOHandlerPythonREPLSigint.py on Arm/Linux

TestIOHandlerPythonREPLSigint.py is failing on Arm/Linux buildbot. I am
marking it as skip for now.

Added: 


Modified: 
lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py

Removed: 




diff  --git a/lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py 
b/lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py
index a1a27c2baded8..20d18ca974744 100644
--- a/lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py
+++ b/lldb/test/API/iohandler/sigint/TestIOHandlerPythonREPLSigint.py
@@ -25,6 +25,7 @@ def start_python_repl(self):
 # under ASAN on a loaded machine..
 @skipIfAsan
 @skipIfWindows
+@skipIf(oslist=["linux"], archs=["arm"])
 def test_while_evaluating_code(self):
 """ Tests SIGINT handling while Python code is being evaluated."""
 self.start_python_repl()



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


  1   2   3   4   >