LLDB  mainline
CommandObjectTrace.h
Go to the documentation of this file.
1 //===-- CommandObjectTrace.h ------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_COMMANDS_COMMANDOBJECTTRACE_H
10 #define LLDB_SOURCE_COMMANDS_COMMANDOBJECTTRACE_H
11 
13 
14 namespace lldb_private {
15 
17 public:
19 
20  ~CommandObjectTrace() override;
21 };
22 
23 /// This class works by delegating the logic to the actual trace plug-in that
24 /// can support the current process.
26 public:
27  CommandObjectTraceProxy(bool live_debug_session_only,
28  CommandInterpreter &interpreter, const char *name,
29  const char *help = nullptr,
30  const char *syntax = nullptr, uint32_t flags = 0)
31  : CommandObjectProxy(interpreter, name, help, syntax, flags),
32  m_live_debug_session_only(live_debug_session_only) {}
33 
34 protected:
35  virtual lldb::CommandObjectSP GetDelegateCommand(Trace &trace) = 0;
36 
37  llvm::Expected<lldb::CommandObjectSP> DoGetProxyCommandObject();
38 
40 
41 private:
42  llvm::StringRef GetUnsupportedError() override { return m_delegate_error; }
43 
45  lldb::CommandObjectSP m_delegate_sp;
47 };
48 
49 } // namespace lldb_private
50 
51 #endif // LLDB_SOURCE_COMMANDS_COMMANDOBJECTTRACE_H
lldb_private::CommandObjectTraceProxy::DoGetProxyCommandObject
llvm::Expected< lldb::CommandObjectSP > DoGetProxyCommandObject()
Definition: CommandObjectTrace.cpp:309
lldb_private::CommandObjectTrace
Definition: CommandObjectTrace.h:16
lldb_private::CommandObjectTraceProxy::GetUnsupportedError
llvm::StringRef GetUnsupportedError() override
Definition: CommandObjectTrace.h:42
lldb_private::CommandObjectTraceProxy
This class works by delegating the logic to the actual trace plug-in that can support the current pro...
Definition: CommandObjectTrace.h:25
lldb_private::Trace
Definition: Trace.h:44
lldb_private::CommandObjectMultiword
Definition: CommandObjectMultiword.h:19
lldb_private::CommandObjectTrace::CommandObjectTrace
CommandObjectTrace(CommandInterpreter &interpreter)
Definition: CommandObjectTrace.cpp:294
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:221
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:38
lldb_private::CommandObject
Definition: CommandObject.h:67
lldb_private::CommandObjectTraceProxy::m_live_debug_session_only
bool m_live_debug_session_only
Definition: CommandObjectTrace.h:44
lldb_private::CommandObjectTrace::~CommandObjectTrace
~CommandObjectTrace() override
lldb_private::CommandObjectProxy
Definition: CommandObjectMultiword.h:73
lldb_private::CommandObjectTraceProxy::GetDelegateCommand
virtual lldb::CommandObjectSP GetDelegateCommand(Trace &trace)=0
uint32_t
lldb_private::CommandObjectTraceProxy::m_delegate_sp
lldb::CommandObjectSP m_delegate_sp
Definition: CommandObjectTrace.h:45
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
CommandObjectThreadUtil.h
lldb_private::CommandObjectTraceProxy::CommandObjectTraceProxy
CommandObjectTraceProxy(bool live_debug_session_only, CommandInterpreter &interpreter, const char *name, const char *help=nullptr, const char *syntax=nullptr, uint32_t flags=0)
Definition: CommandObjectTrace.h:27
lldb_private::CommandObjectTraceProxy::GetProxyCommandObject
CommandObject * GetProxyCommandObject() override
Definition: CommandObjectTrace.cpp:327
lldb_private::CommandObjectTraceProxy::m_delegate_error
std::string m_delegate_error
Definition: CommandObjectTrace.h:46