LLDB  mainline
BreakpointResolverName.cpp
Go to the documentation of this file.
1 //===-- BreakpointResolverName.cpp ----------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
12 #include "lldb/Core/Architecture.h"
13 #include "lldb/Core/Module.h"
14 #include "lldb/Symbol/Block.h"
15 #include "lldb/Symbol/Function.h"
16 #include "lldb/Symbol/Symbol.h"
18 #include "lldb/Target/Target.h"
19 #include "lldb/Target/Language.h"
20 #include "lldb/Utility/Log.h"
22 
23 using namespace lldb;
24 using namespace lldb_private;
25 
26 BreakpointResolverName::BreakpointResolverName(const BreakpointSP &bkpt,
27  const char *name_cstr, FunctionNameType name_type_mask,
28  LanguageType language, Breakpoint::MatchType type, lldb::addr_t offset,
29  bool skip_prologue)
30  : BreakpointResolver(bkpt, BreakpointResolver::NameResolver, offset),
31  m_class_name(), m_regex(), m_match_type(type), m_language(language),
32  m_skip_prologue(skip_prologue) {
33  if (m_match_type == Breakpoint::Regexp) {
34  m_regex = RegularExpression(name_cstr);
35  if (!m_regex.IsValid()) {
37 
38  if (log)
39  log->Warning("function name regexp: \"%s\" did not compile.",
40  name_cstr);
41  }
42  } else {
43  AddNameLookup(ConstString(name_cstr), name_type_mask);
44  }
45 }
46 
48  const BreakpointSP &bkpt, const char *names[], size_t num_names,
49  FunctionNameType name_type_mask, LanguageType language, lldb::addr_t offset,
50  bool skip_prologue)
51  : BreakpointResolver(bkpt, BreakpointResolver::NameResolver, offset),
52  m_match_type(Breakpoint::Exact), m_language(language),
53  m_skip_prologue(skip_prologue) {
54  for (size_t i = 0; i < num_names; i++) {
55  AddNameLookup(ConstString(names[i]), name_type_mask);
56  }
57 }
58 
59 BreakpointResolverName::BreakpointResolverName(const BreakpointSP &bkpt,
60  std::vector<std::string> names,
61  FunctionNameType name_type_mask,
62  LanguageType language,
63  lldb::addr_t offset,
64  bool skip_prologue)
65  : BreakpointResolver(bkpt, BreakpointResolver::NameResolver, offset),
66  m_match_type(Breakpoint::Exact), m_language(language),
67  m_skip_prologue(skip_prologue) {
68  for (const std::string &name : names) {
69  AddNameLookup(ConstString(name.c_str(), name.size()), name_type_mask);
70  }
71 }
72 
73 BreakpointResolverName::BreakpointResolverName(const BreakpointSP &bkpt,
74  RegularExpression func_regex,
75  lldb::LanguageType language,
76  lldb::addr_t offset,
77  bool skip_prologue)
78  : BreakpointResolver(bkpt, BreakpointResolver::NameResolver, offset),
79  m_class_name(nullptr), m_regex(std::move(func_regex)),
80  m_match_type(Breakpoint::Regexp), m_language(language),
81  m_skip_prologue(skip_prologue) {}
82 
84  const BreakpointResolverName &rhs)
85  : BreakpointResolver(rhs.GetBreakpoint(), BreakpointResolver::NameResolver,
86  rhs.GetOffset()),
87  m_lookups(rhs.m_lookups), m_class_name(rhs.m_class_name),
88  m_regex(rhs.m_regex), m_match_type(rhs.m_match_type),
89  m_language(rhs.m_language), m_skip_prologue(rhs.m_skip_prologue) {}
90 
92  const BreakpointSP &bkpt, const StructuredData::Dictionary &options_dict,
93  Status &error) {
95  llvm::StringRef language_name;
96  bool success = options_dict.GetValueForKeyAsString(
97  GetKey(OptionNames::LanguageName), language_name);
98  if (success) {
99  language = Language::GetLanguageTypeFromString(language_name);
100  if (language == eLanguageTypeUnknown) {
101  error.SetErrorStringWithFormatv("BRN::CFSD: Unknown language: {0}.",
102  language_name);
103  return nullptr;
104  }
105  }
106 
107  lldb::addr_t offset = 0;
108  success =
109  options_dict.GetValueForKeyAsInteger(GetKey(OptionNames::Offset), offset);
110  if (!success) {
111  error.SetErrorString("BRN::CFSD: Missing offset entry.");
112  return nullptr;
113  }
114 
115  bool skip_prologue;
116  success = options_dict.GetValueForKeyAsBoolean(
117  GetKey(OptionNames::SkipPrologue), skip_prologue);
118  if (!success) {
119  error.SetErrorString("BRN::CFSD: Missing Skip prologue entry.");
120  return nullptr;
121  }
122 
123  llvm::StringRef regex_text;
124  success = options_dict.GetValueForKeyAsString(
125  GetKey(OptionNames::RegexString), regex_text);
126  if (success) {
127  return new BreakpointResolverName(bkpt, RegularExpression(regex_text),
128  language, offset, skip_prologue);
129  } else {
130  StructuredData::Array *names_array;
131  success = options_dict.GetValueForKeyAsArray(
132  GetKey(OptionNames::SymbolNameArray), names_array);
133  if (!success) {
134  error.SetErrorString("BRN::CFSD: Missing symbol names entry.");
135  return nullptr;
136  }
137  StructuredData::Array *names_mask_array;
138  success = options_dict.GetValueForKeyAsArray(
139  GetKey(OptionNames::NameMaskArray), names_mask_array);
140  if (!success) {
141  error.SetErrorString("BRN::CFSD: Missing symbol names mask entry.");
142  return nullptr;
143  }
144 
145  size_t num_elem = names_array->GetSize();
146  if (num_elem != names_mask_array->GetSize()) {
147  error.SetErrorString(
148  "BRN::CFSD: names and names mask arrays have different sizes.");
149  return nullptr;
150  }
151 
152  if (num_elem == 0) {
153  error.SetErrorString(
154  "BRN::CFSD: no name entry in a breakpoint by name breakpoint.");
155  return nullptr;
156  }
157  std::vector<std::string> names;
158  std::vector<FunctionNameType> name_masks;
159  for (size_t i = 0; i < num_elem; i++) {
160  llvm::StringRef name;
161 
162  success = names_array->GetItemAtIndexAsString(i, name);
163  if (!success) {
164  error.SetErrorString("BRN::CFSD: name entry is not a string.");
165  return nullptr;
166  }
167  std::underlying_type<FunctionNameType>::type fnt;
168  success = names_mask_array->GetItemAtIndexAsInteger(i, fnt);
169  if (!success) {
170  error.SetErrorString("BRN::CFSD: name mask entry is not an integer.");
171  return nullptr;
172  }
173  names.push_back(std::string(name));
174  name_masks.push_back(static_cast<FunctionNameType>(fnt));
175  }
176 
178  bkpt, names[0].c_str(), name_masks[0], language,
179  Breakpoint::MatchType::Exact, offset, skip_prologue);
180  for (size_t i = 1; i < num_elem; i++) {
181  resolver->AddNameLookup(ConstString(names[i]), name_masks[i]);
182  }
183  return resolver;
184  }
185 }
186 
188  StructuredData::DictionarySP options_dict_sp(
190 
191  if (m_regex.IsValid()) {
192  options_dict_sp->AddStringItem(GetKey(OptionNames::RegexString),
193  m_regex.GetText());
194  } else {
196  StructuredData::ArraySP name_masks_sp(new StructuredData::Array());
197  for (auto lookup : m_lookups) {
198  names_sp->AddItem(StructuredData::StringSP(
199  new StructuredData::String(lookup.GetName().GetStringRef())));
200  name_masks_sp->AddItem(StructuredData::IntegerSP(
201  new StructuredData::Integer(lookup.GetNameTypeMask())));
202  }
203  options_dict_sp->AddItem(GetKey(OptionNames::SymbolNameArray), names_sp);
204  options_dict_sp->AddItem(GetKey(OptionNames::NameMaskArray), name_masks_sp);
205  }
207  options_dict_sp->AddStringItem(
210  options_dict_sp->AddBooleanItem(GetKey(OptionNames::SkipPrologue),
212 
213  return WrapOptionsDict(options_dict_sp);
214 }
215 
217  FunctionNameType name_type_mask) {
218 
219  Module::LookupInfo lookup(name, name_type_mask, m_language);
220  m_lookups.emplace_back(lookup);
221 
222  auto add_variant_funcs = [&](Language *lang) {
223  for (Language::MethodNameVariant variant :
224  lang->GetMethodNameVariants(name)) {
225  // FIXME: Should we be adding variants that aren't of type Full?
226  if (variant.GetType() & lldb::eFunctionNameTypeFull) {
227  Module::LookupInfo variant_lookup(name, variant.GetType(),
228  lang->GetLanguageType());
229  variant_lookup.SetLookupName(variant.GetName());
230  m_lookups.emplace_back(variant_lookup);
231  }
232  }
233  return true;
234  };
235 
237  add_variant_funcs(lang);
238  } else {
239  // Most likely m_language is eLanguageTypeUnknown. We check each language for
240  // possible variants or more qualified names and create lookups for those as
241  // well.
242  Language::ForEach(add_variant_funcs);
243  }
244 }
245 
246 // FIXME: Right now we look at the module level, and call the module's
247 // "FindFunctions".
248 // Greg says he will add function tables, maybe at the CompileUnit level to
249 // accelerate function lookup. At that point, we should switch the depth to
250 // CompileUnit, and look in these tables.
251 
254  SymbolContext &context, Address *addr) {
256 
257  if (m_class_name) {
258  if (log)
259  log->Warning("Class/method function specification not supported yet.\n");
261  }
262 
263  SymbolContextList func_list;
264  bool filter_by_cu =
265  (filter.GetFilterRequiredItems() & eSymbolContextCompUnit) != 0;
266  bool filter_by_language = (m_language != eLanguageTypeUnknown);
267 
268  ModuleFunctionSearchOptions function_options;
269  function_options.include_symbols = !filter_by_cu;
270  function_options.include_inlines = true;
271 
272  switch (m_match_type) {
273  case Breakpoint::Exact:
274  if (context.module_sp) {
275  for (const auto &lookup : m_lookups) {
276  const size_t start_func_idx = func_list.GetSize();
277  context.module_sp->FindFunctions(
278  lookup.GetLookupName(), CompilerDeclContext(),
279  lookup.GetNameTypeMask(), function_options, func_list);
280 
281  const size_t end_func_idx = func_list.GetSize();
282 
283  if (start_func_idx < end_func_idx)
284  lookup.Prune(func_list, start_func_idx);
285  }
286  }
287  break;
288  case Breakpoint::Regexp:
289  if (context.module_sp) {
290  context.module_sp->FindFunctions(m_regex, function_options, func_list);
291  }
292  break;
293  case Breakpoint::Glob:
294  if (log)
295  log->Warning("glob is not supported yet.");
296  break;
297  }
298 
299  // If the filter specifies a Compilation Unit, remove the ones that don't
300  // pass at this point.
301  if (filter_by_cu || filter_by_language) {
302  uint32_t num_functions = func_list.GetSize();
303 
304  for (size_t idx = 0; idx < num_functions; idx++) {
305  bool remove_it = false;
306  SymbolContext sc;
307  func_list.GetContextAtIndex(idx, sc);
308  if (filter_by_cu) {
309  if (!sc.comp_unit || !filter.CompUnitPasses(*sc.comp_unit))
310  remove_it = true;
311  }
312 
313  if (filter_by_language) {
314  LanguageType sym_language = sc.GetLanguage();
315  if ((Language::GetPrimaryLanguage(sym_language) !=
317  (sym_language != eLanguageTypeUnknown)) {
318  remove_it = true;
319  }
320  }
321 
322  if (remove_it) {
323  func_list.RemoveContextAtIndex(idx);
324  num_functions--;
325  idx--;
326  }
327  }
328  }
329 
330  BreakpointSP breakpoint_sp = GetBreakpoint();
331  Breakpoint &breakpoint = *breakpoint_sp;
332  Address break_addr;
333 
334  // Remove any duplicates between the function list and the symbol list
335  SymbolContext sc;
336  if (!func_list.GetSize())
338 
339  for (uint32_t i = 0; i < func_list.GetSize(); i++) {
340  if (!func_list.GetContextAtIndex(i, sc))
341  continue;
342 
343  bool is_reexported = false;
344 
345  if (sc.block && sc.block->GetInlinedFunctionInfo()) {
346  if (!sc.block->GetStartAddress(break_addr))
347  break_addr.Clear();
348  } else if (sc.function) {
349  break_addr = sc.function->GetAddressRange().GetBaseAddress();
350  if (m_skip_prologue && break_addr.IsValid()) {
351  const uint32_t prologue_byte_size = sc.function->GetPrologueByteSize();
352  if (prologue_byte_size)
353  break_addr.SetOffset(break_addr.GetOffset() + prologue_byte_size);
354  }
355  } else if (sc.symbol) {
356  if (sc.symbol->GetType() == eSymbolTypeReExported) {
357  const Symbol *actual_symbol =
358  sc.symbol->ResolveReExportedSymbol(breakpoint.GetTarget());
359  if (actual_symbol) {
360  is_reexported = true;
361  break_addr = actual_symbol->GetAddress();
362  }
363  } else {
364  break_addr = sc.symbol->GetAddress();
365  }
366 
367  if (m_skip_prologue && break_addr.IsValid()) {
368  const uint32_t prologue_byte_size = sc.symbol->GetPrologueByteSize();
369  if (prologue_byte_size)
370  break_addr.SetOffset(break_addr.GetOffset() + prologue_byte_size);
371  else {
372  const Architecture *arch =
373  breakpoint.GetTarget().GetArchitecturePlugin();
374  if (arch)
375  arch->AdjustBreakpointAddress(*sc.symbol, break_addr);
376  }
377  }
378  }
379 
380  if (!break_addr.IsValid())
381  continue;
382 
383  if (!filter.AddressPasses(break_addr))
384  continue;
385 
386  bool new_location;
387  BreakpointLocationSP bp_loc_sp(AddLocation(break_addr, &new_location));
388  bp_loc_sp->SetIsReExported(is_reexported);
389  if (bp_loc_sp && new_location && !breakpoint.IsInternal()) {
390  if (log) {
391  StreamString s;
392  bp_loc_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
393  LLDB_LOGF(log, "Added location: %s\n", s.GetData());
394  }
395  }
396  }
397 
399 }
400 
403 }
404 
407  s->Printf("regex = '%s'", m_regex.GetText().str().c_str());
408  else {
409  size_t num_names = m_lookups.size();
410  if (num_names == 1)
411  s->Printf("name = '%s'", m_lookups[0].GetName().GetCString());
412  else {
413  s->Printf("names = {");
414  for (size_t i = 0; i < num_names; i++) {
415  s->Printf("%s'%s'", (i == 0 ? "" : ", "),
416  m_lookups[i].GetName().GetCString());
417  }
418  s->Printf("}");
419  }
420  }
422  s->Printf(", language = %s", Language::GetNameForLanguageType(m_language));
423  }
424 }
425 
427 
428 lldb::BreakpointResolverSP
429 BreakpointResolverName::CopyForBreakpoint(BreakpointSP &breakpoint) {
430  lldb::BreakpointResolverSP ret_sp(new BreakpointResolverName(*this));
431  ret_sp->SetBreakpoint(breakpoint);
432  return ret_sp;
433 }
lldb_private::AddressRange::GetBaseAddress
Address & GetBaseAddress()
Get accessor for the base address of the range.
Definition: AddressRange.h:209
Block.h
lldb_private::SymbolContext::block
Block * block
The Block for a given query.
Definition: SymbolContext.h:321
lldb_private::SymbolContext::comp_unit
CompileUnit * comp_unit
The CompileUnit for a given query.
Definition: SymbolContext.h:319
lldb_private::StructuredData::Dictionary
Definition: StructuredData.h:352
lldb_private::Architecture
Definition: Architecture.h:17
lldb_private::RegularExpression
Definition: RegularExpression.h:18
lldb::SearchDepth
SearchDepth
Definition: lldb-enumerations.h:283
lldb_private::Address::IsValid
bool IsValid() const
Check if the object state is valid.
Definition: Address.h:336
lldb_private::Address::Clear
void Clear()
Clear the object's state.
Definition: Address.h:178
lldb_private::SearchFilter::AddressPasses
virtual bool AddressPasses(Address &addr)
Call this method with a Address to see if address passes the filter.
Definition: SearchFilter.cpp:141
lldb_private::Symbol::GetPrologueByteSize
uint32_t GetPrologueByteSize()
Definition: Symbol.cpp:259
lldb_private::Function::GetAddressRange
const AddressRange & GetAddressRange()
Definition: Function.h:461
lldb_private::StructuredData::Array
Definition: StructuredData.h:165
lldb_private::BreakpointResolverName::SearchCallback
Searcher::CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context, Address *addr) override
Definition: BreakpointResolverName.cpp:253
lldb_private::Symbol
Definition: Symbol.h:20
lldb_private::StructuredData::Integer
Definition: StructuredData.h:285
lldb_private::BreakpointResolverName::GetDepth
lldb::SearchDepth GetDepth() override
Definition: BreakpointResolverName.cpp:401
lldb_private::BreakpointResolverName::m_match_type
Breakpoint::MatchType m_match_type
Definition: BreakpointResolverName.h:87
lldb_private::SearchFilter::GetFilterRequiredItems
virtual uint32_t GetFilterRequiredItems()
This determines which items are REQUIRED for the filter to pass.
Definition: SearchFilter.cpp:156
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:249
lldb_private::BreakpointResolver::OptionNames::SkipPrologue
@ SkipPrologue
Architecture.h
lldb_private::BreakpointResolverName::m_language
lldb::LanguageType m_language
Definition: BreakpointResolverName.h:88
Module.h
BreakpointLocation.h
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::Log::Warning
void void void void Warning(const char *fmt,...) __attribute__((format(printf
Definition: Log.cpp:172
lldb_private::SymbolContextList
Definition: SymbolContext.h:379
lldb_private::SymbolContextList::GetContextAtIndex
bool GetContextAtIndex(size_t idx, SymbolContext &sc) const
Get accessor for a symbol context at index idx.
Definition: SymbolContext.cpp:1262
lldb_private::Stream
Definition: Stream.h:28
lldb_private::BreakpointResolverName::SerializeToStructuredData
StructuredData::ObjectSP SerializeToStructuredData() override
Definition: BreakpointResolverName.cpp:187
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
Language.h
lldb_private::ModuleFunctionSearchOptions::include_symbols
bool include_symbols
Include the symbol table.
Definition: Module.h:64
lldb_private::BreakpointResolver::OptionNames::NameMaskArray
@ NameMaskArray
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::BreakpointResolverName::GetDescription
void GetDescription(Stream *s) override
Prints a canonical description for the breakpoint to the stream s.
Definition: BreakpointResolverName.cpp:405
lldb_private::StructuredData::Dictionary::GetValueForKeyAsInteger
bool GetValueForKeyAsInteger(llvm::StringRef key, IntType &result) const
Definition: StructuredData.h:403
lldb_private::ModuleFunctionSearchOptions::include_inlines
bool include_inlines
Include inlined functions.
Definition: Module.h:66
Target.h
lldb_private::BreakpointResolverName::AddNameLookup
void AddNameLookup(ConstString name, lldb::FunctionNameType name_type_mask)
Definition: BreakpointResolverName.cpp:216
lldb_private::Module::LookupInfo
Definition: Module.h:894
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::SymbolContext::symbol
Symbol * symbol
The Symbol for a given query.
Definition: SymbolContext.h:323
lldb_private::StructuredData::StringSP
std::shared_ptr< String > StringSP
Definition: StructuredData.h:66
lldb_private::StructuredData::String
Definition: StructuredData.h:336
lldb_private::SearchFilter
General Outline: Provides the callback and search depth for the SearchFilter search.
Definition: SearchFilter.h:83
Log.h
lldb_private::Breakpoint::IsInternal
bool IsInternal() const
Tell whether this breakpoint is an "internal" breakpoint.
Definition: Breakpoint.cpp:258
lldb_private::Breakpoint::MatchType
MatchType
An enum specifying the match style for breakpoint settings.
Definition: Breakpoint.h:86
lldb_private::BreakpointResolverName::m_class_name
ConstString m_class_name
Definition: BreakpointResolverName.h:85
lldb_private::Architecture::AdjustBreakpointAddress
virtual void AdjustBreakpointAddress(const Symbol &func, Address &addr) const
Adjust function breakpoint address, if needed.
Definition: Architecture.h:58
lldb_private::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition: StructuredData.h:59
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
GetName
static llvm::StringRef GetName(XcodeSDK::Type type)
Definition: XcodeSDK.cpp:21
lldb_private::SymbolContext::function
Function * function
The Function for a given query.
Definition: SymbolContext.h:320
StreamString.h
lldb_private::Breakpoint::Exact
@ Exact
Definition: Breakpoint.h:86
lldb_private::SymbolContextList::GetSize
uint32_t GetSize() const
Get accessor for a symbol context list size.
Definition: SymbolContext.cpp:1278
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::Searcher::CallbackReturn
CallbackReturn
Definition: SearchFilter.h:44
lldb_private::RegularExpression::IsValid
bool IsValid() const
Test if this object contains a valid regular expression.
Definition: RegularExpression.cpp:31
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::Breakpoint::Glob
@ Glob
Definition: Breakpoint.h:86
lldb_private::BreakpointResolver::OptionNames::RegexString
@ RegexString
lldb_private::Module::LookupInfo::SetLookupName
void SetLookupName(ConstString name)
Definition: Module.h:907
lldb_private::GetLogIfAllCategoriesSet
Log * GetLogIfAllCategoriesSet(uint32_t mask)
Definition: Logging.cpp:58
lldb_private::StructuredData::DictionarySP
std::shared_ptr< Dictionary > DictionarySP
Definition: StructuredData.h:67
lldb_private::BreakpointResolverName::m_lookups
std::vector< Module::LookupInfo > m_lookups
Definition: BreakpointResolverName.h:84
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::BreakpointResolver::OptionNames::LanguageName
@ LanguageName
lldb_private::Searcher::eCallbackReturnStop
@ eCallbackReturnStop
Definition: SearchFilter.h:45
lldb_private::BreakpointResolver::AddLocation
lldb::BreakpointLocationSP AddLocation(Address loc_addr, bool *new_location=nullptr)
Definition: BreakpointResolver.cpp:338
lldb_private::CompilerDeclContext
Represents a generic declaration context in a program.
Definition: CompilerDeclContext.h:30
lldb_private::Language::FindPlugin
static Language * FindPlugin(lldb::LanguageType language)
Definition: Language.cpp:53
lldb_private::ModuleFunctionSearchOptions
Options used by Module::FindFunctions.
Definition: Module.h:62
lldb_private::BreakpointResolverName::BreakpointResolverName
BreakpointResolverName(const lldb::BreakpointSP &bkpt, const char *name, lldb::FunctionNameType name_type_mask, lldb::LanguageType language, Breakpoint::MatchType type, lldb::addr_t offset, bool skip_prologue)
lldb::eSearchDepthModule
@ eSearchDepthModule
Definition: lldb-enumerations.h:286
lldb_private::BreakpointResolver
General Outline: The BreakpointResolver is a Searcher.
Definition: BreakpointResolver.h:35
lldb_private::BreakpointResolver::WrapOptionsDict
StructuredData::DictionarySP WrapOptionsDict(StructuredData::DictionarySP options_dict_sp)
Definition: BreakpointResolver.cpp:150
Symbol.h
lldb_private::Language::GetLanguageTypeFromString
static lldb::LanguageType GetLanguageTypeFromString(const char *string)=delete
lldb_private::Target::GetArchitecturePlugin
Architecture * GetArchitecturePlugin() const
Definition: Target.h:998
lldb_private::BreakpointResolver::OptionNames::Offset
@ Offset
lldb_private::Status
Definition: Status.h:44
lldb::eLanguageTypeUnknown
@ eLanguageTypeUnknown
Unknown or invalid language value.
Definition: lldb-enumerations.h:437
uint32_t
LIBLLDB_LOG_BREAKPOINTS
#define LIBLLDB_LOG_BREAKPOINTS
Definition: Logging.h:19
lldb_private::Language
Definition: Language.h:29
lldb_private::Address
Definition: Address.h:59
lldb_private::BreakpointResolver::GetKey
static const char * GetKey(OptionNames enum_value)
Definition: BreakpointResolver.h:193
lldb_private::Function::GetPrologueByteSize
uint32_t GetPrologueByteSize()
Get the size of the prologue instructions for this function.
Definition: Function.cpp:529
lldb_private::BreakpointResolver::OptionNames::SymbolNameArray
@ SymbolNameArray
lldb_private::StructuredData::Array::GetItemAtIndexAsInteger
bool GetItemAtIndexAsInteger(size_t idx, IntType &result) const
Definition: StructuredData.h:196
lldb_private::SymbolContext::module_sp
lldb::ModuleSP module_sp
The Module for a given query.
Definition: SymbolContext.h:318
lldb_private::SearchFilter::CompUnitPasses
virtual bool CompUnitPasses(FileSpec &fileSpec)
Call this method with a FileSpec to see if file spec passes the filter as the name of a compilation u...
Definition: SearchFilter.cpp:143
lldb_private::BreakpointResolverName
Definition: BreakpointResolverName.h:24
lldb_private::Address::SetOffset
bool SetOffset(lldb::addr_t offset)
Set accessor for the offset.
Definition: Address.h:429
Function.h
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb::eSymbolTypeReExported
@ eSymbolTypeReExported
Definition: lldb-enumerations.h:643
SymbolContext.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb::eDescriptionLevelVerbose
@ eDescriptionLevelVerbose
Definition: lldb-enumerations.h:210
BreakpointResolverName.h
lldb_private::SymbolContext::GetLanguage
lldb::LanguageType GetLanguage() const
Definition: SymbolContext.cpp:417
lldb_private::BreakpointResolverName::m_regex
RegularExpression m_regex
Definition: BreakpointResolverName.h:86
lldb_private::BreakpointResolverName::CreateFromStructuredData
static BreakpointResolver * CreateFromStructuredData(const lldb::BreakpointSP &bkpt, const StructuredData::Dictionary &data_dict, Status &error)
Definition: BreakpointResolverName.cpp:91
lldb_private::Language::MethodNameVariant
Definition: Language.h:187
lldb_private::BreakpointResolverName::Dump
void Dump(Stream *s) const override
Standard "Dump" method. At present it does nothing.
Definition: BreakpointResolverName.cpp:426
lldb_private::Breakpoint::GetTarget
Target & GetTarget()
Accessor for the breakpoint Target.
Definition: Breakpoint.h:453
lldb_private::Address::GetOffset
lldb::addr_t GetOffset() const
Get the section relative offset value.
Definition: Address.h:310
lldb_private::Block::GetStartAddress
bool GetStartAddress(Address &addr)
Definition: Block.cpp:306
lldb_private::BreakpointResolverName::CopyForBreakpoint
lldb::BreakpointResolverSP CopyForBreakpoint(lldb::BreakpointSP &breakpoint) override
Definition: BreakpointResolverName.cpp:429
lldb_private::StructuredData::Array::GetItemAtIndexAsString
bool GetItemAtIndexAsString(size_t idx, llvm::StringRef &result) const
Definition: StructuredData.h:216
lldb_private::Log
Definition: Log.h:49
lldb_private::StructuredData::ArraySP
std::shared_ptr< Array > ArraySP
Definition: StructuredData.h:62
lldb_private::Block::GetInlinedFunctionInfo
const InlineFunctionInfo * GetInlinedFunctionInfo() const
Get const accessor for any inlined function information.
Definition: Block.h:276
lldb_private::StructuredData::Dictionary::GetValueForKeyAsString
bool GetValueForKeyAsString(llvm::StringRef key, llvm::StringRef &result) const
Definition: StructuredData.h:423
lldb_private::StructuredData::Dictionary::GetValueForKeyAsArray
bool GetValueForKeyAsArray(llvm::StringRef key, Array *&result) const
Definition: StructuredData.h:478
lldb_private::BreakpointResolverFileRegex::m_regex
RegularExpression m_regex
Definition: BreakpointResolverFileRegex.h:65
lldb_private::Language::ForEach
static void ForEach(std::function< bool(Language *)> callback)
Definition: Language.cpp:100
lldb_private::StructuredData::Array::GetSize
size_t GetSize() const
Definition: StructuredData.h:180
lldb_private::RegularExpression::GetText
llvm::StringRef GetText() const
Access the regular expression text.
Definition: RegularExpression.cpp:33
lldb_private::Language::GetNameForLanguageType
static const char * GetNameForLanguageType(lldb::LanguageType language)
Definition: Language.cpp:217
lldb_private::BreakpointResolverName::m_skip_prologue
bool m_skip_prologue
Definition: BreakpointResolverName.h:89
lldb_private::StructuredData::Dictionary::GetValueForKeyAsBoolean
bool GetValueForKeyAsBoolean(llvm::StringRef key, bool &result) const
Definition: StructuredData.h:390
lldb_private::Symbol::GetType
lldb::SymbolType GetType() const
Definition: Symbol.h:143
lldb_private::StructuredData::IntegerSP
std::shared_ptr< Integer > IntegerSP
Definition: StructuredData.h:63
lldb
Definition: SBAddress.h:15
lldb_private::BreakpointResolver::GetBreakpoint
lldb::BreakpointSP GetBreakpoint() const
This gets the breakpoint for this resolver.
Definition: BreakpointResolver.h:62
lldb_private::Symbol::ResolveReExportedSymbol
Symbol * ResolveReExportedSymbol(Target &target) const
Definition: Symbol.cpp:472
lldb_private::Breakpoint
General Outline: A breakpoint has four main parts, a filter, a resolver, the list of breakpoint locat...
Definition: Breakpoint.h:79
lldb_private::Breakpoint::Regexp
@ Regexp
Definition: Breakpoint.h:86
lldb_private::SymbolContextList::RemoveContextAtIndex
bool RemoveContextAtIndex(size_t idx)
Definition: SymbolContext.cpp:1270
lldb_private::Searcher::eCallbackReturnContinue
@ eCallbackReturnContinue
Definition: SearchFilter.h:46
lldb_private::Symbol::GetAddress
Address GetAddress() const
Definition: Symbol.h:73
lldb_private::Language::GetPrimaryLanguage
static lldb::LanguageType GetPrimaryLanguage(lldb::LanguageType language)
Definition: Language.cpp:301