From b49b7b53b1b1f1350b6da0835505985c44af68d7 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Sat, 1 Oct 2011 01:19:45 +0000 Subject: Add SBFrame.WatchLocation() to find and watch the location pointed to by a variable usng the frame as the scope. Add TestSetWatchpoint.py to exercise this API. Also fix some SWIG Python docstrings. llvm-svn: 140914 --- lldb/scripts/Python/interface/SBFrame.i | 12 +++++++++++- lldb/scripts/Python/interface/SBModule.i | 2 +- lldb/scripts/Python/interface/SBType.i | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'lldb/scripts/Python/interface') diff --git a/lldb/scripts/Python/interface/SBFrame.i b/lldb/scripts/Python/interface/SBFrame.i index 19bccc7a032..40d65725405 100644 --- a/lldb/scripts/Python/interface/SBFrame.i +++ b/lldb/scripts/Python/interface/SBFrame.i @@ -220,10 +220,20 @@ public: /// It returns an SBValue, similar to FindValue() method, if find-and-watch /// operation succeeds. Otherwise, an invalid SBValue is returned. /// You can use LLDB_WATCH_TYPE_READ | LLDB_WATCH_TYPE_WRITE for 'rw' watch. - ") FindValue; + ") WatchValue; lldb::SBValue WatchValue (const char *name, ValueType value_type, uint32_t watch_type); + %feature("docstring", " + /// Find and watch the location pointed to by a variable using the frame as + /// the scope. + /// It returns an SBValue, similar to FindValue() method, if find-and-watch + /// operation succeeds. Otherwise, an invalid SBValue is returned. + /// You can use LLDB_WATCH_TYPE_READ | LLDB_WATCH_TYPE_WRITE for 'rw' watch. + ") WatchLocation; + lldb::SBValue + WatchLocation (const char *name, ValueType value_type, uint32_t watch_type, size_t size); + bool GetDescription (lldb::SBStream &description); diff --git a/lldb/scripts/Python/interface/SBModule.i b/lldb/scripts/Python/interface/SBModule.i index 84470abc233..01bf470f9c8 100644 --- a/lldb/scripts/Python/interface/SBModule.i +++ b/lldb/scripts/Python/interface/SBModule.i @@ -48,7 +48,7 @@ And to iterate the symbols within a SBSection, use symbol_in_section_iter(), print INDENT2 + repr(sym) print INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType()) -might produce this following output: +produces this following output: [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870) diff --git a/lldb/scripts/Python/interface/SBType.i b/lldb/scripts/Python/interface/SBType.i index ea20754e8f5..589287a2d38 100644 --- a/lldb/scripts/Python/interface/SBType.i +++ b/lldb/scripts/Python/interface/SBType.i @@ -77,7 +77,7 @@ int main (int argc, char const *argv[]) ++total; t = t->next; } - printf('We have a total number of %d tasks\n', total); + printf('We have a total number of %d tasks\\n', total); // This corresponds to an empty task list. Task *empty_task_head = new Task(-1, NULL); -- cgit v1.2.3