(first post)... So I've decided to save the world and write an OS. Ya all know how that is.
So I started by going through some manuals, read up on it and now I bumped into a problem.
Using bochs and my little tiny kernel with debugging symbols enabled I somehow cannot debug my application.
The floppy has a grub on it, fat12 formatted and the kernel is loaded from there...#bochsrc
megs: 64
romimage: file=/usr/share/bochs/BIOS-bochs-latest
floppya: 1_44=./bootfloppy/floppy.img, status=inserted
boot: floppy
log: bochsout.txt
gdbstub: enabled=1, port=1234, text_base=0, data_base=0, bss_base=0
Well I suppose only the -g and -ggdb are relevant now..#switches for gcc
CC=gcc
CFLAGS=-Wall -nostdlib -nostartfiles -nodefaultlibs -I$(INCLUDES) -g3 -ggdb
so: bochs -q -> start up bochs
stops execution waiting for gdb to connect to it.. So far so good
So with the above example debugging I have 2 problems:>gdb kernel/kernel.bin
Reading symbols from /kernel/kernel.bin...done.
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
warning: Remote failure reply: Eff
0x00000000 in ?? ()
(gdb) b kernel.c:12
Breakpoint 1 at 0x100026: file kernel.c, line 12.
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0005799b in ?? ()
(gdb) list
- warning: Remote failure reply: Eff ---> What does that mean?
- when issuing list no matter where I am or where I have set a breakpoint it only lists the first 10 or so lines of kernel.c file on which the kmain() function is
edit: the first few lines of kernel.c http://pastebin.com/5hyiTkKC