From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pat LaVarre Subject: Re: favourite vfs globals Date: 28 Nov 2003 14:22:48 -0700 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1070054568.2340.50.camel@patrh9> References: <1070053531.2340.40.camel@patrh9> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from email-out2.iomega.com ([147.178.1.83]:54473 "EHLO email.iomega.com") by vger.kernel.org with ESMTP id S263506AbTK1VXR (ORCPT ); Fri, 28 Nov 2003 16:23:17 -0500 Received: from royntex01.iomegacorp.com (unknown [147.178.90.120]) by email.iomega.com (Postfix) with ESMTP id D31092539 for ; Fri, 28 Nov 2003 14:23:16 -0700 (MST) To: linux-fsdevel@vger.kernel.org In-Reply-To: <1070053531.2340.40.camel@patrh9> List-Id: linux-fsdevel.vger.kernel.org > 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. Also I suppose we can't see the global variables of modules this way, except when the modules share those variables with non-module code i.e. code linked into the kernel before boot. I'm guessing wildly from experiences like the following. (gdb) info variables scsi_comm All variables matching regular expression "scsi_comm": File drivers/block/scsi_ioctl.c: const unsigned char scsi_command_size[8]; static const char __kstrtab_scsi_command_size[18]; static const struct kernel_symbol __ksymtab_scsi_command_size; (gdb) # (gdb) print /x scsi_command_size $2 = {0x6, 0xa, 0xa, 0xc, 0x10, 0xc, 0xa, 0xa} (gdb) # (gdb) file /lib/modules/2.6.0-11.udf/kernel/drivers/scsi/scsi_mod.ko warning: core file may not match specified executable file. Load new symbol table from "/lib/modules/2.6.0-11.udf/kernel/drivers/scsi/scsi_mod.ko"? (y or n) y Reading symbols from /lib/modules/2.6.0-11.udf/kernel/drivers/scsi/scsi_mod.ko...done. (gdb) # (gdb) info variables xtime ... (gdb) print xtime Address of symbol "xtime" is unknown. (gdb) # (gdb) info variables scsi_command_size ... (gdb) print scsi_command_size Address of symbol "scsi_command_size" is unknown. (gdb) #