-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb] Allow SymbolTable regex search functions to match mangled name
It may be useful to search symbol table entries by mangled instead of demangled names. Add this optional functionality in the SymbolTable functions. Differential Revision: https://reviews.llvm.org/D130803
- Loading branch information
1 parent
f23076f
commit 3aef968
Showing
8 changed files
with
191 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- !ELF | ||
FileHeader: | ||
Class: ELFCLASS64 | ||
Data: ELFDATA2LSB | ||
Type: ET_REL | ||
Machine: EM_AARCH64 | ||
SectionHeaderStringTable: .strtab | ||
Sections: | ||
- Name: .text | ||
Type: SHT_PROGBITS | ||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ] | ||
AddressAlign: 0x4 | ||
- Type: SectionHeaderTable | ||
Sections: | ||
- Name: .text | ||
- Name: .strtab | ||
- Name: .symtab | ||
Symbols: | ||
- Name: _Z8someFunciii | ||
Type: STT_FUNC | ||
Section: .text | ||
Binding: STB_GLOBAL | ||
Size: 0x1C | ||
- Name: _Z8someFuncci | ||
Type: STT_FUNC | ||
Section: .text | ||
Binding: STB_GLOBAL | ||
Value: 0x1C | ||
Size: 0x18 | ||
- Name: _Z13someOtherFuncv | ||
Type: STT_FUNC | ||
Section: .text | ||
Binding: STB_GLOBAL | ||
Value: 0x34 | ||
Size: 0x4 | ||
- Name: _Z13someOtherFuncd | ||
Type: STT_FUNC | ||
Section: .text | ||
Binding: STB_GLOBAL | ||
Value: 0x38 | ||
Size: 0x10 | ||
- Name: _Z18ignoreThisFunctionv | ||
Type: STT_FUNC | ||
Section: .text | ||
Binding: STB_GLOBAL | ||
Value: 0x48 | ||
Size: 0x8 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# RUN: yaml2obj %S/Inputs/symbols.yaml -o %t | ||
# | ||
|
||
# RUN: lldb-test symtab --find-symbols-by-regex='.*some.*' --mangling-preference=demangled %t | Filecheck %s | ||
# CHECK: someFunc(int, int, int) | ||
# CHECK: someFunc(char, int) | ||
# CHECK: someOtherFunc() | ||
# CHECK: someOtherFunc(double) | ||
# CHECK-NOT: ignoreThisFunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# RUN: yaml2obj %S/Inputs/symbols.yaml -o %t | ||
# | ||
|
||
# RUN: lldb-test symtab --find-symbols-by-regex='.*some.*' --mangling-preference=mangled %t | Filecheck %s | ||
# CHECK: _Z8someFunciii | ||
# CHECK: _Z8someFuncci | ||
# CHECK: _Z13someOtherFuncv | ||
# CHECK: _Z13someOtherFuncd | ||
# CHECK-NOT: _Z18ignoreThisFunctionv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters