LLDB
mainline
llvm-project
lldb
source
Plugins
TraceExporter
ctf
CommandObjectThreadTraceExportCTF.h
Go to the documentation of this file.
1
//===-- CommandObjectThreadTraceExportCTF.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_PLUGINS_TRACE_INTEL_PT_COMMANDOBJECTTHREADTRACEEXPORTCTF_H
10
#define LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_COMMANDOBJECTTHREADTRACEEXPORTCTF_H
11
12
#include "
TraceExporterCTF.h
"
13
#include "
lldb/Interpreter/CommandInterpreter.h
"
14
#include "
lldb/Interpreter/CommandReturnObject.h
"
15
#include <optional>
16
17
namespace
lldb_private
{
18
namespace
ctf {
19
20
class
CommandObjectThreadTraceExportCTF
:
public
CommandObjectParsed
{
21
public
:
22
class
CommandOptions
:
public
Options
{
23
public
:
24
CommandOptions
() :
Options
() {
OptionParsingStarting
(
nullptr
); }
25
26
Status
SetOptionValue
(uint32_t option_idx, llvm::StringRef option_arg,
27
ExecutionContext
*execution_context)
override
;
28
29
void
OptionParsingStarting
(
ExecutionContext
*execution_context)
override
;
30
31
llvm::ArrayRef<OptionDefinition>
GetDefinitions
()
override
;
32
33
std::optional<size_t>
m_thread_index
;
34
std::string
m_file
;
35
};
36
37
CommandObjectThreadTraceExportCTF
(
CommandInterpreter
&interpreter)
38
:
CommandObjectParsed
(
39
interpreter,
"thread trace export ctf"
,
40
"Export a given thread's trace to Chrome Trace Format"
,
41
"thread trace export ctf [<ctf-options>]"
,
42
lldb
::eCommandRequiresProcess |
lldb
::eCommandTryTargetAPILock |
43
lldb
::eCommandProcessMustBeLaunched |
44
lldb
::eCommandProcessMustBePaused |
45
lldb
::eCommandProcessMustBeTraced),
46
m_options
() {}
47
48
Options
*
GetOptions
()
override
{
return
&
m_options
; }
49
50
protected
:
51
void
DoExecute
(
Args
&command,
CommandReturnObject
&result)
override
;
52
53
CommandOptions
m_options
;
54
};
55
56
}
// namespace ctf
57
}
// namespace lldb_private
58
59
#endif
// LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_COMMANDOBJECTTHREADTRACEEXPORTCTF_H
CommandInterpreter.h
CommandReturnObject.h
TraceExporterCTF.h
lldb_private::Args
A command line argument class.
Definition:
Args.h:33
lldb_private::CommandInterpreter
Definition:
CommandInterpreter.h:231
lldb_private::CommandObjectParsed
Definition:
CommandObject.h:415
lldb_private::CommandReturnObject
Definition:
CommandReturnObject.h:26
lldb_private::ExecutionContext
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Definition:
ExecutionContext.h:292
lldb_private::Options
A command line option parsing protocol class.
Definition:
Options.h:58
lldb_private::Status
An error handling class.
Definition:
Status.h:44
lldb_private::ctf::CommandObjectThreadTraceExportCTF::CommandOptions
Definition:
CommandObjectThreadTraceExportCTF.h:22
lldb_private::ctf::CommandObjectThreadTraceExportCTF::CommandOptions::m_file
std::string m_file
Definition:
CommandObjectThreadTraceExportCTF.h:34
lldb_private::ctf::CommandObjectThreadTraceExportCTF::CommandOptions::SetOptionValue
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
Definition:
CommandObjectThreadTraceExportCTF.cpp:27
lldb_private::ctf::CommandObjectThreadTraceExportCTF::CommandOptions::OptionParsingStarting
void OptionParsingStarting(ExecutionContext *execution_context) override
Definition:
CommandObjectThreadTraceExportCTF.cpp:54
lldb_private::ctf::CommandObjectThreadTraceExportCTF::CommandOptions::m_thread_index
std::optional< size_t > m_thread_index
Definition:
CommandObjectThreadTraceExportCTF.h:33
lldb_private::ctf::CommandObjectThreadTraceExportCTF::CommandOptions::CommandOptions
CommandOptions()
Definition:
CommandObjectThreadTraceExportCTF.h:24
lldb_private::ctf::CommandObjectThreadTraceExportCTF::CommandOptions::GetDefinitions
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Definition:
CommandObjectThreadTraceExportCTF.cpp:61
lldb_private::ctf::CommandObjectThreadTraceExportCTF
Definition:
CommandObjectThreadTraceExportCTF.h:20
lldb_private::ctf::CommandObjectThreadTraceExportCTF::CommandObjectThreadTraceExportCTF
CommandObjectThreadTraceExportCTF(CommandInterpreter &interpreter)
Definition:
CommandObjectThreadTraceExportCTF.h:37
lldb_private::ctf::CommandObjectThreadTraceExportCTF::DoExecute
void DoExecute(Args &command, CommandReturnObject &result) override
Definition:
CommandObjectThreadTraceExportCTF.cpp:65
lldb_private::ctf::CommandObjectThreadTraceExportCTF::m_options
CommandOptions m_options
Definition:
CommandObjectThreadTraceExportCTF.h:53
lldb_private::ctf::CommandObjectThreadTraceExportCTF::GetOptions
Options * GetOptions() override
Definition:
CommandObjectThreadTraceExportCTF.h:48
lldb_private
A class that represents a running process on the host machine.
Definition:
SBAddressRange.h:14
lldb
Definition:
SBAddress.h:15
Generated on Sat Dec 7 2024 13:12:13 for LLDB by
1.9.6