![qemu monitor qemu monitor](https://i.ytimg.com/vi/Tnykt3XCp2E/maxresdefault.jpg)
![qemu monitor qemu monitor](https://docplayer.net/docs-images/40/5236213/images/page_11.jpg)
Obj/user/hello, etc Linked ELF images of the kernel and user programs. Symbol tables for the kernel and user programs.
#QEMU MONITOR CODE#
Assembly code listings for the bootloader, kernel, and user Obj/kern/kernel.asm, obj/user/hello.asm, etc. Output files that may prove useful while debugging: obj/boot/boot.asm, When building JOS, the makefile also produces some additional Specify additional arguments to pass to QEMU. make V=1 grade Stop after any failed grade test and leave the QEMU output in Print out every command being executed, includingĪrguments. The makefile also accepts a few useful variables: Run- name-gdb-nox, (Lab 3+) Variants of run- name that correspond to make run- name (Lab 3+) Run user program name. make qemu-nox-gdb A combination of the qemu-nox and qemu-gdb Instruction and waits for a GDB connection. make qemu-gdb Like make qemu, but rather than passively accepting GDBĬonnections at any time, this pauses at the first machine SSH connections to Athena dialups because the VGA window consumes a
#QEMU MONITOR SERIAL#
make qemu-nox Like make qemu, but run with only the serial console. To exit, eitherĬlose the VGA window or press Ctrl-c or Ctrl-a x Window and the serial console in your terminal. Make qemu Build everything and start QEMU with the VGA console in a new gdbinit file thatĪutomatically points GDB at QEMU, loads the kernel symbol file, and To start once QEMU is running, simply run gdbįrom your lab directory. GDB connections (the *-gdb targets also wait for thisĬonnection). All of these targets configure QEMU to listen for The JOS GNUmakefile includes a number of phony targets for running JOS You can hit the same EIP in a different environment (indeed, aĭifferent binary altogether!). Breakpoints generally work, but watch out because Suppresses interrupts, but it only steps one assembly instruction. Interrupt is virtually guaranteed the moment you let the VM run again. It basically impossible to step through user code because a clock It sees clock interrupts as just another control transfer. (Lab 4+) Since GDB is attached to the virtual machine as a whole, The right user binary library functions will be linked atĭifferent EIPs in different binaries and GDB won't know any Symbols are already included in each user binary). (libraries are statically linked into JOS user binaries, so those o files, as those haven't been relocated by the linker In its ELF binary, so you can load it using symbol-file The symbol table for a user environment is Table to use with the symbol-file command, since itĬan only use one symbol table at a time. You can symbolically debug user code, just like you can kernelĬode, but you have to tell GDB which symbol You can start JOS with a specific user environment using make run- name (or you can edit Things you need to watch out for, since GDB doesn't know that there'sĪ distinction between multiple user environments, or between user and GDB also lets you debug user environments, but there are a few (Lab 4+) To debug multiple CPUs, use GDB's thread-related commands Note that these commands only display the current To debug virtual memory issues, try the QEMU monitor commands info mem (for a high-level If you're getting unexpected interrupts, exceptions, or tripleįaults, you can ask QEMU to generate a detailed log of interrupts See the GDB referenceīelow for some commands that are useful when debugging kernels. Use the qemu-gdb target (or its qemu-gdb-nox variant) to make