xv6
以下で clone してみた。
$ git clone git://pdos.csail.mit.edu/xv6/xv6.git
とほほ
qemu が入ってないオチ。
sed "s/localhost:1234/localhost:26000/" < .gdbinit.tmpl > .gdbinit *** *** Error: Couldn't find a working QEMU executable. *** Is the directory containing the qemu binary in your PATH *** or have you tried setting the QEMU variable in Makefile? *** *** *** Error: Couldn't find a working QEMU executable. *** Is the directory containing the qemu binary in your PATH *** or have you tried setting the QEMU variable in Makefile? *** /bin/sh: -help: not found *** Now run 'gdb'. serial mon:stdio -hdb fs.img xv6.img -smp 2 -m 512 -S -s -p 26000 make: serial: Command not found make: [qemu-gdb] Error 127 (ignored) rm wc.o grep.o mkdir.o rm.o ln.o stressfs.o kill.o echo.o init.o usertests.o zombie.o cat.o sh.o ls.o
ええと、とりあえず apt-get で入れてみてリトライ。
*** Now run 'gdb'. qemu -serial mon:stdio -hdb fs.img xv6.img -smp 2 -m 512 -S -gdb tcp::26000 pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
- 別端末で gdb 実行
$ gdb GNU gdb (GDB) 7.2-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. + target remote localhost:26000 The target architecture is assumed to be i8086 [f000:fff0] 0xffff0: ljmp $0xf000,$0xe05b 0x0000fff0 in ?? () + symbol-file kernel (gdb) run The "remote" target does not support "run". Try "help target" or "continue". (gdb) c Continuing.
- qemu なナニで以下が出力
Starting SeaBIOS (version pre-0.6.1-20100702_143500-palmer) Booting from Hard Disk... cpu0: starting xv6 ioapicinit: id isn't equal to ioapicid: not a MP cpu1: starting cpu0: starting init: starting sh $
とりあえずこれを基に資料を確認な方向、なのかな。