Skip to content

Atomic handling fix - #69

Merged
DanielT merged 2 commits into
masterfrom
atomic_handling_fix
Aug 2, 2026
Merged

Atomic handling fix#69
DanielT merged 2 commits into
masterfrom
atomic_handling_fix

Conversation

@DanielT

@DanielT DanielT commented Aug 2, 2026

Copy link
Copy Markdown
Owner
  1. Skip static and constexpr struct members in the DWARF reader

Static and constexpr data members are declared inside a struct or class,
but they have no storage there and are not part of its layout. C++ debug
info describes them as DW_TAG_member with DW_AT_declaration, e.g.
"static constexpr bool is_always_lock_free" in std::atomic, which also
carries DW_AT_const_expr and DW_AT_const_value.
Previously these were loaded as regular members at offset 0 (default),
so a2ltool would create a MEASUREMENT or CHARACTERISTIC for a value that
doesn't exist in memory.

  1. Unify the handling of structs and classes

Both structs and classes can have base classes in C++, and the debug info
describes them in exactly the same way.
The previous model where struct had members but no inheritance was broken.
Now DbgDataType::Struct and DbgDataType::Class have been combined.

Fixes #68

DanielT added 2 commits August 2, 2026 19:09
Static and constexpr data members are declared inside a struct or class,
but they have no storage there and are not part of its layout. C++ debug
info describes them as DW_TAG_member with DW_AT_declaration, e.g.
"static constexpr bool is_always_lock_free" in std::atomic, which also
carries DW_AT_const_expr and DW_AT_const_value.
Previously these were loaded as regular members at offset 0 (default),
so a2ltool would create a MEASUREMENT or CHARACTERISTIC for a value that
doesn't exist in memory.
Both structs and classes can have base classes in C++, and the debug info
describes them in exactly the same way.
The previous model where struct had members but no inheritance was broken.
Now DbgDataType::Struct and DbgDataType::Class have been combined.
@DanielT
DanielT merged commit a48638d into master Aug 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std::atomic not parsed correct

1 participant