llvm/lldb/include/lldb/Utility/TraceGDBRemotePackets.h

//===-- TraceGDBRemotePackets.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 LLDB_UTILITY_TRACEGDBREMOTEPACKETS_H
#define LLDB_UTILITY_TRACEGDBREMOTEPACKETS_H

#include "llvm/Support/JSON.h"

#include <chrono>

#include "lldb/lldb-defines.h"
#include "lldb/lldb-enumerations.h"

/// See docs/lldb-gdb-remote.txt for more information.
namespace lldb_private {

/// jLLDBTraceSupported gdb-remote packet
/// \{
struct TraceSupportedResponse {};

bool fromJSON(const llvm::json::Value &value, TraceSupportedResponse &info,
              llvm::json::Path path);

llvm::json::Value toJSON(const TraceSupportedResponse &packet);
/// \}

/// jLLDBTraceStart gdb-remote packet
/// \{
struct TraceStartRequest {};

bool fromJSON(const llvm::json::Value &value, TraceStartRequest &packet,
              llvm::json::Path path);

llvm::json::Value toJSON(const TraceStartRequest &packet);
/// \}

/// jLLDBTraceStop gdb-remote packet
/// \{
struct TraceStopRequest {};

bool fromJSON(const llvm::json::Value &value, TraceStopRequest &packet,
              llvm::json::Path path);

llvm::json::Value toJSON(const TraceStopRequest &packet);
///}

/// jLLDBTraceGetState gdb-remote packet
/// \{
struct TraceGetStateRequest {};

bool fromJSON(const llvm::json::Value &value, TraceGetStateRequest &packet,
              llvm::json::Path path);

llvm::json::Value toJSON(const TraceGetStateRequest &packet);

struct TraceBinaryData {};

bool fromJSON(const llvm::json::Value &value, TraceBinaryData &packet,
              llvm::json::Path path);

llvm::json::Value toJSON(const TraceBinaryData &packet);

struct TraceThreadState {};

bool fromJSON(const llvm::json::Value &value, TraceThreadState &packet,
              llvm::json::Path path);

llvm::json::Value toJSON(const TraceThreadState &packet);

struct TraceCpuState {};

bool fromJSON(const llvm::json::Value &value, TraceCpuState &packet,
              llvm::json::Path path);

llvm::json::Value toJSON(const TraceCpuState &packet);

struct TraceGetStateResponse {};

bool fromJSON(const llvm::json::Value &value, TraceGetStateResponse &packet,
              llvm::json::Path path);

llvm::json::Value toJSON(const TraceGetStateResponse &packet);
/// \}

/// jLLDBTraceGetBinaryData gdb-remote packet
/// \{
struct TraceGetBinaryDataRequest {};

bool fromJSON(const llvm::json::Value &value,
              lldb_private::TraceGetBinaryDataRequest &packet,
              llvm::json::Path path);

llvm::json::Value toJSON(const lldb_private::TraceGetBinaryDataRequest &packet);
/// \}

} // namespace lldb_private

#endif // LLDB_UTILITY_TRACEGDBREMOTEPACKETS_H