CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
127 lines
2.8 KiB
Plaintext
127 lines
2.8 KiB
Plaintext
# REQUIRES: target-windows
|
|
|
|
# Test UDT layout reconstruction
|
|
# RUN: split-file %s %t
|
|
# RUN: %build --compiler=clang-cl -o %t.exe -- %t/main.cpp
|
|
# RUN: %lldb -f %t.exe -s %t/commands.input 2>&1 | FileCheck %s
|
|
|
|
#--- main.cpp
|
|
|
|
// this is from the DIA plugin (UdtLayoutTest.cpp)
|
|
struct A {
|
|
explicit A(int u) { _u._u3 = u; }
|
|
A(const A &) = default;
|
|
virtual ~A() = default;
|
|
|
|
private:
|
|
union U {
|
|
char _u1;
|
|
short _u2;
|
|
int _u3;
|
|
};
|
|
|
|
A::U _u;
|
|
};
|
|
|
|
#pragma pack(push, 1)
|
|
template <int I> struct B : public virtual A {
|
|
B(char a, unsigned short b, int c) : A(a + b + c), _a(a), _b(b), _c(c) {}
|
|
|
|
private:
|
|
char _a;
|
|
unsigned short : 3;
|
|
unsigned short _b : 6;
|
|
unsigned short : 4;
|
|
int _c;
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
#pragma pack(push, 16)
|
|
class C : private virtual B<0>, public virtual B<1>, private B<2>, public B<3> {
|
|
public:
|
|
C(char x, char y, char z)
|
|
: A(x - y + z), B<0>(x, y, z), B<1>(x * 2, y * 2, z * 2),
|
|
B<2>(x * 3, y * 3, z * 3), B<3>(x * 4, y * 4, z * 4), _x(x * 5),
|
|
_y(y * 5), _z(z * 5) {}
|
|
|
|
static int abc;
|
|
|
|
private:
|
|
int _x;
|
|
short _y;
|
|
char _z;
|
|
};
|
|
int C::abc = 123;
|
|
#pragma pack(pop)
|
|
|
|
class List {
|
|
public:
|
|
List() = default;
|
|
List(List *p, List *n, C v) : Prev(p), Next(n), Value(v) {}
|
|
|
|
private:
|
|
List *Prev = nullptr;
|
|
List *Next = nullptr;
|
|
C Value{1, 2, 3};
|
|
};
|
|
|
|
int main() {
|
|
List ls[16];
|
|
return 0; // break here
|
|
}
|
|
|
|
#--- commands.input
|
|
|
|
settings set target.max-children-depth 10
|
|
br set -p "break here"
|
|
run
|
|
target variable
|
|
frame variable
|
|
quit
|
|
|
|
# CHECK: (int) ::C::abc = 123
|
|
|
|
# CHECK: (List[16]) ls = {
|
|
# CHECK: [15] = {
|
|
# CHECK-NEXT: Prev = nullptr
|
|
# CHECK-NEXT: Next = nullptr
|
|
# CHECK-NEXT: Value = {
|
|
# CHECK-NEXT: B<2> = {
|
|
# CHECK-NEXT: A = {
|
|
# CHECK-NEXT: _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: _a = '\x03'
|
|
# CHECK-NEXT: _b = 6
|
|
# CHECK-NEXT: _c = 9
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: B<3> = {
|
|
# CHECK-NEXT: A = {
|
|
# CHECK-NEXT: _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: _a = '\x04'
|
|
# CHECK-NEXT: _b = 8
|
|
# CHECK-NEXT: _c = 12
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: B<0> = {
|
|
# CHECK-NEXT: A = {
|
|
# CHECK-NEXT: _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: _a = '\x01'
|
|
# CHECK-NEXT: _b = 2
|
|
# CHECK-NEXT: _c = 3
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: B<1> = {
|
|
# CHECK-NEXT: A = {
|
|
# CHECK-NEXT: _u = (_u1 = '\x02', _u2 = 2, _u3 = 2)
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: _a = '\x02'
|
|
# CHECK-NEXT: _b = 4
|
|
# CHECK-NEXT: _c = 6
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: _x = 5
|
|
# CHECK-NEXT: _y = 10
|
|
# CHECK-NEXT: _z = '\x0f'
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: }
|
|
# CHECK-NEXT: }
|