[prev in list] [next in list] [prev in thread] [next in thread] 

List:       android-virt
Subject:    [Android-virt] Fwd: Fwd: Early pl011 console for debugging KVM for ARM port
From:       agraf () suse ! de (Alexander Graf)
Date:       2009-12-17 8:40:21
Message-ID: C05CCC5E-D76F-4D95-94C8-2718AAB62A5E () suse ! de
[Download RAW message or body]


Am 17.12.2009 um 09:28 schrieb Christoffer Dall <cd2436 at columbia.edu>:

> forgot to reply-to-all...
>
>> Another thing that's really been useful to me there was the gdb  
>> interface. Qemu has a pretty good gdb stub and for KVM support all  
>> you need to do is implement the register synchronization.
>>
> I've used GDB a lot for the host kernel to debug the initial things,
> but QEMU/GDB seemed to get really confused when dealing with things
> like cache flushes or address space switches and backtraces and single
> stepping is somewhat flaky - I don't know the reason why.

You need to let qemu's mmu system know what state you're in on the  
kernel.
X86 for example syncs its page table register.
PPC (non-embedded) syncs the segment registers.
S390 qemu doesn't know what an mmu is, so we're always in linear  
mapping.

I'm not sure how cache flushes would make things flaky, as qemu  
shouldn't have cached anything in the first place.
You definitely need to sync address space indormation (user/kernel  
identifier, page table pointer)

Breakpoints (which are involved in single stepping) are a bit more  
difficult. In most cases backtraces and variable dumps should give you  
enough information though.

Alex

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic