WIP: Extract ELF section reading from rt.backtrace.elf to core.elf#147
WIP: Extract ELF section reading from rt.backtrace.elf to core.elf#147kinke wants to merge 9 commits intoldc-developers:ldcfrom
Conversation
|
Pinging @joakim-noah. |
src/rt/backtrace/elf.d
Outdated
|
|
||
| return null; | ||
| // debug_line section found and loaded | ||
| return cast(const(ubyte)[]) ElfSection(file, dbgSectionHeader).get(); |
There was a problem hiding this comment.
This should be blatantly wrong, unmapping the section data right before returning the slice. I wonder why the original code seems to be working...
|
Good idea, why isn't this submitted upstream? |
|
Needs to be tested and polished first, and I'll probably do this here by simplifying the DSO registration further (no magic linker symbols for the |
|
OK, will this get in before the final 1.12 release? |
|
Nope, definitely not. |
81b5e57 to
28a73c5
Compare
|
The backtrace generation code is working fine on Linux x64. I'll move some other pieces from |
Including some tiny refactorings from my side (mainly wrt. overdue `DSO.tlsRange()`), which I'll propose with some earlier adaptations upstream later. There have been numerous merge conflicts wrt. to this file in the past; upstreaming our OSX adaptations to enable/help with shared Phobos support for DMD might be feasible as well.
Incl. some minor refactoring (pointer to ref, make `findSectionByName()` an ElfFile method, add `findSectionHeaderByName()` convenience method etc.).
|
Now a branch in the official repo and tested by ldc-developers/ldc#2875. |
Incl. some refactoring. Still needs to be verified; there are surely obsolete imports etc.