Ludovic Courtès wrote: >Hi, > >>After reading from the pager there happens a weird thing: >> >>Breakpoint 1, pager_read_page (pager=0x8055528, page=0, >>buf=0x128bd7c, writelock=0x128bd80) at pager.c:554 >>554 { >>(gdb) p pager >>$1 = (struct user_pager_info *) 0x0 >>(gdb) p (struct user_pager_info *) pager_get_upi >>(diskfs_root_node->dn->pager) >>$2 = (struct user_pager_info *) 0x8055528 >> >>The value in pager seems to be random (now it is zero but sometimes it >>has other values). >> >>I compile with the following in CFLAGS: -O -g -D_GNU_SOURCE -Wall >> > >I got the same kind of problem. First of all, I think you should not compile >with optimization if you want to debug it with gdb (otherwise you get weird >think). But the problem with those random values could be many things (of >course ;), but what you could check is whether your code is overriding the >stack at some point (for instance, check how much memory is allocated for >your struct dirent and so on). >
It was the optimization. I printed pager (pager was in cx), but the value wasn't copied from the stack to cx. Using "next" in gdb solved the problem because after that the value was loaded. Just a stupid mistake of me but thanks for your response :-) > >Hope it helps. > >Ludovic. > _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd