qemu-devel
[Top][All Lists]
Advanced

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

RE: [Qemu-devel] Debugging vmlinux with qemu and gdb. Unable to step, ne


From: Keilhau Timo ( Student )
Subject: RE: [Qemu-devel] Debugging vmlinux with qemu and gdb. Unable to step, next, print or to get any information..
Date: Fri, 9 May 2008 11:03:47 +0200

 

> -----Original Message-----
> From: 
> address@hidden
>  
> [mailto:address@hidden
ngnu.org] On Behalf Of Mulyadi Santosa
> Sent: Freitag, 9. Mai 2008 09:24
> To: address@hidden
> Subject: Re: [Qemu-devel] Debugging vmlinux with qemu and 
> gdb. Unable to step,next, print or to get any information..
> 
> HI Jason...
> 
> On Fri, May 9, 2008 at 11:39 AM, Jason Wessel 
> <address@hidden> wrote:
> >> Of course, this assume that there is no bugs while Qemu 
> inspect and 
> >> found that it must pause at certain address... I believe Jasson 
> >> Wessel had squashed all that kind of bugs in the past.
> >>
> >> regards,
> >>
> >> Mulyadi.
> >>
> >>
> > I believe that Mulyadi is talking about the following two patches 
> > which are attached here, assuming you are able to hit breakpoints.
> 
> Thanks.... I believe that's the patch that will fix his problem.
> 
> regards,
> 
> Mulyadi.
> 

Hello Jan, Jason and Mulyadi!
BIG BIG thanks to you! It works now!
You really have pointed me to the right solution.

First Ive tried to compile qemu 0.9.1 from source with your patches
applied.
But it failed cause I have gcc version 4.2.1 installed and qemu needs
version 3.x.x
Then Ive tried to compile gcc 3.4.6 but with no success make throws
errors i havn't get managed...

But anyways I've downloaded a newer qemu version from rpmfind.net:
ftp://fr2.rpmfind.net/linux/opensuse/distribution/SL-OSS-factory/inst-so
urce/suse/x86_64/qemu-0.9.1-40.x86_64.rpm
Updated my rpm package to version: rpm-4.4.2-192.x86_64

And now all things like addressinfo and stepping working like expected:

GDB TEST----------------------------------------------->>

(gdb) l sys_sendmsg
1783    /*
1784     *      BSD sendmsg interface
1785     */
1786
1787    asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg,
unsigned flags)
1788    {
1789            struct compat_msghdr __user *msg_compat =
1790                (struct compat_msghdr __user *)msg;
1791            struct socket *sock;
1792            char address[MAX_SOCK_ADDR];
(gdb) b 1787
Breakpoint 1 at 0xffffffff803e9ac5: file net/socket.c, line 1787.
(gdb) c
Continuing.

Breakpoint 1, sys_sendmsg (fd=3, msg=0x507920, flags=0) at
net/socket.c:1788
1788    {
(gdb) bt
#0  sys_sendmsg (fd=3, msg=0x507920, flags=0) at net/socket.c:1788
#1  0xffffffff8020be9b in system_call ()
#2  0x0000000000000246 in ?? ()
#3  0x0000000000000000 in ?? ()
(gdb) s
0xffffffff8020ca85 in apic_timer_interrupt ()
(gdb) s
Single stepping until exit from function apic_timer_interrupt,
which has no line number information.
smp_apic_timer_interrupt (regs=0xffff810007437ed8) at
arch/x86/kernel/apic_64.c:488
488     {
(gdb) s
30              struct pt_regs *old_regs, **pp_regs =
&__get_cpu_var(__irq_regs);
(gdb) s
488     {
(gdb) s
30              struct pt_regs *old_regs, **pp_regs =
&__get_cpu_var(__irq_regs);
(gdb) s
450             struct clock_event_device *evt = &per_cpu(lapic_events,
cpu);
(gdb) s
32              old_regs = *pp_regs;
(gdb) s
33              *pp_regs = new_regs;
(gdb) s
64              *((volatile u32 *)(APIC_BASE + reg)) = v;
(gdb) c
Continuing.

<<-----------------------------------------GDB TEST

big thanks!

regards timo






reply via email to

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