diff options
Diffstat (limited to 'Documentation/development/debugging.adoc')
-rw-r--r-- | Documentation/development/debugging.adoc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Documentation/development/debugging.adoc b/Documentation/development/debugging.adoc new file mode 100644 index 0000000..f1bbf01 --- /dev/null +++ b/Documentation/development/debugging.adoc @@ -0,0 +1,25 @@ += Debugging +:page-parent: Development +:page-nav_order: 4 + +// SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is> +// SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0 + +== Extracting core dumps when running Spectrum in a VM + +When using a VM to run the Spectrum host system, a special mechanism +is available to enable easy introspection of core files. + +When a program on the Spectrum host system dumps core, the system will +attempt to upload the core file to _its_ host (i.e. the system running +Spectrum in a VM) using the vsock(7) protocol, on port 1129271877. + +For example, when running Spectrum in a VM using `make run` in the +host/rootfs directory (which automatically sets up a virtio-vsock +device), the running this command on the development Linux system will +listen for a core file from Spectrum, and write it to a file: + +[source,shell] +---- +socat -u VSOCK-LISTEN:1129271877 CREATE:spectrum.core +---- |