* [uml-devel] uml and gdb debugging questions
@ 2006-07-12 1:05 Miao Qingjun
2006-07-12 18:59 ` Blaisorblade
2006-07-13 19:37 ` [uml-devel] [uml-user] " Jeff Dike
0 siblings, 2 replies; 4+ messages in thread
From: Miao Qingjun @ 2006-07-12 1:05 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: user-mode-linux-user
[-- Attachment #1.1: Type: text/plain, Size: 380 bytes --]
Hi,
I have several problems about uml-2.6.17 and gdb debugging.
I start "gdb uml", "b sys_init_module", then "run",
but gdb is not break at sys_init_module() when I insmod LKM?
Why? How can I do it?
When I type control-c in gdb, the virtual console xterm is also closed,
I just want to enter gdb command line to single step kernel code, how can I do it?
thanks!
[-- Attachment #1.2: Type: text/html, Size: 1127 bytes --]
[-- Attachment #2: Type: text/plain, Size: 375 bytes --]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
[-- Attachment #3: Type: text/plain, Size: 194 bytes --]
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] uml and gdb debugging questions
2006-07-12 1:05 [uml-devel] uml and gdb debugging questions Miao Qingjun
@ 2006-07-12 18:59 ` Blaisorblade
2006-07-13 19:37 ` [uml-devel] [uml-user] " Jeff Dike
1 sibling, 0 replies; 4+ messages in thread
From: Blaisorblade @ 2006-07-12 18:59 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Miao Qingjun, user-mode-linux-user
On Wednesday 12 July 2006 03:05, Miao Qingjun wrote:
> Hi,
>
> I have several problems about uml-2.6.17 and gdb debugging.
>
> I start "gdb uml", "b sys_init_module", then "run",
> but gdb is not break at sys_init_module() when I insmod LKM?
> Why? How can I do it?
Sometimes breakpoints don't work in GDB :-(. An hack was posted: it was based
on recompiling after adding code calling pause() if a variable was set and
setting the variable only from the debugger; however some special care was
needed to avoid gcc recognizing nobody set the variable and optimizing the
check out.
> When I type control-c in gdb, the virtual console xterm is also closed,
This doesn't happen here for what I remember, I used both Ctrl-C and kill -INT
<main pid> to get back the control in the console.
> I just want to enter gdb command line to single step kernel code, how can I
> do it?
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] [uml-user] uml and gdb debugging questions
2006-07-12 1:05 [uml-devel] uml and gdb debugging questions Miao Qingjun
2006-07-12 18:59 ` Blaisorblade
@ 2006-07-13 19:37 ` Jeff Dike
2006-07-14 18:48 ` Blaisorblade
1 sibling, 1 reply; 4+ messages in thread
From: Jeff Dike @ 2006-07-13 19:37 UTC (permalink / raw)
To: Miao Qingjun; +Cc: user-mode-linux-user, user-mode-linux-devel
On Wed, Jul 12, 2006 at 09:05:22AM +0800, Miao Qingjun wrote:
> I start "gdb uml", "b sys_init_module", then "run",
> but gdb is not break at sys_init_module() when I insmod LKM?
> Why? How can I do it?
Some versions of gdb don't work well on UML. One thing that often
works is to attach to UML when it's booted, just before doing whatever
you want to debug.
Jeff
> When I type control-c in gdb, the virtual console xterm is also
> closed,
How are you running UML? You normally can't ^C to get back to gdb
because the UML console has put the terminal in raw mode, so it can
see ^C, ^Z, etc and pass them along to the UML foreground process.
What I normally do is kill -INT <pid>, where pid is the lowest UML
pid.
Jeff
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] [uml-user] uml and gdb debugging questions
2006-07-13 19:37 ` [uml-devel] [uml-user] " Jeff Dike
@ 2006-07-14 18:48 ` Blaisorblade
0 siblings, 0 replies; 4+ messages in thread
From: Blaisorblade @ 2006-07-14 18:48 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Jeff Dike, Miao Qingjun, user-mode-linux-user
On Thursday 13 July 2006 21:37, Jeff Dike wrote:
> On Wed, Jul 12, 2006 at 09:05:22AM +0800, Miao Qingjun wrote:
> > I start "gdb uml", "b sys_init_module", then "run",
> > but gdb is not break at sys_init_module() when I insmod LKM?
> > Why? How can I do it?
>
> Some versions of gdb don't work well on UML. One thing that often
> works is to attach to UML when it's booted, just before doing whatever
> you want to debug.
>
> Jeff
>
> > When I type control-c in gdb, the virtual console xterm is also
> > closed,
>
> How are you running UML? You normally can't ^C to get back to gdb
> because the UML console has put the terminal in raw mode, so it can
> see ^C, ^Z, etc and pass them along to the UML foreground process.
>
> What I normally do is kill -INT <pid>, where pid is the lowest UML
> pid.
I forgot one note - I either attach gdb to UML after boot or boot it with con0
redirected away from fd:0,fd:1.
And I often find that setting a breakpoint after UML has fully booted works
better than setting it before boot. A lot better.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-14 18:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-12 1:05 [uml-devel] uml and gdb debugging questions Miao Qingjun
2006-07-12 18:59 ` Blaisorblade
2006-07-13 19:37 ` [uml-devel] [uml-user] " Jeff Dike
2006-07-14 18:48 ` Blaisorblade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox