io-no / libdebug

libdebug is a python library to automate the debugging of a binary executable.
Other
1 stars 1 forks source link

Breakpoint on ELF symbol #6

Closed MrIndeciso closed 5 months ago

io-no commented 9 months ago

There are some missing symbols in libraries like libc and ld. This is because they rely on external debug info file not yet managed by libdebug

io-no commented 9 months ago

pyelftools currently supports external debug file information through the following link feature. However, this implementation is not compliant with DWARF 5 standards. A recent issue was raised a few days ago regarding this, but it has not been implemented yet. We have the option to manually follow the link and update our approach once pyelftools is updated, or we could modify pyelftools to include the new section and then submit a pull request. I will try the second option.

io-no commented 9 months ago

I've introduced support for .gnu_debuglink in DWARF5 through this pull request to the pyelftools repository. Future versions of libdebug, at least concerning the symbols, will be based on these commits.

io-no commented 9 months ago

Due to performance issues, I reimplemented the logic using libdwarf and integrated it through CFFI in libdebug in d337ee2481f89eedfa536fa8dca167c84e780d27. It seems working properly but I need more tests.