Skip to content

fix: resolve inherited C++ members from DWARF - #293

Merged
swananan merged 1 commit into
mainfrom
fix/cpp-inherited-member-lookup
Sep 5, 2026
Merged

fix: resolve inherited C++ members from DWARF#293
swananan merged 1 commit into
mainfrom
fix/cpp-inherited-member-lookup

Conversation

@swananan

@swananan swananan commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • traverse non-virtual C++ inheritance DIEs and apply base offsets to inherited members
  • reject ambiguous inherited member paths instead of selecting the first base
  • resolve DWARF 5 signature-backed base types emitted by Clang and GCC
  • add unit and e2e coverage for inherited lookup, ambiguity, and type units

Testing

  • cargo fmt --all
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test -p ghostscope-dwarf --all-features
  • cargo test -p ghostscope-e2e-tests --test dwarf_index_regressions test_gdb_index_resolves_function_type_and_global_lazily -- --nocapture
  • runner e2e: test_cpp_member_access_after_many_sibling_blocks_compiles
  • runner e2e: test_cpp_inherited_member_access
  • runner e2e: test_cpp_ambiguous_inherited_member_access_is_rejected

A full host e2e run was also attempted. Unrelated Rust value tests failed with the same invalid-read output on the baseline in this environment. Container-topology e2e was not run because this change does not affect container behavior.

Traverse non-virtual inheritance DIEs and flatten base layouts with
adjusted offsets.

Preserve derived-member precedence, reject ambiguous multiple-inheritance
lookups, and follow DWARF 5 type-unit signatures emitted by Clang and GCC.

Add unit and end-to-end coverage for inherited lookup, ambiguity, and
signature-backed base types.
@swananan
swananan merged commit 76922bf into main Sep 5, 2026
10 checks passed
@swananan
swananan deleted the fix/cpp-inherited-member-lookup branch September 5, 2026 04:45
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.

1 participant