diff options
| author | Jim Ingham <jingham@apple.com> | 2023-06-01 16:12:52 -0700 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2023-06-01 16:15:06 -0700 |
| commit | 22667e3220de5ead353a2148265d841644b63824 (patch) | |
| tree | 469be2f76649a31a1aa00de527340743e05eed5c /lldb/test/Shell/ScriptInterpreter/Python | |
| parent | 0a043e6c74a42ddd65ce9dd4455c1140eade9eab (diff) | |
| download | llvm-22667e3220de5ead353a2148265d841644b63824.zip llvm-22667e3220de5ead353a2148265d841644b63824.tar.gz llvm-22667e3220de5ead353a2148265d841644b63824.tar.bz2 | |
Fix regex & startsWith name lookup in SBTarget::FindGlobalVariables
There were two bugs here.
eMatchTypeStartsWith searched for "symbol_name" by adding ".*" to the
end of the symbol name and treating that as a regex, which isn't
actually a regex for "starts with". The ".*" is in fact a no-op. When
we finally get to comparing the name, we compare against whatever form
of the name was in the accelerator table. But for C++ that might be
the mangled name. We should also try demangled names here, since most
users are going the see demangled not mangled names. I fixed these
two bugs and added a bunch of tests for FindGlobalVariables.
This change is in the DWARF parser code, so there may be a similar bug
in PDB, but the test for this was already skipped for Windows, so I
don't know about this.
You might theoretically need to do this Mangled comparison in
DWARFMappedHash::MemoryTable::FindByName
except when we have names we always chop them before looking them up
so I couldn't see any code paths that fail without that change. So I
didn't add that to this patch.
Differential Revision: https://reviews.llvm.org/D151940
Diffstat (limited to 'lldb/test/Shell/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions
