[PATCH] /proc/kcore linux2.2.10

Matthias Welwarsky (h-takaha@sss.abk.nec.co.jp)
Wed, 07 Jul 1999 20:57:56 +0900


Hello.

Is there anyone using gdb with /proc/kcore?
I can't;_; Gdb dose not work correctly.

# gdb /usr/src/linux/vmlinux /proc/kcore
(gdb) print jiffies
$1 = 0

I realized uninitialized dump-header makes gdb not be
able to translate virtual-address into file-offset.

I think dump-header should be initialized like this:
This is the patch to 2.2.10.

Hirokazu Takahashi

diff -u linux/fs/proc/array.c:1.1.1.3 linux/fs/proc/array.c:1.4
--- linux/fs/proc/array.c:1.1.1.3 Wed Jul 7 18:45:58 1999
+++ linux/fs/proc/array.c Wed Jul 7 18:45:58 1999
@@ -93,6 +93,9 @@
memset(&dump, 0, sizeof(struct user));
dump.magic = CMAGIC;
dump.u_dsize = max_mapnr;
+#if defined (__i386__)
+ dump.start_code = PAGE_OFFSET;
+#endif
#ifdef __alpha__
dump.start_data = PAGE_OFFSET;
#endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/