From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11584 invoked by alias); 9 Apr 2009 18:48:41 -0000 Received: (qmail 11571 invoked by uid 22791); 9 Apr 2009 18:48:40 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Apr 2009 18:48:27 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id F24B03C00A; Thu, 9 Apr 2009 11:48:25 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost2.vmware.com (Postfix) with ESMTP id CA3AF8E5CF; Thu, 9 Apr 2009 11:48:25 -0700 (PDT) Message-ID: <49DE4219.9020606@vmware.com> Date: Thu, 09 Apr 2009 19:00:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Shrinand Javadekar CC: "gdb@sourceware.org" Subject: Re: Kernel symbol table References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00093.txt.bz2 Shrinand Javadekar wrote: > Hi All, > > I have gdb attached to a running kernel. Even if the kernel was not > built with symbols, there should be some symbols exported by the > kernel right? The ones exported by using EXPORT_SYMBOL; e.g. sys_open, > sys_close, etc. > > I believe these symbols are kept in the kernel symbol table. The > question I have is, how do I access this symbol table? > > Also, does the kernel do anything special about where to keep (at what > address) this symbol table? > > Thanks in advance. > -Shri Shri, If you build the kernel, the symbol file will be called "vmlinux" in the top level of your build tree. This is an elf file that gdb can read. You do not want the compressed file called "vmlinuz" (note 'z'). That file is not elf. Cheers, Michael