Skip to content

Commit 2407284

Browse files
committed
Basic doc comments for GDBHostCommand
# Conflicts: # Sources/GDBRemoteProtocol/GDBHostCommand.swift
1 parent d100d1e commit 2407284

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Sources/GDBRemoteProtocol/GDBHostCommand.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2025 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
/// A command sent from a debugger host (GDB or LLDB) to a debugger target (a device
14+
/// or a virtual machine being debugged).
115
/// See GDB and LLDB remote protocol documentation for more details:
216
/// * https://sourceware.org/gdb/current/onlinedocs/gdb.html/General-Query-Packets.html
317
/// * https://lldb.llvm.org/resources/lldbgdbremote.html
@@ -31,6 +45,7 @@ package struct GDBHostCommand: Equatable {
3145

3246
case generalRegisters
3347

48+
/// Decodes kind of a command from a raw string sent from a host.
3449
package init?(rawValue: String) {
3550
switch rawValue {
3651
case "g":
@@ -74,8 +89,10 @@ package struct GDBHostCommand: Equatable {
7489
}
7590
}
7691

92+
/// The kind of a host command for the target to act upon.
7793
package let kind: Kind
7894

95+
/// Arguments supplied with a host command.
7996
package let arguments: String
8097

8198
package init(kindString: String, arguments: String) throws {
@@ -106,6 +123,7 @@ package struct GDBHostCommand: Equatable {
106123
self.arguments = arguments
107124
}
108125

126+
/// Memberwise initializer of `GDBHostCommand` type.
109127
package init(kind: Kind, arguments: String) {
110128
self.kind = kind
111129
self.arguments = arguments

0 commit comments

Comments
 (0)