[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH] doc: Debugging: Reflect that there are 2 images (w & w/o debug info)
With commit 33809518 the build system started to produce 2 images always: one with debugging information and one without. This commit is updating the debugging section of the developers guide to reflect this change. Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx> --- doc/guides/developers-debugging.rst | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/doc/guides/developers-debugging.rst b/doc/guides/developers-debugging.rst index 258d2f9f..aad9c6f0 100644 --- a/doc/guides/developers-debugging.rst +++ b/doc/guides/developers-debugging.rst @@ -32,24 +32,34 @@ standard application with gdb. A couple of hints that should help: ============================ Using GDB ============================ +The build system is always creating two image files for each selected platform: +One that includes debugging information and symbols (`.dbg` file extension) and +one that does not. Before using gdb, go to the menu under "Build Options" and +make sure that you selected a "Debug information level" that is bigger than 0. +We recommend the highest level 3: :: -For gdb debugging, first go to the menu and under "Build Options" make -sure you select/deselect the following options as shown: :: + ( ) Level 0 (-g0), None + ( ) Level 1 (-g1) + ( ) Level 2 (-g2) + (X) Level 3 (-g3) - [*] Debugging information - [*] Create a debugging information file - [*] Create a symbols file - [ ] Strip final image +Then save the configuration and build your images. For Linux user-space +simply point gdb to the resulting debug image, for example: :: -Then save the configuration and build your image. For Linux user-space -simply point gdb to the resulting image, for example: :: + gdb build/helloworld_linuxu-x86_64.gdb - gdb build/helloworld_linuxu-x86_64 - -For KVM, use the command: :: +For KVM, you can start the guest with the kernel images that includes debugging +information or the one that does not. We recommend to create the guest +paused (`-S` parameter): :: qemu-system-x86_64 -s -S -cpu host -enable-kvm -m 128 -nodefaults -no-acpi -display none -serial stdio -device isa-debug-exit -kernel build/helloworld_kvm-x86_64 -append verbose +and connect gdb by using the debug image with: :: + + gdb --eval-command="target remote :1234" build/helloworld_kvm-x86_64.dbg + +You can initiate qemu to start the execution of guest by typing `c` within gdb. + For Xen the process is slightly more complicated and depends on Xen's gdbsx tool. First you'll need to make sure you have the tool on your system. Here are sample instructions to do that: :: @@ -67,7 +77,7 @@ debugger backend: :: You can then connect gdb within a separate console and you're ready to debug: :: - gdb --eval-command="target remote :[PORT]" build/helloworld_xen-x86_64 + gdb --eval-command="target remote :[PORT]" build/helloworld_xen-x86_64.dbg You should be also able to use the debugging file (``build/helloworld_linuxu-x86_64.dbg``) for gdb instead passing the kernel -- 2.22.0 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |