qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: How to debug Linux kernel on qemu with kgdb?


From: Neo Jia
Subject: [Qemu-devel] Re: How to debug Linux kernel on qemu with kgdb?
Date: Wed, 25 Apr 2007 11:02:58 -0500

On 4/25/07, Jan Kiszka <address@hidden> wrote:
Neo Jia wrote:
> On 4/25/07, Jan Kiszka <address@hidden> wrote:
>> Neo Jia wrote:
>> > hi,
>> >
>> > I am trying to use debug kgdb patched linux kernel on my qemu. Both
>> > the native and target platform are IA32. I am wondering if there is
>> > anyone can show me the procedure?
>>
>> Yep, see https://mail.gna.org/public/xenomai-core/2006-09/msg00202.html
>>
>> (BTW, I think that kgdb bug is still unfixed - I never got a feedback.)
>
> I can connect gdb through /dev/pts/XX. My qemu is lanuched by
>
> qemu -nographic -hda linux.img -kernel
> ./2.6.15.5-kgdb/vmlinuz-2.6.15.5-kgdb -serial pty -append "kgdbwait
> console=ttyS0 root=/dev/hda sb=0x220,5,1,5 ide2=noprobe ide3=noprobe
> ide4=noprobe ide5=noprobe"
>
> Do you know where can I get the console output?
>

Use "... -serial stdio -serial pty ..." and attached kgdb to the second
serial port (I think to recall that is default anyway). The first one is
then used for the kernel console.

I also tried this but it seems that kgdb cannot connect to /dev/pts/XX
with "-serial stdio".
I did anything wrong?

Thanks,
Neo


> I would like to work out kgdb + qemu to debug linux kernel.

??? So you really want to debug the kernel when kgdb is applied, ie.
actually debug kgdb? If you only intend to debug the kernel itself, qemu
-s + gdb is enough.

Jan





--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]