All of lore.kernel.org
 help / color / mirror / Atom feed
* about gdbserver-xen
@ 2010-12-06  6:29 topperxin
  2010-12-06 18:24 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 3+ messages in thread
From: topperxin @ 2010-12-06  6:29 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 575 bytes --]

hi all
    Anybody who have ever use gdbserver-xen debug the domU kernel?


    from the guide of the gdbserver-xen, the domU must start at first, then at the dom0 we can do just like    this:
     gdbserver-xen 127.0.0.1:9999 $dom_id


and then also at dom0:


     gdb vmlinux


     gdb> target romote 127.0.0.1:9999


that's ok.


     my question is when I do as above , my domU will crash. another is since the domU must start at first, if I want to debug the start stage of the domU kernel , what should I do? who can give me some advice , thank you very much.


     

[-- Attachment #1.2: Type: text/html, Size: 1114 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: about gdbserver-xen
  2010-12-06  6:29 about gdbserver-xen topperxin
@ 2010-12-06 18:24 ` Jeremy Fitzhardinge
  2010-12-07  3:02   ` topperxin
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2010-12-06 18:24 UTC (permalink / raw)
  To: topperxin; +Cc: xen-devel

On 12/05/2010 10:29 PM, topperxin wrote:
> hi all
> Anybody who have ever use gdbserver-xen debug the domU kernel?
>
> from the guide of the gdbserver-xen, the domU must start at first,
> then at the dom0 we can do just like this:
> gdbserver-xen 127.0.0.1:9999 $dom_id
>
> and then also at dom0:
>
> gdb vmlinux
>
> gdb> target romote 127.0.0.1:9999
>
> that's ok.
>
> my question is when I do as above , my domU will crash. another is
> since the domU must start at first, if I want to debug the start stage
> of the domU kernel , what should I do? who can give me some advice ,
> thank you very much.


Firstly, "gdbsx" is the preferred command for debugging a domain these
days ("gdbsx -a <domid> <32|64> <port>").

Secondly, you can start your domain paused ("xl create -p"), attach
gdbsx and gdb, set any breakpoints, etc, then start the domain off.

J

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re:Re: about gdbserver-xen
  2010-12-06 18:24 ` Jeremy Fitzhardinge
@ 2010-12-07  3:02   ` topperxin
  0 siblings, 0 replies; 3+ messages in thread
From: topperxin @ 2010-12-07  3:02 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 3626 bytes --]

hi Jeremy
    Thank you very much.

    now, the gdbserver-xen can work a little, I can set breakpoint, such as
-----------------------------------------------------------------
       gdb -s vmlinux 
        ................
        Reading symbols from /root/vmlinux...done.
       (gdb) set architecture i386:x86-64:intel
      The target architecture is assumed to be i386:x86-4:intel
      (gdb) target remote 127.0.0.1:9999
         Remote debugging using 127.0.0.1:9999
         [Switching to Remote target]
         native_safe_halt ()
         at /usr/src/linux-source-2.6.35/linux-source-           2.6.35/arch/x86/include/asm/irqflags.h:50
50/usr/src/linux-source-2.6.35/linux-source-2.6.35/arch/x86/include/asm/irqflags.h: No such file or directory.
in /usr/src/linux-source-2.6.35/linux-source-2.6.35/arch/x86/include/asm/irqflags.h
(gdb) br sys_open
Breakpoint 1 at 0xffffffff81144909: file fs/open.c, line 912.
(gdb) c
Continuing.
Breakpoint 1, sys_open (filename=0x12262c0 "/sys/devices/system/cpu", flags=591872, mode=-332603840)
    at fs/open.c:912
912fs/open.c: No such file or directory.
in fs/open.c
 ---------------------------------------------------------------
perhaps there are two warnings
the first is native_safe_halt, I found the messages on google, someone said just shut down the options in kernel hacking "Detect Soft Lockup"
can solve it, I will try.
the second is: when continuing it says:
        912fs/open.c: No such file or directory.
in fs/open.c
what'r wrong with this?
------------------------------------------------------------
and another tools you referred gdbsx, I found it under the ./tools/debugger/gdbsx/, when I want to compile it, I received such errors:
         remote: Counting objects: 1857338, done.
remote: Compressing objects: 100% (292566/292566), done.
Receiving objects: 100% (1857338/1857338), 368.84 MiB | 53 KiB/s, done.
remote: Total 1857338 (delta 1554805), reused 1849232 (delta 1547905)
Resolving deltas: 100% (1554805/1554805), done.
Checking out files: 100% (30571/30571), done.
+ cd linux-2.6-pvops.git.tmp
+ git checkout xen/master
error: pathspec 'xen/master' did not match any file(s) known to git.
make[2]: *** [linux-2.6-pvops.git/.valid-src] 错误 1
make[2]: Leaving directory `/home/nlx/nex-4.5.4/xen'
make[1]: *** [linux-2.6-pvops-install] 错误 2
make[1]: Leaving directory `/home/nlx/nex-4.5.4/xen'
make: *** [install-kernels] 错误 1


    I can't analyse what's wrong with it, can you give me some advice?
thanks a lot.   


     


    


At 2010-12-07 02:24:04,"Jeremy Fitzhardinge" <jeremy@goop.org> wrote:

>On 12/05/2010 10:29 PM, topperxin wrote:
>> hi all
>> Anybody who have ever use gdbserver-xen debug the domU kernel?
>>
>> from the guide of the gdbserver-xen, the domU must start at first,
>> then at the dom0 we can do just like this:
>> gdbserver-xen 127.0.0.1:9999 $dom_id
>>
>> and then also at dom0:
>>
>> gdb vmlinux
>>
>> gdb> target romote 127.0.0.1:9999
>>
>> that's ok.
>>
>> my question is when I do as above , my domU will crash. another is
>> since the domU must start at first, if I want to debug the start stage
>> of the domU kernel , what should I do? who can give me some advice ,
>> thank you very much.
>
>
>Firstly, "gdbsx" is the preferred command for debugging a domain these
>days ("gdbsx -a <domid> <32|64> <port>").
>
>Secondly, you can start your domain paused ("xl create -p"), attach
>gdbsx and gdb, set any breakpoints, etc, then start the domain off.
>
>J
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel

[-- Attachment #1.2: Type: text/html, Size: 6230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-07  3:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06  6:29 about gdbserver-xen topperxin
2010-12-06 18:24 ` Jeremy Fitzhardinge
2010-12-07  3:02   ` topperxin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.