[llvm] [llvm-debuginfo-analyzer] Add support for DWARF `DW_AT_byte_size` (PR #139110)
Carlos Alberto Enciso via llvm-commits
llvm-commits at lists.llvm.org
Mon May 12 06:38:29 PDT 2025
================
@@ -32,9 +32,9 @@
; ONE-NEXT: {File} 'test.cpp'
; ONE-NEXT: {Public} 'foo' [0x0000000000:0x000000003a]
; ONE-NEXT: [0x000000000b][002] {Range} Lines 2:9 [0x0000000000:0x000000003a]
-; ONE-NEXT: [0x00000000bc][002] {BaseType} 'bool'
-; ONE-NEXT: [0x0000000099][002] {BaseType} 'int'
-; ONE-NEXT: [0x00000000b5][002] {BaseType} 'unsigned int'
+; ONE-NEXT: [0x00000000bc][002] {BaseType} 'bool' [Size = 1]
+; ONE-NEXT: [0x0000000099][002] {BaseType} 'int' [Size = 4]
+; ONE-NEXT: [0x00000000b5][002] {BaseType} 'unsigned int' [Size = 4]
----------------
CarlosAlbertoEnciso wrote:
The current output format for the `xx_bit_size` is `symbol-name:size`.
```
{Struct} 'struct_bitfield'
{Member} public 'code' -> 'int'
{Member} public 'debug':1 -> 'int'
{Member} public 'release':2 -> 'int'
```
How do you feel if we follow a similar approach for the `xx_byte_size`
```
{BaseType} 'bool:1'
{BaseType} 'int:4'
{BaseType} 'unsigned int:4'
```
https://github.com/llvm/llvm-project/pull/139110
More information about the llvm-commits
mailing list