[Lldb-commits] [lldb] r141625 - in /lldb/trunk: include/lldb/API/SBTarget.h scripts/Python/interface/SBTarget.i source/API/SBTarget.cpp

Jim Ingham jingham at apple.com
Mon Oct 10 18:18:55 PDT 2011


Author: jingham
Date: Mon Oct 10 20:18:55 2011
New Revision: 141625

URL: http://llvm.org/viewvc/llvm-project?rev=141625&view=rev
Log:
Add a SBTarget::BreakpointCreateByName API that allows you to specify the name
type mask.

Modified:
    lldb/trunk/include/lldb/API/SBTarget.h
    lldb/trunk/scripts/Python/interface/SBTarget.i
    lldb/trunk/source/API/SBTarget.cpp

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=141625&r1=141624&r2=141625&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Mon Oct 10 20:18:55 2011
@@ -397,12 +397,19 @@
     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);
     
     lldb::SBBreakpoint

Modified: lldb/trunk/scripts/Python/interface/SBTarget.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBTarget.i?rev=141625&r1=141624&r2=141625&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBTarget.i (original)
+++ lldb/trunk/scripts/Python/interface/SBTarget.i Mon Oct 10 20:18:55 2011
@@ -406,6 +406,12 @@
     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);
 
     lldb::SBBreakpoint

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=141625&r1=141624&r2=141625&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Mon Oct 10 20:18:55 2011
@@ -610,6 +610,16 @@
                             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));
 
     SBBreakpoint sb_bp;
@@ -619,14 +629,14 @@
         *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;





More information about the lldb-commits mailing list