volatilityfoundation / dwarf2json

convert ELF/DWARF symbol and type information into vol3's intermediate JSON
Other
104 stars 28 forks source link

Bitfield with negative bit_position value #49

Closed IridiumXOR closed 8 months ago

IridiumXOR commented 1 year ago

Hi, generating the json profile for vmlinux-5.19.0-40-generic Ubuntu 22.04 stock kernel I have discovered that the tool produce a negative bit_position value for bitfields (example for field active_mode in struct Scsi_Host. I think the problem come from this line: https://github.com/volatilityfoundation/dwarf2json/blob/c306d1132f014dc882ffc0ad22e97764bae49451/main.go#L290

Please can you fix it?

Shiselster commented 1 year ago

I tend to believe the issue stems from differences between DWARF Version 4 and DWARF Version 5, the latter probably not supported by dwarf2json yet?

TamirVered commented 1 year ago

Happens to me too (only on DWARF Version 5), any intention to fix it?

Shiselster commented 8 months ago

Issue seems to be fixed after commit https://github.com/volatilityfoundation/dwarf2json/pull/58/commits/9673739daf497a6ebc835f6dcb8f74de19d9e8ba!!

Great job @mkonshie! Any plans to merge https://github.com/volatilityfoundation/dwarf2json/pull/58 back into master?