-
-
Notifications
You must be signed in to change notification settings - Fork 120
feat: Support GDB index #1990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: Support GDB index #1990
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8cf5980
Add section name constant and part/section IDs
lapla-cogito d1ba635
Add `--gdb-index` and `--no-gdb-index`
lapla-cogito 935b190
Implement `.gdb_index` section generation
lapla-cogito 3db1ae5
Update skip tests list
lapla-cogito a845911
Add integration tests
lapla-cogito c17257a
Eliminate duplicate parse_cu_boundaries in compute_gdb_index_size
lapla-cogito 469eb9d
Merge address and symbol table construction into single object scan
lapla-cogito 224d518
clippy fix
lapla-cogito 9d3f0ff
Extract shared pubnames/pubtypes iteration into a helper
lapla-cogito b31d144
Use more idiomatic APIs and fix step calc
lapla-cogito c6aaf5b
Calculate hashslots using zerocopy
lapla-cogito 52a5131
Add a comment for `cv_bytes` addition
lapla-cogito 17b1abf
Add consts for `.debug_info`
lapla-cogito 1b3070c
Write constant pool directly to output buffer
lapla-cogito b935f8f
Use itertools `sorted_unstable_by_key()`
lapla-cogito 82fb063
Unify object scannig logic
lapla-cogito 00ab232
Refactor pubnames collection
lapla-cogito f3c060f
Use `BTreeSet` for `cv_entries`
lapla-cogito ebf6270
Improve error handling
lapla-cogito d35f6b8
Use `sorted_names` rather than `sorted` as a variable name
lapla-cogito 1c1550f
Emit errors when GDB indices are corrupted
lapla-cogito 1084243
Add some comments and warnings
lapla-cogito a682194
Revert "Emit errors when GDB indices are corrupted"
lapla-cogito f6f856c
Add a comment about CU
lapla-cogito c56a5be
Add some `timing_phase!`s
lapla-cogito b80b0c5
Return an error if gdb index hash table has no empty slots
lapla-cogito 0c0b335
Parallelize GDB index scan and cache the result across phases
lapla-cogito fb3ccdf
Reduce reparsing `.debug_info`
lapla-cogito 1011cec
Handle compressed debug sections in GDB index generation
lapla-cogito 373a70a
Replace most of `break`s with `ensure!`
lapla-cogito aa4f1c3
Don't generate GDB index with `--strip-debug` or `--strip-all`
lapla-cogito b05456a
Fix address entries for objects with multiple CUs
lapla-cogito File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like lld and mold, if --strip-debug is supplied (or presumably --strip, but I didn't try that) won't write the gdb-index. Could we do the same (and have a test for it)? As a separate PR is fine, but also fine in this PR.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing locally, neither lld nor mold emits a GDB index when either
--strip-allor--strip-debugis passed, so I changed the implementation to match that behavior. aa4f1c3