Firstly, I am now learning OS implementation from MIT-jos
and I want to trace bootmain(void) which locates in boot/main.c
But I don't know how to set breakpoint there,
I do set gdb source directory to both boot and obj/boot
(gdb) dir boot:obj/boot
Source directories searched:
/home/osdi/lab/boot:/home/osdi/lab/obj/boot:$cdir:$cwd
when I set breakpoint at bootmain(void), gdb complains:
(gdb) b bootmain
Function "bootmain" not defined.
Make breakpoint pending on future shared library load? (y or [n])
So,how can I correctly set breakpoint at bootmain(void?)
Secondly, I can only set breakpoint by address
(gdb) b *0x7c00
Breakpoint 1 at 0x7c00
but when I want to list the code,gdb again complains "No such file or directory"
[ 0:7c00] => 0x7c00: cli
Breakpoint 1, 0x00007c00 in ?? ()
(gdb) list
1 {standard input}: No such file or directory.
in {standard input}
So,how can I list the information correctly?
thanks~