diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-08-16 23:24:13 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-08-16 23:24:13 +0000 |
commit | 223383ed6c77205c84e2061881206e5379f6442f (patch) | |
tree | 74d512533e99cacb0400131ee005754e5bbd6f8e /lldb/source/API/SBCommandReturnObject.cpp | |
parent | 556e653b6ad9ba2bb6593cf8ba5857ec1384331a (diff) | |
download | bcm5719-llvm-223383ed6c77205c84e2061881206e5379f6442f.tar.gz bcm5719-llvm-223383ed6c77205c84e2061881206e5379f6442f.zip |
Changes to Python commands:
- They now have an SBCommandReturnObject instead of an SBStream as third argument
- The class CommandObjectPythonFunction has been merged into CommandObjectCommands.cpp
- The command to manage them is now:
command script with subcommands add, list, delete, clear
command alias is returned to its previous functionality
- Python commands are now part of an user dictionary, instead of being seen as aliases
llvm-svn: 137785
Diffstat (limited to 'lldb/source/API/SBCommandReturnObject.cpp')
-rw-r--r-- | lldb/source/API/SBCommandReturnObject.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp index 8377c1fc3a1..8550b5d45c6 100644 --- a/lldb/source/API/SBCommandReturnObject.cpp +++ b/lldb/source/API/SBCommandReturnObject.cpp @@ -248,3 +248,27 @@ SBCommandReturnObject::SetImmediateErrorFile (FILE *fh) if (m_opaque_ap.get()) m_opaque_ap->SetImmediateErrorFile (fh); } + +void +SBCommandReturnObject::PutCString(const char* string, int len) +{ + if (m_opaque_ap.get()) + { + m_opaque_ap->AppendMessage(string, len); + } +} + +size_t +SBCommandReturnObject::Printf(const char* format, ...) +{ + if (m_opaque_ap.get()) + { + va_list args; + va_start (args, format); + size_t result = m_opaque_ap->GetOutputStream().PrintfVarArg(format, args); + va_end (args); + return result; + } + return 0; +} + |