L4/Fiasco kernel debugger (jdb) and step over command

Adam Lackorzynski adam at os.inf.tu-dresden.de
Thu Dec 28 01:22:31 CET 2017


On Thu Dec 28, 2017 at 02:54:20 +0300, Valery V. Sedletski wrote:
> On 28.12.2017 02:29, Adam Lackorzynski wrote:
> > On Wed Dec 27, 2017 at 18:33:16 +0300, Valery V. Sedletski wrote:
> > > On 27.12.2017 13:05, Matthias Lange wrote:
> > > > Hi Valery,
> > > > 
> > > > > On 26. Dec 2017, at 17:54, Valery V. Sedletski <_valerius at mail.ru> wrote:
> > > > > 
> > > > > Hi. I'm trying to debug my program with jdb. (I'm using the old L4/Fiasco / L4Env, not the current Fiasco.OC / L4Re). I enabled the permanent single step mode (with the S+ command) and a permanent show the Thread Control Block (with the t+ command) option. So, I was able to single-step with "g" command. Also, I found "jr" (go until return (ret or iret) is encountered) and "jb" (go until the next branch instruction, like jmp/call/int) commands, but they don't seem to work. When I enter them, I see only a single step to the next instruction. Are these two commands broken? How do I step over a "call"/"int" instruction?
> > > > Fiasco/L4Env has been outdated for almost 10 years now and hasn’t been maintained since then. Sorry, but here we are unable to help you with your problem.
> > > Yes, I know that  it's outdated now.
> > > > Are there any reasons you chose Fiasco/L4Env over Fiasco.OC/L4Re?
> > > My program is based on L4Env. I'm porting it to L4Re now. But first I need
> > > to fix some bug and then continue porting it to L4Re. I think, someone could
> > > remember some problems existed with L4/Fiasco kernel debugger. Also,
> > > Fiasco.OC debugger may be very similar, so I expected someone could help me.
> > > The problem is that I cannot find any commands similar to "step over"
> > > command. There are "jb" (continue to the next branch instruction) and "jr"
> > > (continue until next return instruction), but they don't seem to work. They
> > > just do a single stepping. Does still anybody remember how could I step over
> > > a "call" instruction? Maybe, in Fiasco.OC it's similar? Or, in Fiasco, it
> > > was completely broken in the end?
> > Indeed, jdb's functionality is still pretty similar here, including
> > non-functionalities. Would you have a chance to run your code within
> > QEMU and attach gdb to QEMU so that you could do your debugging?
> > 
> So, it still does not work in jdb until now? Good, so debugging in GDB
> inside QEMU still should work?
> Is there any examples how to do GDB debugging (or, it is not specific to 
> L4/Fiasco or Fiasco.OC?)? I suspect that I need to link a GDB stub with my
> program and connect to it with GDB via network somehow? Are there any
> manuals somewhere?

What I mean is rather attaching GDB to QEMU and using that to debug the
whole L4 system. What maybe tricky here is to stop the system at the
right point but breakpoints should do it here. QEMU options are
-s and -S.


Adam




More information about the l4-hackers mailing list