#!/bin/bash

make
qemu-system-i386 \
  -gdb tcp::1234 -S -smp 4 \
  -chardev stdio,mux=on,id=char0 \
  -chardev file,path=trace.log,id=char1 \
  -serial chardev:char0 \
  -serial chardev:char1 \
  build/mptest-x86-qemu &
pid=$?
gdb -x dbg.txt; kill -9 ${pid}
