Skip to content

Support files without .debug_aranges#94

Merged
jrfonseca merged 2 commits intojrfonseca:mainfrom
oltolm:aranges
Sep 2, 2025
Merged

Support files without .debug_aranges#94
jrfonseca merged 2 commits intojrfonseca:mainfrom
oltolm:aranges

Conversation

@oltolm
Copy link
Copy Markdown
Contributor

@oltolm oltolm commented Aug 24, 2025

This is my attempt to support files with the .debug_aranges section. I had to also update libdwarf.

Fixes #42.

@jrfonseca
Copy link
Copy Markdown
Owner

Thanks for this.

Some tests are failing because libdwarf is not being built with ZLIB support. What happens is that libdwarf recently started requiring both ZLIB and ZSTD external dependencies in order to enable compressed debug info support. I actually already sorted this out on https://github.com/jrfonseca/drmingw/tree/thirdparty-upgrades

I recommend you rebase your branch on top of thirdparty-upgrades branch, and see how test results look like after.

I'll try to get thirdparty-upgrades merged shortly too. I think I managed to get it all working well in the end. But I need to double check as several weeks passed and I'm not longer sure.

Looking at your code changes, I don't spot anything obviously wrong.

The // search DWARF symbols first, since we support modules without .debug_aranges reordering worries me a bit. I know I ping-ponged between one and another a few times. My recollection is that at least with GCC, PE symbols are often more exact. But it shouldn't be a big deal eitherway, and one can always tweak afterwards.

@oltolm
Copy link
Copy Markdown
Contributor Author

oltolm commented Aug 31, 2025

I rebased it on top of thirdparty-upgrades.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 31, 2025

Codecov Report

❌ Patch coverage is 53.97727% with 81 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.11%. Comparing base (bdff55a) to head (da795d0).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/mgwhelp/dwarf_find.cpp 53.37% 53 Missing and 23 partials ⚠️
src/mgwhelp/mgwhelp.cpp 61.53% 1 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   50.67%   51.11%   +0.43%     
==========================================
  Files          15       15              
  Lines        1997     2160     +163     
  Branches      758      824      +66     
==========================================
+ Hits         1012     1104      +92     
- Misses        757      809      +52     
- Partials      228      247      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jrfonseca
Copy link
Copy Markdown
Owner

Thank you. Tests now pass.

One concern is that this new code is not being exercise according to the codecov report above. But I think this is erroneous: the build-cross-clang exercises this, right? The issue code coverage is only enabled on the Windows native builds, not the Linux cross builds. I can try to fix that in a subsequent build (perhaps by also building clang on Windows, as Wine's DbgHelp.dll is borderline useless.)

@oltolm
Copy link
Copy Markdown
Contributor Author

oltolm commented Sep 2, 2025

Yes I agree, Clang should exercise it.

@jrfonseca jrfonseca merged commit 616ab1c into jrfonseca:main Sep 2, 2025
7 checks passed
@oltolm oltolm deleted the aranges branch September 2, 2025 10:50
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.

No line numbers with Clang due to missing DWARF .debug_aranges section

2 participants