The ADDR argument used by add-symbol-file should be the starting address of the file's text section.
In fact, I hope to use set solib-search-path or set sysroot rather than add-symbol-file, they are more elegant to add symbols. However, the library names depended by ELF and found in memory maps are different (libc.so.6 vs libc-2.27.so), I can't find convenient way to do it.
The
ADDR
argument used byadd-symbol-file
should be the starting address of the file's text section.In fact, I hope to use
set solib-search-path
orset sysroot
rather thanadd-symbol-file
, they are more elegant to add symbols. However, the library names depended by ELF and found in memory maps are different (libc.so.6
vslibc-2.27.so
), I can't find convenient way to do it.