forked from OSchip/llvm-project
[lldb][NFC] Move Curses interface implementation to own file
Summary: The IOHandler class source file is currently around 4600 LOC. However only 200 of these lines are concerned with the actual IOHandler class and the rest are the implementations for Editline, IOHandlerConfirm and the Curses interface. All these large features also cause that the IOHandler (which is in Core) has a large set of dependencies on other parts of LLDB. This patch splits out the code for the curses interface into its own file. This way the simple IOHandler code is no longer buried in-between much larger functionalities. Next up is splitting out the other IOHandlers into their own files and then move them to more appropriate parts of LLDB. Reviewers: labath, clayborg, JDevlieghere Reviewed By: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70946
This commit is contained in:
parent
6e51ceba53
commit
7caa17caf8
|
@ -456,43 +456,6 @@ protected:
|
|||
bool m_user_response;
|
||||
};
|
||||
|
||||
class IOHandlerCursesGUI : public IOHandler {
|
||||
public:
|
||||
IOHandlerCursesGUI(Debugger &debugger);
|
||||
|
||||
~IOHandlerCursesGUI() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
void Cancel() override;
|
||||
|
||||
bool Interrupt() override;
|
||||
|
||||
void GotEOF() override;
|
||||
|
||||
void Activate() override;
|
||||
|
||||
void Deactivate() override;
|
||||
|
||||
protected:
|
||||
curses::ApplicationAP m_app_ap;
|
||||
};
|
||||
|
||||
class IOHandlerCursesValueObjectList : public IOHandler {
|
||||
public:
|
||||
IOHandlerCursesValueObjectList(Debugger &debugger,
|
||||
ValueObjectList &valobj_list);
|
||||
|
||||
~IOHandlerCursesValueObjectList() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
void GotEOF() override;
|
||||
|
||||
protected:
|
||||
ValueObjectList m_valobj_list;
|
||||
};
|
||||
|
||||
class IOHandlerStack {
|
||||
public:
|
||||
IOHandlerStack() = default;
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
//===-- IOHandlerCursesGUI.h ------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef liblldb_IOHandlerCursesGUI_h_
|
||||
#define liblldb_IOHandlerCursesGUI_h_
|
||||
|
||||
#include "lldb/Core/IOHandler.h"
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
class IOHandlerCursesGUI : public IOHandler {
|
||||
public:
|
||||
IOHandlerCursesGUI(Debugger &debugger);
|
||||
|
||||
~IOHandlerCursesGUI() override;
|
||||
|
||||
void Run() override;
|
||||
|
||||
void Cancel() override;
|
||||
|
||||
bool Interrupt() override;
|
||||
|
||||
void GotEOF() override;
|
||||
|
||||
void Activate() override;
|
||||
|
||||
void Deactivate() override;
|
||||
|
||||
protected:
|
||||
curses::ApplicationAP m_app_ap;
|
||||
};
|
||||
|
||||
}; // namespace lldb_private
|
||||
|
||||
#endif // liblldb_IOHandlerCursesGUI_h_
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "CommandObjectGUI.h"
|
||||
|
||||
#include "lldb/Core/IOHandlerCursesGUI.h"
|
||||
#include "lldb/Interpreter/CommandInterpreter.h"
|
||||
#include "lldb/Interpreter/CommandReturnObject.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
|
|
|
@ -37,6 +37,7 @@ add_lldb_library(lldbCore
|
|||
FormatEntity.cpp
|
||||
Highlighter.cpp
|
||||
IOHandler.cpp
|
||||
IOHandlerCursesGUI.cpp
|
||||
Mangled.cpp
|
||||
Module.cpp
|
||||
ModuleChild.cpp
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue