llvm/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp

//===-- GDBRemoteCommunicationClientTest.cpp ------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h"
#include "GDBRemoteTestUtils.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Host/XML.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Utility/DataBuffer.h"
#include "lldb/Utility/StructuredData.h"
#include "lldb/lldb-enumerations.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Testing/Support/Error.h"
#include "gmock/gmock.h"
#include <future>
#include <limits>
#include <optional>

usingnamespacelldb_private::process_gdb_remote;
usingnamespacelldb_private;
usingnamespacelldb;
usingnamespacellvm;

namespace {

PacketResult;

struct TestClient : public GDBRemoteCommunicationClient {};

void Handle_QThreadSuffixSupported(MockServer &server, bool supported) {}

void HandlePacket(MockServer &server,
                  const testing::Matcher<const std::string &> &expected,
                  StringRef response) {}

uint8_t all_registers[] =;
std::string all_registers_hex =;
uint8_t one_register[] =;
std::string one_register_hex =;

} // end anonymous namespace

class GDBRemoteCommunicationClientTest : public GDBRemoteTest {};

TEST_F(GDBRemoteCommunicationClientTest, WriteRegister) {}

TEST_F(GDBRemoteCommunicationClientTest, WriteRegisterNoSuffix) {}

TEST_F(GDBRemoteCommunicationClientTest, ReadRegister) {}

TEST_F(GDBRemoteCommunicationClientTest, SaveRestoreRegistersNoSuffix) {}

TEST_F(GDBRemoteCommunicationClientTest, SyncThreadState) {}

TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo) {}

TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfo_UUID20) {}

TEST_F(GDBRemoteCommunicationClientTest, GetModulesInfoInvalidResponse) {}

TEST_F(GDBRemoteCommunicationClientTest, TestPacketSpeedJSON) {}

TEST_F(GDBRemoteCommunicationClientTest, SendSignalsToIgnore) {}

TEST_F(GDBRemoteCommunicationClientTest, GetMemoryRegionInfo) {}

TEST_F(GDBRemoteCommunicationClientTest, GetMemoryRegionInfoInvalidResponse) {}

TEST_F(GDBRemoteCommunicationClientTest, SendTraceSupportedPacket) {}

TEST_F(GDBRemoteCommunicationClientTest, GetQOffsets) {}

static void
check_qmemtags(TestClient &client, MockServer &server, size_t read_len,
               int32_t type, const char *packet, llvm::StringRef response,
               std::optional<std::vector<uint8_t>> expected_tag_data) {}

TEST_F(GDBRemoteCommunicationClientTest, ReadMemoryTags) {}

static void check_Qmemtags(TestClient &client, MockServer &server,
                           lldb::addr_t addr, size_t len, int32_t type,
                           const std::vector<uint8_t> &tags, const char *packet,
                           llvm::StringRef response, bool should_succeed) {}

TEST_F(GDBRemoteCommunicationClientTest, WriteMemoryTags) {}

// Prior to this verison, constructing a std::future for a type without a
// default constructor is not possible.
// https://developercommunity.visualstudio.com/t/c-shared-state-futuresstate-default-constructs-the/60897
#if !defined(_MSC_VER) || _MSC_VER >= 1932
TEST_F(GDBRemoteCommunicationClientTest, CalculateMD5) {}
#endif