The following issue occurs when loading glibc with debug symbols:
- since the file now has both .symtab and .dynsym sections, LLDB decides to load symbols from .symtab, assuming that this is a superset of .dynsym.
- this is not entirely true when ELF symbol versions come into play
- For example, .symtab on glibc contains symbols 'memcpy@@GLIBC_2.14' and 'memcpy@GLIBC_2.2.5', but it does not contain the symbol 'memcpy'
- when we attempt to evaluate an expression referencing 'memcpy' we fail, as we cannot resolve the symbol.
This patch resolves this problem with stripping the version suffix from the default symbols
(containing '@@').