[Top][All Lists]

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

debugging a pager

From: Diego Roversi
Subject: debugging a pager
Date: Wed, 19 Dec 2001 22:10:41 +0100
User-agent: Mutt/1.2.5i


  I need some help in debugging a pager. I'm trying to implement a cache in
libstore and I modified the dev_read e dev_write function, but they are used
to serve the page foults. The problem is that the translator died with a
SIGSEGV the first time it tries to access to the file system (to the
superblock). I can attach a gdb to a running translator, but I can't set
breakpoints. So I started my translator using the information find in
"Manually bootstrapping a Translator", but I found that I can set
breakpoints everyware but they are just ignored if used by a pager :-(.

It's quite disappointing. Translators are supposed to be normal process, and
so to be debugged easily...

BTW, the question is: what can I do, beside just putting a lot of printf in

I've also thinked to refactor the ext2fs translator, so it doesn't
explicitaly rely on memory mapping. The idea is to replace explicit access
to mapped memory with something like a pseudo call to bread e bwrite.

I think that They can be implemented with simple macro that just calculate
the memory address and return a pointer to the block. In this way the source
are more similar to linux version, and more important sources are not hard
coupled with current implementation of gnumach. It's also easy to avoid the
address limitation, you just redefine this function. Note that bread and
bwrite function in linux kernel just work with a pointer to the buffered
block: something very similar to my suggested function.


Saluti / Regards

Diego Roversi | diegor at maganet.net
              | diegor at tiscalinet.it 

reply via email to

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