From 44d937820b451296f80449ac3de296345e80f183 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Mon, 27 Jan 2014 23:43:24 +0000 Subject: Merging the iohandler branch back into main. The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263 --- .../Python/interface/SBCommandInterpreter.i | 7 +++ lldb/scripts/Python/interface/SBDebugger.i | 15 ++---- lldb/scripts/Python/interface/SBInputReader.i | 53 ---------------------- 3 files changed, 12 insertions(+), 63 deletions(-) delete mode 100644 lldb/scripts/Python/interface/SBInputReader.i (limited to 'lldb/scripts/Python/interface') diff --git a/lldb/scripts/Python/interface/SBCommandInterpreter.i b/lldb/scripts/Python/interface/SBCommandInterpreter.i index 4cf3d22f5d0..9dc842e87c2 100644 --- a/lldb/scripts/Python/interface/SBCommandInterpreter.i +++ b/lldb/scripts/Python/interface/SBCommandInterpreter.i @@ -78,6 +78,9 @@ public: bool IsValid() const; + const char * + GetIOHandlerControlSequence(char ch); + bool CommandExists (const char *cmd); @@ -120,6 +123,10 @@ public: int match_start_point, int max_return_elements, lldb::SBStringList &matches); + + bool + IsActive (); + }; } // namespace lldb diff --git a/lldb/scripts/Python/interface/SBDebugger.i b/lldb/scripts/Python/interface/SBDebugger.i index 6d075ace791..ba1c18914e3 100644 --- a/lldb/scripts/Python/interface/SBDebugger.i +++ b/lldb/scripts/Python/interface/SBDebugger.i @@ -292,15 +292,6 @@ public: void DispatchInputEndOfFile (); - void - PushInputReader (lldb::SBInputReader &reader); - - void - NotifyTopInputReader (lldb::InputReaderAction notification); - - bool - InputReaderIsTopReader (const lldb::SBInputReader &reader); - const char * GetInstanceName (); @@ -372,7 +363,11 @@ public: lldb::SBTypeSynthetic GetSyntheticForType (lldb::SBTypeNameSpecifier); - + + void + RunCommandInterpreter (bool auto_handle_events, + bool spawn_thread); + }; // class SBDebugger } // namespace lldb diff --git a/lldb/scripts/Python/interface/SBInputReader.i b/lldb/scripts/Python/interface/SBInputReader.i deleted file mode 100644 index 93986242357..00000000000 --- a/lldb/scripts/Python/interface/SBInputReader.i +++ /dev/null @@ -1,53 +0,0 @@ -//===-- SWIG Interface for SBInputREader ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -namespace lldb { - -class SBInputReader -{ -public: - - typedef size_t (*Callback) (void *baton, - SBInputReader *reader, - InputReaderAction notification, - const char *bytes, - size_t bytes_len); - - SBInputReader (); - - SBInputReader (const lldb::SBInputReader &rhs); - - ~SBInputReader (); - - SBError - Initialize (SBDebugger &debugger, - Callback callback, - void *callback_baton, - lldb::InputReaderGranularity granularity, - const char *end_token, - const char *prompt, - bool echo); - - bool - IsValid () const; - - bool - IsActive () const; - - bool - IsDone () const; - - void - SetIsDone (bool value); - - InputReaderGranularity - GetGranularity (); -}; - -} // namespace lldb -- cgit v1.2.3