Skip to content

Commit 2fd860c

Browse files
committed
[lldb] ProcessGdbRemote header gardning
Remove unused headers, add used headers, remove declared-but-not-defined entities.
1 parent e36e57b commit 2fd860c

File tree

4 files changed

+19
-29
lines changed

4 files changed

+19
-29
lines changed

lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@
1010
#define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECLIENTBASE_H
1111

1212
#include "GDBRemoteCommunication.h"
13-
13+
#include "lldb/Utility/Broadcaster.h"
14+
#include "llvm/ADT/STLFunctionalExtras.h"
15+
#include "llvm/ADT/StringRef.h"
16+
#include <chrono>
1417
#include <condition_variable>
18+
#include <cstdint>
19+
#include <mutex>
1520

1621
namespace lldb_private {
1722
namespace process_gdb_remote {

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "GDBRemoteCommunication.h"
10-
11-
#include <climits>
12-
#include <cstring>
13-
#include <future>
14-
#include <sys/stat.h>
15-
16-
#include "lldb/Host/Config.h"
17-
#include "lldb/Host/ConnectionFileDescriptor.h"
10+
#include "ProcessGDBRemoteLog.h"
1811
#include "lldb/Host/FileSystem.h"
1912
#include "lldb/Host/Host.h"
2013
#include "lldb/Host/HostInfo.h"
@@ -30,13 +23,14 @@
3023
#include "lldb/Utility/Log.h"
3124
#include "lldb/Utility/RegularExpression.h"
3225
#include "lldb/Utility/StreamString.h"
33-
#include "llvm/ADT/ArrayRef.h"
3426
#include "llvm/ADT/SmallString.h"
3527
#include "llvm/ADT/StringRef.h"
3628
#include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_ZLIB
3729
#include "llvm/Support/ScopedPrinter.h"
38-
39-
#include "ProcessGDBRemoteLog.h"
30+
#include <climits>
31+
#include <cstring>
32+
#include <future>
33+
#include <sys/stat.h>
4034

4135
#if defined(__APPLE__)
4236
#define DEBUGSERVER_BASENAME "debugserver"

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,16 @@
1111

1212
#include "GDBRemoteCommunicationHistory.h"
1313

14-
#include <condition_variable>
1514
#include <future>
1615
#include <mutex>
17-
#include <queue>
1816
#include <string>
19-
#include <vector>
20-
2117
#include "lldb/Core/Communication.h"
22-
#include "lldb/Host/Config.h"
2318
#include "lldb/Host/HostThread.h"
2419
#include "lldb/Host/Socket.h"
2520
#include "lldb/Utility/Args.h"
26-
#include "lldb/Utility/Listener.h"
27-
#include "lldb/Utility/Predicate.h"
2821
#include "lldb/Utility/StringExtractorGDBRemote.h"
29-
#include "lldb/lldb-public.h"
3022

3123
namespace lldb_private {
32-
namespace repro {
33-
class PacketRecorder;
34-
}
3524
namespace process_gdb_remote {
3625

3726
enum GDBStoppointType {
@@ -162,8 +151,6 @@ class GDBRemoteCommunication : public Communication {
162151

163152
void DumpHistory(Stream &strm);
164153

165-
void SetPacketRecorder(repro::PacketRecorder *recorder);
166-
167154
static llvm::Error ConnectLocally(GDBRemoteCommunication &client,
168155
GDBRemoteCommunication &server);
169156

lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
#include <future>
98

9+
#include "Plugins/Process/gdb-remote/GDBRemoteClientBase.h"
1010
#include "GDBRemoteTestUtils.h"
11-
1211
#include "Plugins/Process/Utility/LinuxSignals.h"
13-
#include "Plugins/Process/gdb-remote/GDBRemoteClientBase.h"
1412
#include "Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h"
1513
#include "lldb/Utility/GDBRemote.h"
16-
#include "llvm/ADT/STLExtras.h"
14+
#include "lldb/Utility/Listener.h"
15+
#include "llvm/ADT/StringRef.h"
1716
#include "llvm/Testing/Support/Error.h"
17+
#include "gtest/gtest.h"
18+
#include <chrono>
19+
#include <future>
20+
#include <string>
21+
#include <vector>
1822

1923
using namespace lldb_private::process_gdb_remote;
2024
using namespace lldb_private;

0 commit comments

Comments
 (0)