diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2012-05-23 22:34:34 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2012-05-23 22:34:34 +0000 |
| commit | f9ef60d2369f0798e8b939ce1798a7a4f0234b40 (patch) | |
| tree | e44c2a3fd3b7139748eab88d8480f146a2361883 /lldb/source/API | |
| parent | 5ad41dab52dac54714ca5cefa64595f4edd12048 (diff) | |
| download | bcm5719-llvm-f9ef60d2369f0798e8b939ce1798a7a4f0234b40.tar.gz bcm5719-llvm-f9ef60d2369f0798e8b939ce1798a7a4f0234b40.zip | |
Add SBProcess::GetNumSupportedHardwareWatchpoints() API and export it through the Python scripting bridge.
Add/modify some test cases.
llvm-svn: 157353
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBProcess.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp index 813b41c4637..67027a6d9a5 100644 --- a/lldb/source/API/SBProcess.cpp +++ b/lldb/source/API/SBProcess.cpp @@ -1001,6 +1001,29 @@ SBProcess::GetDescription (SBStream &description) } uint32_t +SBProcess::GetNumSupportedHardwareWatchpoints (lldb::SBError &sb_error) const +{ + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + + uint32_t num = 0; + ProcessSP process_sp(GetSP()); + if (process_sp) + { + Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex()); + sb_error.SetError(process_sp->GetWatchpointSupportInfo (num)); + LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + if (log) + log->Printf ("SBProcess(%p)::GetNumSupportedHardwareWatchpoints () => %u", + process_sp.get(), num); + } + else + { + sb_error.SetErrorString ("SBProcess is invalid"); + } + return num; +} + +uint32_t SBProcess::LoadImage (lldb::SBFileSpec &sb_image_spec, lldb::SBError &sb_error) { ProcessSP process_sp(GetSP()); |

