Better debugging support
Now builds 64b with debugging support, and on x86, it retains the original 64b
object. Once we objcopy, we lose the ability to use some debugging tools, such
as addr2line.
This retains the 64bit original version of the kernel, which will be large if
you use a big KFS. But no one should be doing that anymore. If you do, you
can comment out the cp in k/a/x/Makefile (but don't commit it).
With this change, you can do things such as:
$ x86_64-ros-addr2line -e obj/kern/akaros-kernel-64b
ffffffffc0321cef
/usr/local/google/home/brho/akaros/ros-kernel/kern/src/process.c:551
^C
$ gdb obj/kern/akaros-kernel-64b
Reading symbols
from akaros-kernel-64b...done.
(gdb) list *0xffffffffc200d030
0xffffffffc200d030 is in abort_all_sysc (kern/src/kthread.c:739).
734/* This will abort any abortabls at the time the call was started. New
735 * abortables could be registered concurrently. The main caller I see for this
736 * is proc_destroy(), so DYING will be set, and new abortables will quickly
737 * abort and dereg when they see their proc is DYING. */
738void abort_all_sysc(struct proc *p)
739{
740 struct cv_lookup_elm *cle;
741 int8_t irq_state = 0;
742 struct cv_lookup_tailq abortall_list;
743 struct proc *old_proc = switch_to(p);
(gdb)
Note that you need to call this on the akaros-kernel-64b version (for amd64).
2 files changed