(gdb) info shared
<Dumps mapping location of shared objects>
Unfortunately, above does not dump actual mapping location that is usable with this:
libswipl.so.7.1.13+0x1f5063
(as you've discovered). Rather, GDB output lists where the .text
section was mapped, not where the ELF binary itself was mapped.
You can adjust for .text
offset by finding it in
readelf -WS libswipl.so.7.1.13 | grep '\.text'
It might be easier to use addr2line
instead. Something like
addr2line -fe libswipl.so.7.1.13 0x1f5063 0x1da783
should work.