I am debugging linux kernel using two virtual machines connected via serial port.
Target machine awaits connection from remote gdb, by inserting kgdbwait()
and kgdboc=ttyS0,115200
in the correct entry in /boot/grub/grub.cfg
.
In Host machine
sudo gdb ./vmlinux
Symbols are read and I am supposed to be able to put breakpoints on function names.
(gdb) break oom_kill_process
Breakpoint 1 at 0xc1172ef0: file mm/oom_kill.c, line 843.
Works fine!
However, if I set a breakpoint at htb_dequeue_tree
which is found here, I get the following error:
(gdb) break htb_dequeue_tree
No symbol "htb_dequeue_tree" in current context.
break net/sched/sch_htb.c:htb_dequeue_tree
and it didn't work. When I did this formm/oom_kill.c:oom_kill_process
it succeeded so for some reasonsch_htb.c
is not recognized? anyway, thanks for your comment, but how do I find that address of the function? – Tony Tannoussch_htb.c
is not found. I am gettingNo source file named net/sched/sch_htb.c
– Tony Tannous