[Lldb-commits] [lldb] [LLDB][PDB] Run UDT layout test with native PDB too (PR #159769)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 22 02:23:36 PDT 2025


================
@@ -1,51 +1,63 @@
 REQUIRES: target-windows, lld
 RUN: %build --compiler=clang-cl --output=%t.exe %S/Inputs/UdtLayoutTest.cpp
-RUN: %lldb -b -s %S/Inputs/UdtLayoutTest.script -- %t.exe | FileCheck %s
+RUN: env LLDB_USE_NATIVE_PDB_READER=0 %lldb -b -s %S/Inputs/UdtLayoutTest.script -- %t.exe | FileCheck %s
+RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -b -s %S/Inputs/UdtLayoutTest.script -- %t.exe | FileCheck %s
 
-CHECK:(int) C::abc = 123
+CHECK:(int) {{(::)?}}C::abc = 123
 CHECK:(List[16]) ls = {
-CHECK:  [15] = {
-CHECK:    Prev = nullptr
-CHECK:    Next = nullptr
-CHECK:    Value = {
-CHECK:      B<0> = {
-CHECK:        A = {
-CHECK:          _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:        }
-CHECK:        _a = '\x01'
-CHECK:        _b = 2
-CHECK:        _c = 3
-CHECK:      }
-CHECK:      B<1> = {
-CHECK:        A = {
-CHECK:          _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:        }
-CHECK:        _a = '\x02'
-CHECK:        _b = 4
-CHECK:        _c = 6
-CHECK:      }
-CHECK:      B<2> = {
-CHECK:        A = {
-CHECK:          _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:        }
-CHECK:        _a = '\x03'
-CHECK:        _b = 6
-CHECK:        _c = 9
-CHECK:      }
-CHECK:      B<3> = {
-CHECK:        A = {
-CHECK:          _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:        }
-CHECK:        _a = '\x04'
-CHECK:        _b = 8
-CHECK:        _c = 12
-CHECK:      }
-CHECK:      A = {
-CHECK:        _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
-CHECK:      }
-CHECK:      _x = 5
-CHECK:      _y = 10
-CHECK:      _z = '\x0f'
-CHECK:    }
-CHECK:  }
-CHECK:}
+
+CHECK:       [14] = {
----------------
Michael137 wrote:

Can we just have two `CHECK` prefixes. One for the native and one for the DIA plugin. And check the respective layouts.

I find that less confusing to someone reading this file for the first time

https://github.com/llvm/llvm-project/pull/159769


More information about the lldb-commits mailing list