Hi,

On Tue Mar 13, 2018 at 11:58:57 +0800, Zihan Yang wrote:
> I'm trying to debug L4Linux using jdb in Fiasco. I have added a
> breakpoint in a function(e.g, syscall_exit), and it did hit into jdb
> when I run. However, when I type 'bt' in jdb, it only prints the
> values in the stack, or worse, it sometimes couldn't print the stack.

> I have tried enabling L4_DEBUG_REGISTER_NAMES and CONFIG_FRAME_POINTER
> in L4Linux, and uncheck 'config without frame pointer' and 'generate
> inline code' options in Fiasco, but still it doesn't work.
> 
> QEMU could be an option, but qemu debugs the whole system while I just
> want to focus on the L4Linux itself because I just want to figure out
> the call path of ret_from_fork and how does L4Linux stop the user
> dispatch loop, etc.
> 
> Is there any way to show the the call path in jdb to assist the debugging 
> work?

There's not really such a feature in jdb to assist with that.
I think reading code is the better approach here.
 
> By way, is there any doc describing the call path from fiasco to
> L4Linux, I know it is implemented with sysretq or iretq, but where is
> the entrypoint in L4Linux? For example, when I type 'ls /bin' in
> shell, it would finally go into L4Linux's function 'syscall_exit()',
> but how can I find the call path between them? If I can figure it out,
> maybe I just don't need to debug anymore.

All this entry to Linux and exit from it (to the user process) is
happening in arch/l4/kernel/dispatch.c. There's the entry point
(l4x_vcpu_entry) and that's the path to follow. In there it will branch
to syscall handling, page fault handling, irq handling, or exception
handling, depending on the type of entry.


Adam

_______________________________________________
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Reply via email to