diff options
author | nerix <nerixdev@outlook.de> | 2025-09-23 11:34:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-23 11:34:48 +0200 |
commit | e08d8e3d16d6994df5e42cee7c2672d2fe9cc46c (patch) | |
tree | 5dd35e3532a1f820d2a3b2821cd30c57f793fee2 /llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp | |
parent | 86d767c3a0d422e4ee2a2d7ecc1a6880d9e33448 (diff) | |
download | llvm-e08d8e3d16d6994df5e42cee7c2672d2fe9cc46c.zip llvm-e08d8e3d16d6994df5e42cee7c2672d2fe9cc46c.tar.gz llvm-e08d8e3d16d6994df5e42cee7c2672d2fe9cc46c.tar.bz2 |
[LLDB][PDB] Run UDT layout test with native PDB too (#159769)
This test was failing with the native plugin due to two reasons:
1. The static `C::abc` was printed as `(int) ::C::abc = 123`
2. The order of the base classes of [`C`
(`List::Value`)](https://github.com/llvm/llvm-project/blob/b7e4edca3d56ec87f719c202f5397b245595f7cc/lldb/test/Shell/SymbolFile/PDB/Inputs/UdtLayoutTest.cpp#L30)
is different between DIA and the native plugin. I don't know how the
order in the DIA plugin is determined - it prints `B<0>`, `B<1>`,
`B<2>`, `B<3>`, `A`. The native plugin follows the order of the bases in
memory and prints `B<2>`, `B<3>`, `A`, `B<0>`, `B<1>` (last three are
the virtual bases).
<details><summary>Class layout of C</summary>
```
class C size(88):
+---
0 | +--- (base class B<2>)
0 | | {vbptr}
8 | | _a
9. | | _b (bitstart=3,nbits=6)
11 | | _c
| +---
15 | +--- (base class B<3>)
15 | | {vbptr}
23 | | _a
24. | | _b (bitstart=3,nbits=6)
26 | | _c
| +---
| <alignment member> (size=2)
32 | _x
36 | _y
38 | _z
| <alignment member> (size=1)
| <alignment member> (size=2)
+---
+--- (virtual base A)
40 | {vfptr}
48 | U _u
| <alignment member> (size=4)
+---
+--- (virtual base B<0>)
56 | {vbptr}
64 | _a
65. | _b (bitstart=3,nbits=6)
67 | _c
+---
+--- (virtual base B<1>)
71 | {vbptr}
79 | _a
80. | _b (bitstart=3,nbits=6)
82 | _c
+---
```
</details>
I split the tests for the plugins for better readability.
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions