1

I'm using VMware Workstation 15 Pro on Windows 10. The guest OS is Linux 18.04.5 LTS. In guest Linux, I downloaded xv6 using command: git clone git://github.com/mit-pdos/xv6-public.git. After building xv6 using make, I run make qemu-nox-gdb. However, the xv6 freezes inside qemu. No prompt printed out. No response to any key input. But if I remove gdb, everything works well. output image

PS: I have update and upgrade everything in Linux, including qemu, git, gdb, nasm, etc.

jwvh
  • 50,871
  • 7
  • 38
  • 64
zzzhhh
  • 319
  • 1
  • 8

1 Answers1

1

That QEMU commandline tells QEMU "don't run anything, instead, stop and wait for a connection from gdb". The makefile printed a message for you: "Now run 'gdb'". Have you run gdb and connected it to QEMU? (Probably there should be some tutorial or other info with xv6 that explains more about how to do this.)

Peter Maydell
  • 9,707
  • 1
  • 19
  • 25
  • Thank you for the answer. I didn't run gdb because I had thought gdb will run automatically and pause at the first instruction of xv6, I will make a study of how to proceed with gdb connection. – zzzhhh Mar 29 '21 at 23:42
  • @zzzhhh did you find out anything? – Sihat Afnan Dec 29 '21 at 13:57
  • @Sihat Afnan: Yes, I should've run `make qemu-gdb`. This target sets up a remote debugging environment -- Qemu serves as a proxy between xv6 kernel and gdb. In Visual Studio, debugger will start automatically and highlight the execution, but in Linux, user is never considered so qemu and user wait for each other. Here is a reference: http://zoo.cs.yale.edu/classes/cs422/2011/lec/l2-hw. – zzzhhh Dec 31 '21 at 08:08