diff options
author | Johnny Chen <johnny.chen@apple.com> | 2010-12-11 01:20:39 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2010-12-11 01:20:39 +0000 |
commit | f6eaba85a8c385795d94cf97e5633d08f2bb04c4 (patch) | |
tree | e71c6a8acf16c1f522366fd1ef237a4d5cfd2831 /lldb/source/API/SBSourceManager.cpp | |
parent | 92da7052617dc26e24da2d2ee1040c348e435f77 (diff) | |
download | bcm5719-llvm-f6eaba85a8c385795d94cf97e5633d08f2bb04c4.tar.gz bcm5719-llvm-f6eaba85a8c385795d94cf97e5633d08f2bb04c4.zip |
Add test_display_source_python() test case to TestSourceManager.py which uses
the lldb PyThon API SBSourceManager to display source files.
To accomodate this, the C++ SBSourceManager API has been changed to take an
lldb::SBStream as the destination for display of source lines. Modify SBStream::ctor()
so that its opaque pointer is initialized with an StreamString instance.
llvm-svn: 121605
Diffstat (limited to 'lldb/source/API/SBSourceManager.cpp')
-rw-r--r-- | lldb/source/API/SBSourceManager.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lldb/source/API/SBSourceManager.cpp b/lldb/source/API/SBSourceManager.cpp index 32f792d8220..0fa98e35dea 100644 --- a/lldb/source/API/SBSourceManager.cpp +++ b/lldb/source/API/SBSourceManager.cpp @@ -9,6 +9,7 @@ #include "lldb/API/SBSourceManager.h" +#include "lldb/API/SBStream.h" #include "lldb/API/SBFileSpec.h" #include "lldb/Core/Stream.h" @@ -49,26 +50,23 @@ SBSourceManager::DisplaySourceLinesWithLineNumbers uint32_t context_before, uint32_t context_after, const char* current_line_cstr, - FILE *f + SBStream &s ) { if (m_opaque_ptr == NULL) return 0; - if (f == NULL) + if (s.m_opaque_ap.get() == NULL) return 0; if (file.IsValid()) { - StreamFile str (f); - - return m_opaque_ptr->DisplaySourceLinesWithLineNumbers (*file, line, context_before, context_after, current_line_cstr, - &str); + s.m_opaque_ap.get()); } return 0; } |