Hi,
I'm new to all this stuff.
I've set up QEMU to run KolibriOS, and GBD on Windows XP and I can connect
the GBD debugger to QEMU using the "target remote :1234" command.
But I don't know how to load the symbols for the Kernel.
Can someone tell me what symbol file to use. I know the command to use
in GBD to load the symbols, but I don't know what file to use ?
What is the symbol file? What is it used for and where is it for the kernel?
Also, would it be better to do all this stuff under Linux, or does it really
matter? I'm wanting to study the Kernel so I can write code for it.
Thanks,
-Areal
Loading Kernel symbols in GBD
Ok, I've kinda figured it out, You must use FASM to create the symbol file
by changing the fasm line in build.bat to this...
"fasm -m 65536 kernel.asm bin\kernel.mnt -s kos.sym"
where -s kos.sym is the name of the symbol file you want.
However, when I try to load in in GDB like this...
(gdb) symbol kos.sym
I get the following error...
"C:\GDB\bin/kos.sym': can't read symbols: File format not recognized."
so I looked up the following posts on the FASM site...
http://board.flatassembler.net/topic.php?t=9792
http://board.flatassembler.net/topic.php?p=89369
http://board.flatassembler.net/topic.php?t=10029
But I still can't figure out how to convert the FASM symbol format to somthing GDB can use.
QUESTION:
Can someone tell me how to convert the format to the correct one GDB can use ?
How are people debugging the kernel ?
Thanks,
-Areal
by changing the fasm line in build.bat to this...
"fasm -m 65536 kernel.asm bin\kernel.mnt -s kos.sym"
where -s kos.sym is the name of the symbol file you want.
However, when I try to load in in GDB like this...
(gdb) symbol kos.sym
I get the following error...
"C:\GDB\bin/kos.sym': can't read symbols: File format not recognized."
so I looked up the following posts on the FASM site...
http://board.flatassembler.net/topic.php?t=9792
http://board.flatassembler.net/topic.php?p=89369
http://board.flatassembler.net/topic.php?t=10029
But I still can't figure out how to convert the FASM symbol format to somthing GDB can use.
QUESTION:
Can someone tell me how to convert the format to the correct one GDB can use ?
How are people debugging the kernel ?
Thanks,
-Areal
Ok, Now I just found this...
"It's not possible at the moment. GDB does not understand the .fas format so you first need to convert the .fas file to DWARF, but no such converter exists. Tomasz has asked for help with format converters so if you feel you're up for the task you should give it a shot."
Is this true ?
If so, Could someone please tell me how I can debug KolibriOS ?
Thanks,
-Areal
"It's not possible at the moment. GDB does not understand the .fas format so you first need to convert the .fas file to DWARF, but no such converter exists. Tomasz has asked for help with format converters so if you feel you're up for the task you should give it a shot."
Is this true ?
If so, Could someone please tell me how I can debug KolibriOS ?
Thanks,
-Areal
I usually use Bochs with debugging support for kernel debugging. Kolibri version of fasm can generate symbol files directly suitable for Bochs (that is, a sequence of lines of type '0x<hex-address> <name>').
Who is online
Users browsing this forum: No registered users and 2 guests