diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 12d824dd3..15824bbca 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -42,9 +42,6 @@ jobs:
- name: Build (default features + tdx)
run: cargo rustc --locked --bin cloud-hypervisor --features "tdx" -- -D warnings
- - name: Build (default features + gdb)
- run: cargo rustc --locked --bin cloud-hypervisor --features "gdb" -- -D warnings
-
- name: Build (default features + guest_debug)
run: cargo rustc --locked --bin cloud-hypervisor --features "guest_debug" -- -D warnings
diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml
index 3333dfaa8..b77fc51e4 100644
--- a/.github/workflows/quality.yaml
+++ b/.github/workflows/quality.yaml
@@ -62,13 +62,6 @@ jobs:
command: clippy
args: --locked --all --all-targets --tests -- -D warnings
- - name: Clippy (default features + gdb)
- uses: actions-rs/cargo@v1
- with:
- use-cross: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }}
- command: clippy
- args: --locked --all --all-targets --tests --features "gdb" -- -D warnings
-
- name: Clippy (default features + guest_debug)
uses: actions-rs/cargo@v1
with:
diff --git a/Cargo.toml b/Cargo.toml
index adf00444d..479dc0501 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -55,7 +55,6 @@ wait-timeout = "0.2.0"
[features]
default = ["kvm"]
-gdb = ["vmm/gdb"]
guest_debug = ["vmm/guest_debug"]
kvm = ["vmm/kvm"]
mshv = ["vmm/mshv"]
diff --git a/docs/gdb.md b/docs/gdb.md
index 083d917ea..10b75c9f6 100644
--- a/docs/gdb.md
+++ b/docs/gdb.md
@@ -2,10 +2,10 @@
This feature allows remote guest debugging using GDB. Note that this feature is only supported on x86_64/KVM.
-To enable debugging with GDB, build with the `gdb` feature enabled:
+To enable debugging with GDB, build with the `guest_debug` feature enabled:
```bash
-cargo build --features gdb
+cargo build --features guest_debug
```
To use the `--gdb` option, specify the Unix Domain Socket with `--path` that Cloud Hypervisor will use to communicate with the host's GDB:
@@ -44,4 +44,4 @@ Continuing.
Breakpoint 1, 0x00000000001121b7 in ?? ()
(gdb)
-```
\ No newline at end of file
+```
diff --git a/src/main.rs b/src/main.rs
index d0da66390..0574143a0 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -29,7 +29,7 @@ use vmm_sys_util::terminal::Terminal;
enum Error {
#[error("Failed to create API EventFd: {0}")]
CreateApiEventFd(#[source] std::io::Error),
- #[cfg(feature = "gdb")]
+ #[cfg(feature = "guest_debug")]
#[error("Failed to create Debug EventFd: {0}")]
CreateDebugEventFd(#[source] std::io::Error),
#[error("Failed to open hypervisor interface (is hypervisor interface available?): {0}")]
@@ -58,10 +58,10 @@ enum Error {
BareEventMonitor,
#[error("Error doing event monitor I/O: {0}")]
EventMonitorIo(std::io::Error),
- #[cfg(feature = "gdb")]
+ #[cfg(feature = "guest_debug")]
#[error("Error parsing --gdb: {0}")]
ParsingGdb(option_parser::OptionParserError),
- #[cfg(feature = "gdb")]
+ #[cfg(feature = "guest_debug")]
#[error("Error parsing --gdb: path required")]
BareGdb,
#[error("Error creating log file: {0}")]
@@ -391,7 +391,7 @@ fn create_app<'a>(
.group("vm-config"),
);
- #[cfg(feature = "gdb")]
+ #[cfg(feature = "guest_debug")]
let app = app.arg(
Arg::new("gdb")
.long("gdb")
@@ -528,7 +528,7 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result