From 969795f14bed2c9af7167d0d07b234193c82034c Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Wed, 21 Sep 2011 01:17:13 +0000 Subject: Add a new breakpoint type "break by source regular expression". Fix the RegularExpression class so it has a real copy constructor. Fix the breakpoint setting with multiple shared libraries so it makes one breakpoint not one per shared library. Add SBFileSpecList, to be used to expose the above to the SB interface (not done yet.) llvm-svn: 140225 --- .../Python/interface/SBCommandInterpreter.i | 3 +- lldb/scripts/Python/interface/SBFileSpecList.i | 45 ++++++++++++++++++++++ lldb/scripts/Python/interface/SBTarget.i | 3 ++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 lldb/scripts/Python/interface/SBFileSpecList.i (limited to 'lldb/scripts/Python') diff --git a/lldb/scripts/Python/interface/SBCommandInterpreter.i b/lldb/scripts/Python/interface/SBCommandInterpreter.i index 81e515830ec..6a5ee2466b0 100644 --- a/lldb/scripts/Python/interface/SBCommandInterpreter.i +++ b/lldb/scripts/Python/interface/SBCommandInterpreter.i @@ -116,8 +116,7 @@ public: int HandleCompletion (const char *current_line, - const char *cursor, - const char *last_char, + uint32_t cursor_pos, int match_start_point, int max_return_elements, lldb::SBStringList &matches); diff --git a/lldb/scripts/Python/interface/SBFileSpecList.i b/lldb/scripts/Python/interface/SBFileSpecList.i new file mode 100644 index 00000000000..5ad4742d687 --- /dev/null +++ b/lldb/scripts/Python/interface/SBFileSpecList.i @@ -0,0 +1,45 @@ +//===-- SWIG Interface for SBFileSpecList -----------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +namespace lldb { + +class SBFileSpecList +{ +public: + SBFileSpecList (); + + SBFileSpecList (const lldb::SBFileSpecList &rhs); + + ~SBFileSpecList (); + + uint32_t + GetSize () const; + + bool + GetDescription (SBStream &description) const; + + void + Append (const SBFileSpec &sb_file); + + bool + AppendIfUnique (const SBFileSpec &sb_file); + + void + Clear(); + + uint32_t + FindFileIndex (uint32_t idx, const SBFileSpec &sb_file); + + const SBFileSpec + GetFileSpecAtIndex (uint32_t idx) const; + +}; + + +} // namespace lldb diff --git a/lldb/scripts/Python/interface/SBTarget.i b/lldb/scripts/Python/interface/SBTarget.i index baa151c0101..aafc80bea39 100644 --- a/lldb/scripts/Python/interface/SBTarget.i +++ b/lldb/scripts/Python/interface/SBTarget.i @@ -371,6 +371,9 @@ public: lldb::SBBreakpoint BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL); + lldb::SBBreakpoint + BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpec &source_file, const char *module_name = NULL); + lldb::SBBreakpoint BreakpointCreateByAddress (addr_t address); -- cgit v1.2.3