All of lore.kernel.org
 help / color / mirror / Atom feed
* Debugging Reiser4 with UML in 2.5
@ 2002-12-10 21:52 Jon Smirl
  2002-12-10 22:09 ` Hans Reiser
  2002-12-11  8:01 ` Oleg Drokin
  0 siblings, 2 replies; 3+ messages in thread
From: Jon Smirl @ 2002-12-10 21:52 UTC (permalink / raw)
  To: reiserfs-list

I'm trying to give the new Reiser4 a whirl with UML in
a 2.5 kernel. I can't seem to figure out how to make
gdb work right in this setup. I've heard that UML is
being used to develop Reiser4 so maybe you can give me
some pointers.

I have the 2.4.59 kernel built with UML and Reiser4 in
it. I can boot and come to a prompt. I can mount my
reiser4 volume and make files on it, etc..

Now I start up ddd on the host and attach to the
tracing thread for UML. I add a "br reiser4_read" and
continue.

From the UML prompt I cat a file. My UML console
prints out "Trace/breakpoint trap" and continues.

How do I get a gdb hooked to the right process so that
it will catch the breakpoint?


=====
Jon Smirl
jonsmirl@yahoo.com

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

* Re: Debugging Reiser4 with UML in 2.5
  2002-12-10 21:52 Debugging Reiser4 with UML in 2.5 Jon Smirl
@ 2002-12-10 22:09 ` Hans Reiser
  2002-12-11  8:01 ` Oleg Drokin
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Reiser @ 2002-12-10 22:09 UTC (permalink / raw)
  To: Jon Smirl; +Cc: reiserfs-list, Oleg Drokin

Jon Smirl wrote:

>I'm trying to give the new Reiser4 a whirl with UML in
>a 2.5 kernel. I can't seem to figure out how to make
>gdb work right in this setup. I've heard that UML is
>being used to develop Reiser4 so maybe you can give me
>some pointers.
>
>I have the 2.4.59 kernel built with UML and Reiser4 in
>it. I can boot and come to a prompt. I can mount my
>reiser4 volume and make files on it, etc..
>
>Now I start up ddd on the host and attach to the
>tracing thread for UML. I add a "br reiser4_read" and
>continue.
>
>>From the UML prompt I cat a file. My UML console
>prints out "Trace/breakpoint trap" and continues.
>
>How do I get a gdb hooked to the right process so that
>it will catch the breakpoint?
>
>
>=====
>Jon Smirl
>jonsmirl@yahoo.com
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>http://mailplus.yahoo.com
>
>
>  
>
Oleg will answer your questions in 9 hours (we are in Moscow)....


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

* Re: Debugging Reiser4 with UML in 2.5
  2002-12-10 21:52 Debugging Reiser4 with UML in 2.5 Jon Smirl
  2002-12-10 22:09 ` Hans Reiser
@ 2002-12-11  8:01 ` Oleg Drokin
  1 sibling, 0 replies; 3+ messages in thread
From: Oleg Drokin @ 2002-12-11  8:01 UTC (permalink / raw)
  To: Jon Smirl; +Cc: reiserfs-list

Hello!

On Tue, Dec 10, 2002 at 01:52:37PM -0800, Jon Smirl wrote:
> I'm trying to give the new Reiser4 a whirl with UML in
> a 2.5 kernel. I can't seem to figure out how to make
> gdb work right in this setup. I've heard that UML is
> being used to develop Reiser4 so maybe you can give me
> some pointers.

Sure. Later on I assume that you use tt mode of UML (particularly
because skas mode is not very usable with reiser4 right now).

> I have the 2.4.59 kernel built with UML and Reiser4 in
> it. I can boot and come to a prompt. I can mount my
> reiser4 volume and make files on it, etc..

That's good.

> Now I start up ddd on the host and attach to the
> tracing thread for UML. I add a "br reiser4_read" and
> continue.

Hm. First of all you need to compile your UML with CONFIG_DEBUGSYM
and CONFIG_PT_PROXY config options.

> >From the UML prompt I cat a file. My UML console
> prints out "Trace/breakpoint trap" and continues.
> 
> How do I get a gdb hooked to the right process so that
> it will catch the breakpoint?

Run gdb with these two options:
debug=parent gdb-pid=<pid>
where <pid> is pid of gdb process started by your ddd instance.
UML will stop after loading, now in ddd type 
'att 1' (without quotes)
You will see something like this:
0xa013dc51 in __kill ()

Now put all of the breakpoints you are interested in and this kind of stuff
and execute 'c' command to continue UML boot.
After that it works like a debugging userspace threaded program.
See http://user-mode-linux.sourceforge.net/debugging.html fore more info.

Bye,
    Oleg

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

end of thread, other threads:[~2002-12-11  8:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-10 21:52 Debugging Reiser4 with UML in 2.5 Jon Smirl
2002-12-10 22:09 ` Hans Reiser
2002-12-11  8:01 ` Oleg Drokin

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.