FDD-book/examples/part-07/ch34-advanced-debugging/lab06-remote-gdb/qemu-launch.sh.sample
Edson Brandi 6e6dac94fe Add book companion files under examples/
Organize companion code and materials by book part:

  part-01/      Foundations
  part-02/      Kernel & driver fundamentals
  part-03/      Character & block devices
  part-04/      Networking & storage
  part-05/      Buses & advanced topics
  part-06/      Debugging & performance
  part-07/      Real-world drivers
  appendices/   Supplementary material
  README.md     Overview and build instructions
2026-04-25 16:51:00 +00:00

26 lines
672 B
Bash

#!/bin/sh
#
# qemu-launch.sh.sample - sample QEMU launch script for Chapter 34
# Lab 6 (remote GDB stub debugging).
#
# The key flag is -serial pty, which makes QEMU allocate a
# pseudo-terminal on the host and print its path on startup. Open
# that path from kgdb with "target remote <path>".
#
# This is a sample. Adjust for your environment.
VMNAME=bugdemo-debug
DISK=/vms/bugdemo-debug.qcow2
MEM=2G
CPUS=2
qemu-system-x86_64 \
-name ${VMNAME} \
-m ${MEM} \
-smp ${CPUS} \
-enable-kvm \
-drive file=${DISK},if=virtio \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0 \
-serial pty \
-display none