Skip to content

Commit

Permalink
Update docs and tests for ARM gdb support
Browse files Browse the repository at this point in the history
Updated docs to now show arm is supported.
Updated the build test to run on aarch

Signed-off-by: Jack Thomson <[email protected]>
  • Loading branch information
JackThomson2 committed Oct 22, 2024
1 parent f51e212 commit e2c787f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
15 changes: 11 additions & 4 deletions docs/gdb-debugging.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# GDB Debugging with Firecracker

**The GDB feature is not for production use.**

Firecracker supports debugging the guest kernel via GDB remote serial protocol.
This allows us to connect GDB to the firecracker process and step through debug
the guest kernel. Currently only debugging on x86 is supported.
the guest kernel.

The GDB feature requires Firecracker to be booted with a config file.

## Prerequisites

Firstly, to enable GDB debugging we need to compile Firecracker with the `debug`
Firstly, to enable GDB debugging we need to compile Firecracker with the `gdb`
feature enabled, this will enable the necessary components for the debugging
process.

Expand Down Expand Up @@ -102,9 +104,14 @@ command in the GDB session which will terminate both.
mitigated by setting these kernel config values:

```
CONFIG_SCHED_MC=y
CONFIG_SCHED_MC_PRIO=y
CONFIG_SCHED_MC=n
CONFIG_SCHED_MC_PRIO=n
```

- Currently we support a limited subset of cpu registers for get and set
operations, if more are required feel free to contribute.

- On ARM the guest virtual address translation will only work on guests with 4kb
pages and not all physical address sizes are supported. If the current
translation implementation doesn't cover a specific setup, feel free to
contribute.
3 changes: 0 additions & 3 deletions tests/integration_tests/build/test_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@

import platform

import pytest

import host_tools.cargo_build as host

MACHINE = platform.machine()
TARGET = "{}-unknown-linux-musl".format(MACHINE)


@pytest.mark.skipif(MACHINE != "x86_64", reason="GDB runs only on x86_64.")
def test_gdb_compiles():
"""Checks that Firecracker compiles with GDB enabled"""

Expand Down

0 comments on commit e2c787f

Please sign in to comment.