how to debug fiasco kernel

Keqin Sun keqin at nfs.iscas.ac.cn
Wed Apr 3 12:51:35 CEST 2013


Hi,Bjoern,

     Thank you! I found that image according to your reply. It helped me a lot!  But
I still have one question.
First, I typed this command in one terminal:
         qemu-system-i386 -S -cdrom hello.iso -serial stdio
Second, in the qemu GUI:
         gdbserver tcp::1234
Third, in another terminal I typed:
         gdb hello(this is the binary with debug info)
         target remote localhost:1234
         b main
and then, when I typed run, gdb said:
         The "remote" target does not support "run".  Try "help target" or "continue".
so, I typed c. The hello program ran but it didnot stop at the breakpoint which I
expected it will stop at that point(main()).
         Did I miss something?

Regards!
Jimmy/Keqin
-----------------------------------------------------------------------------------
Hi Keqin,

>           Thank you very much for your timely reply, but I still want to know if
> I must recompile the source code to create another kind of image which can be
> used for debugging(like vmlinux)? Does this image hello.iso(generated from
> official guide: http://os.inf.tu-dresden.de/fiasco/build.html) provide all the
> necessary debug information in it?

the generated hello.iso file is an ISO CD-ROM image (see
http://en.wikipedia.org/wiki/ISO_image), which contains all necessary
binaries to boot a certain Fiasco.OC setup (e.g., the bootstrapper, the
kernel, and the hello world application).

For debugging using BochsGDB or QEMU's GDB server you will need a single
binary. For the Fiasco.OC kernel, you will find two binaries in the
kernel's build directory. The 'fiasco' binary is the one that gets
loaded, but it does not contain debug info. The 'fiasco.image' binary is
the same binary but with debug information attached. So if you want to
debug the kernel, tell GDB to load the latter binary.

For L4Re user-level applications (such as hello) you will find the
respective binaries in the L4Re build directory (bin/<arch>/<L4API>).
These binaries are not stripped by default so you can directly use them
with GDB.

Cheers,
Bjoern


_______________________________________________
l4-hackers mailing list
l4-hackers at os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-----------------------------------------------------------------------------------





More information about the l4-hackers mailing list