diff options
| author | Jim Ingham <jingham@apple.com> | 2011-09-23 00:54:11 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2011-09-23 00:54:11 +0000 |
| commit | 87df91b8661737980b58f7d1d05c27534c57f490 (patch) | |
| tree | 14e962e25baadb5013438b6686d0c9b1f64922d2 /lldb/source/Symbol/CompileUnit.cpp | |
| parent | b9a11322b13a13dfcccb79cb34ebfc4a84d65bfd (diff) | |
| download | bcm5719-llvm-87df91b8661737980b58f7d1d05c27534c57f490.tar.gz bcm5719-llvm-87df91b8661737980b58f7d1d05c27534c57f490.zip | |
Added the ability to restrict breakpoints by function name, function regexp, selector
etc to specific source files.
Added SB API's to specify these source files & also more than one module.
Added an "exact" option to CompileUnit's FindLineEntry API.
llvm-svn: 140362
Diffstat (limited to 'lldb/source/Symbol/CompileUnit.cpp')
| -rw-r--r-- | lldb/source/Symbol/CompileUnit.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lldb/source/Symbol/CompileUnit.cpp b/lldb/source/Symbol/CompileUnit.cpp index d50ad99dc5e..ec383eb5951 100644 --- a/lldb/source/Symbol/CompileUnit.cpp +++ b/lldb/source/Symbol/CompileUnit.cpp @@ -253,13 +253,13 @@ CompileUnit::GetVariableList(bool can_create) } uint32_t -CompileUnit::FindLineEntry (uint32_t start_idx, uint32_t line, const FileSpec* file_spec_ptr, LineEntry *line_entry_ptr) +CompileUnit::FindLineEntry (uint32_t start_idx, uint32_t line, const FileSpec* file_spec_ptr, bool exact, LineEntry *line_entry_ptr) { uint32_t file_idx = 0; if (file_spec_ptr) { - file_idx = GetSupportFiles().FindFileIndex (1, *file_spec_ptr); + file_idx = GetSupportFiles().FindFileIndex (1, *file_spec_ptr, true); if (file_idx == UINT32_MAX) return UINT32_MAX; } @@ -269,13 +269,14 @@ CompileUnit::FindLineEntry (uint32_t start_idx, uint32_t line, const FileSpec* f // Unit that is in the support files (the one at 0 was artifically added.) // So prefer the one further on in the support files if it exists... FileSpecList &support_files = GetSupportFiles(); - file_idx = support_files.FindFileIndex (1, support_files.GetFileSpecAtIndex(0)); + const bool full = true; + file_idx = support_files.FindFileIndex (1, support_files.GetFileSpecAtIndex(0), full); if (file_idx == UINT32_MAX) file_idx = 0; } LineTable *line_table = GetLineTable(); if (line_table) - return line_table->FindLineEntryIndexByFileIndex (start_idx, file_idx, line, true, line_entry_ptr); + return line_table->FindLineEntryIndexByFileIndex (start_idx, file_idx, line, exact, line_entry_ptr); return UINT32_MAX; } @@ -304,11 +305,11 @@ CompileUnit::ResolveSymbolContext if (file_spec_matches_cu_file_spec == false && check_inlines == false) return 0; - uint32_t file_idx = GetSupportFiles().FindFileIndex (1, file_spec); + uint32_t file_idx = GetSupportFiles().FindFileIndex (1, file_spec, true); while (file_idx != UINT32_MAX) { file_indexes.push_back (file_idx); - file_idx = GetSupportFiles().FindFileIndex (file_idx + 1, file_spec); + file_idx = GetSupportFiles().FindFileIndex (file_idx + 1, file_spec, true); } const size_t num_file_indexes = file_indexes.size(); |

