summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/InputReaderEZ.cpp
diff options
context:
space:
mode:
authorEnrico Granata <granata.enrico@gmail.com>2011-07-25 16:59:05 +0000
committerEnrico Granata <granata.enrico@gmail.com>2011-07-25 16:59:05 +0000
commitc53114e30aa428ff2fcfd48927ef05b3d250a371 (patch)
tree5c42691b0243ffe52882e00b4e8d4ea3c8aebd79 /lldb/source/Core/InputReaderEZ.cpp
parent6d28d7f2a3079745a79fb95210e641ca844a902a (diff)
downloadbcm5719-llvm-c53114e30aa428ff2fcfd48927ef05b3d250a371.tar.gz
bcm5719-llvm-c53114e30aa428ff2fcfd48927ef05b3d250a371.zip
new flag -P to type synth add lets you type a Python class interactively
added a final newline to fooSynthProvider.py new option to automatically save user input in InputReaderEZ checking for NULL pointers in several new places llvm-svn: 135916
Diffstat (limited to 'lldb/source/Core/InputReaderEZ.cpp')
-rw-r--r--lldb/source/Core/InputReaderEZ.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/lldb/source/Core/InputReaderEZ.cpp b/lldb/source/Core/InputReaderEZ.cpp
index 295bfb82b31..c8362fbb8f5 100644
--- a/lldb/source/Core/InputReaderEZ.cpp
+++ b/lldb/source/Core/InputReaderEZ.cpp
@@ -45,7 +45,11 @@ InputReaderEZ::Callback_Impl(void *baton,
reader.AsynchronousOutputWrittenHandler(hand_data);
break;
case eInputReaderGotToken:
+ {
+ if (reader.GetSaveUserInput())
+ reader.GetUserInput().AppendString(bytes, bytes_len);
reader.GotTokenHandler(hand_data);
+ }
break;
case eInputReaderInterrupt:
reader.InterruptHandler(hand_data);
@@ -78,11 +82,13 @@ InputReaderEZ::Initialize(void* baton,
Error
InputReaderEZ::Initialize(InitializationParameters& params)
{
- return Initialize(params.m_baton,
- params.m_token_size,
- params.m_end_token,
- params.m_prompt,
- params.m_echo);
+ Error ret = Initialize(params.m_baton,
+ params.m_token_size,
+ params.m_end_token,
+ params.m_prompt,
+ params.m_echo);
+ m_save_user_input = params.m_save_user_input;
+ return ret;
}
InputReaderEZ::~InputReaderEZ ()
OpenPOWER on IntegriCloud