back
back copied to clipboard
linux: parse ELF and DWARF to remove libc dependency
- [x] figure out why the line program has direntry 0 (no directory) for the first / main.odin file
- [ ] clean up a lot lot
- [ ] ~~relocate dwarf sections (does this have a use for Odin?)~~ (it does not)
- [ ] make more use of iterators over allocations in the dwarf package
- [ ] make an encapsulating package, similar to the darwin CoreSymbolication API, handles caching, resolving, parsing etc. and just provides symbol info from an address
- [ ] same thing for unwinding, make it a package, probably nice to have an unwind package, with implementations for each target
- [ ] unwinding stops as soon as a libc proc is hit,
backtracekeeps going and gets back to useful info, need that too - [ ] make
bufio.Readersupport seeking and use it (massive perf gains) - [ ] debug
-use-separate-modules, seems to have some stuff going wrong and is a good stress test of compile units
So for going through libc I am thinking we have to hardware unwind instead of virtual unwind, because there are no cu/fde frames in the debug info for it. Not 100% but that is my theory.
OR, there is some kind of link in the ELF that links to the libc file, which we then need to parse separately?