diff options
| author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2017-11-19 19:04:24 +0000 |
|---|---|---|
| committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2017-11-19 19:04:24 +0000 |
| commit | 0f45abdef73db109bae53cd470e73982d35f8b0f (patch) | |
| tree | 54ec8733e9f0a9150824a16a9e121c6405ca597f /lldb/source/Plugins/SymbolFile | |
| parent | c0218923e1b0227fd030dd353d097437dfb9b209 (diff) | |
| download | bcm5719-llvm-0f45abdef73db109bae53cd470e73982d35f8b0f.tar.gz bcm5719-llvm-0f45abdef73db109bae53cd470e73982d35f8b0f.zip | |
Remove 2 unused methods DWARFDebugInfo::Find and their FindCallbackString
Differential revision: https://reviews.llvm.org/D40216
llvm-svn: 318631
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp | 77 | ||||
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h | 4 |
2 files changed, 0 insertions, 81 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp index eff9850d435..1fcce56c666 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -507,80 +507,3 @@ void DWARFDebugInfo::Dump(Stream *s, const uint32_t die_offset, die.Dump(s, recurse_depth); } } - -//---------------------------------------------------------------------- -// FindCallbackString -// -// A callback function for the static DWARFDebugInfo::Parse() function -// that gets called each time a compile unit header or debug information -// entry is successfully parsed. -// -// This function will find the die_offset of any items whose DW_AT_name -// matches the given string -//---------------------------------------------------------------------- -typedef struct FindCallbackStringInfoTag { - const char *name; - bool ignore_case; - RegularExpression *regex; - vector<dw_offset_t> &die_offsets; -} FindCallbackStringInfo; - -static dw_offset_t -FindCallbackString(SymbolFileDWARF *dwarf2Data, DWARFCompileUnit *cu, - DWARFDebugInfoEntry *die, const dw_offset_t next_offset, - const uint32_t curr_depth, void *userData) { - FindCallbackStringInfo *info = (FindCallbackStringInfo *)userData; - - if (!die) - return next_offset; - - const char *die_name = die->GetName(dwarf2Data, cu); - if (!die_name) - return next_offset; - - if (info->regex) { - if (info->regex->Execute(llvm::StringRef(die_name))) - info->die_offsets.push_back(die->GetOffset()); - } else { - if ((info->ignore_case ? strcasecmp(die_name, info->name) - : strcmp(die_name, info->name)) == 0) - info->die_offsets.push_back(die->GetOffset()); - } - - // Just return the current offset to parse the next CU or DIE entry - return next_offset; -} - -//---------------------------------------------------------------------- -// Find -// -// Finds all DIE that have a specific DW_AT_name attribute by manually -// searching through the debug information (not using the -// .debug_pubnames section). The string must match the entire name -// and case sensitive searches are an option. -//---------------------------------------------------------------------- -bool DWARFDebugInfo::Find(const char *name, bool ignore_case, - vector<dw_offset_t> &die_offsets) const { - die_offsets.clear(); - if (name && name[0]) { - FindCallbackStringInfo info = {name, ignore_case, NULL, die_offsets}; - DWARFDebugInfo::Parse(m_dwarf2Data, FindCallbackString, &info); - } - return !die_offsets.empty(); -} - -//---------------------------------------------------------------------- -// Find -// -// Finds all DIE that have a specific DW_AT_name attribute by manually -// searching through the debug information (not using the -// .debug_pubnames section). The string must match the supplied regular -// expression. -//---------------------------------------------------------------------- -bool DWARFDebugInfo::Find(RegularExpression &re, - vector<dw_offset_t> &die_offsets) const { - die_offsets.clear(); - FindCallbackStringInfo info = {NULL, false, &re, die_offsets}; - DWARFDebugInfo::Parse(m_dwarf2Data, FindCallbackString, &info); - return !die_offsets.empty(); -} diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h index be4e18b12be..89106adf5d8 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h @@ -50,10 +50,6 @@ public: static void Verify(lldb_private::Stream *s, SymbolFileDWARF *dwarf2Data); static void Dump(lldb_private::Stream *s, SymbolFileDWARF *dwarf2Data, const uint32_t die_offset, const uint32_t recurse_depth); - bool Find(const char *name, bool ignore_case, - std::vector<dw_offset_t> &die_offsets) const; - bool Find(lldb_private::RegularExpression &re, - std::vector<dw_offset_t> &die_offsets) const; enum { eDumpFlag_Verbose = (1 << 0), // Verbose dumping |

