public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pat LaVarre <p.lavarre@ieee.org>
To: linux-fsdevel@vger.kernel.org
Subject: Re: favourite vfs globals
Date: 28 Nov 2003 14:43:59 -0700	[thread overview]
Message-ID: <1070055839.3518.6.camel@patrh9> (raw)
In-Reply-To: <1070054568.2340.50.camel@patrh9>

> > Which vfs globals are the most fun, in lk like 2.6.0-test11?

"That question I can't yet answer, but":

> > gdb vmlinux /proc/kcore
> > ... this approach to gdb takes a blurry snapshot of kernel memory and
> > then walks us thru a stale copy of all the bits.
> 
> ... we ... see the global variables of modules this way,
> ... when the modules share those variables with non-module code i.e.
> code linked into the kernel before boot.

I see directly adding a global to a module does not work:

  MODPOST
*** Warning: "hello_gdb" [fs/udf/udf.ko] undefined!
 
Ouch.

I'll go ask the kernelnewbies list to comment.

Pat LaVarre

diff -Nur linux-2.6.0-test11/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
--- linux-2.6.0-test11/drivers/block/ll_rw_blk.c	2003-11-26 13:42:58.000000000 -0700
+++ linux/drivers/block/ll_rw_blk.c	2003-11-28 14:29:53.613346536 -0700
@@ -2445,6 +2445,9 @@
 	}
 }
 
+extern int hello_gdb;
+int hello_gdb = 'P';
+
 static int __end_that_request_first(struct request *req, int uptodate,
 				    int nr_bytes)
 {
diff -Nur linux-2.6.0-test11/fs/udf/super.c linux/fs/udf/super.c
--- linux-2.6.0-test11/fs/udf/super.c	2003-11-26 13:44:41.000000000 -0700
+++ linux/fs/udf/super.c	2003-11-28 14:25:31.248232096 -0700
@@ -189,10 +189,15 @@
 	struct nls_table *nls_map;
 };
 
+extern int hello_gdb;
+
 static int __init init_udf_fs(void)
 {
 	int err;
 	printk(KERN_NOTICE "udf: registering filesystem\n");
+	printk(KERN_NOTICE "udf: before incrementing hello_gdb\n");
+	++hello_gdb;
+	printk(KERN_NOTICE "udf: after incrementing hello_gdb\n");
 	err = init_inodecache();
 	if (err)
 		goto out1;



  reply	other threads:[~2003-11-28 21:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-28 21:05 favourite vfs globals Pat LaVarre
2003-11-28 21:22 ` Pat LaVarre
2003-11-28 21:43   ` Pat LaVarre [this message]
2003-11-28 21:51     ` Pat LaVarre
2003-11-28 22:42       ` Pat LaVarre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1070055839.3518.6.camel@patrh9 \
    --to=p.lavarre@ieee.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox