Add a SBTarget::BreakpointCreateByName API that allows you to specify the name

type mask.

llvm-svn: 141625
This commit is contained in:
Jim Ingham 2011-10-11 01:18:55 +00:00
parent ea8005a786
commit 2dd7f7fb71
3 changed files with 26 additions and 3 deletions

View File

@ -397,11 +397,18 @@ public:
lldb::SBBreakpoint
BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);
// This version uses name_type_mask = eFunctionNameTypeAuto
lldb::SBBreakpoint
BreakpointCreateByName (const char *symbol_name,
const SBFileSpecList &module_list,
const SBFileSpecList &comp_unit_list);
lldb::SBBreakpoint
BreakpointCreateByName (const char *symbol_name,
uint32_t name_type_mask, // Logical OR one or more FunctionNameType enum bits
const SBFileSpecList &module_list,
const SBFileSpecList &comp_unit_list);
lldb::SBBreakpoint
BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL);

View File

@ -405,6 +405,12 @@ public:
lldb::SBBreakpoint
BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);
lldb::SBBreakpoint
BreakpointCreateByName (const char *symbol_name,
uint32_t func_name_type, // Logical OR one or more FunctionNameType enum bits
const SBFileSpecList &module_list,
const SBFileSpecList &comp_unit_list);
lldb::SBBreakpoint
BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL);

View File

@ -609,6 +609,16 @@ lldb::SBBreakpoint
SBTarget::BreakpointCreateByName (const char *symbol_name,
const SBFileSpecList &module_list,
const SBFileSpecList &comp_unit_list)
{
uint32_t name_type_mask = eFunctionNameTypeAuto;
return BreakpointCreateByName (symbol_name, name_type_mask, module_list, comp_unit_list);
}
lldb::SBBreakpoint
SBTarget::BreakpointCreateByName (const char *symbol_name,
uint32_t name_type_mask,
const SBFileSpecList &module_list,
const SBFileSpecList &comp_unit_list)
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
@ -619,14 +629,14 @@ SBTarget::BreakpointCreateByName (const char *symbol_name,
*sb_bp = m_opaque_sp->CreateBreakpoint (module_list.get(),
comp_unit_list.get(),
symbol_name,
eFunctionNameTypeFull | eFunctionNameTypeBase,
name_type_mask,
false);
}
if (log)
{
log->Printf ("SBTarget(%p)::BreakpointCreateByName (symbol=\"%s\") => SBBreakpoint(%p)",
m_opaque_sp.get(), symbol_name, sb_bp.get());
log->Printf ("SBTarget(%p)::BreakpointCreateByName (symbol=\"%s\", name_type: %d) => SBBreakpoint(%p)",
m_opaque_sp.get(), symbol_name, name_type_mask, sb_bp.get());
}
return sb_bp;