This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Kernel symbol table


Hi Michael,

Thanks for the reply. However, there are a couple of problems with
looking at vmlinux.

1. When I haven't built the kernel myself, I don't have the vmlinux file.
2. When I am remotely connected to a machine, I don't really have the
vmlinux file with me.

Hence, rather that getting the info statically from file, it would be
great to read it directly from the memory of the target.

-Shri

On Thu, Apr 9, 2009 at 11:44 AM, Michael Snyder <msnyder@vmware.com> wrote:
> 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
>
>



-- 
Discover the 'web' of videos
www.videonym.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]