From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12029 invoked by alias); 27 May 2005 08:40:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 12009 invoked by uid 22791); 27 May 2005 08:40:14 -0000 Received: from blaster.systems.pipex.net (HELO blaster.systems.pipex.net) (62.241.163.7) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 27 May 2005 08:40:14 +0000 Received: from ezer1.homenet (81-86-65-15.dsl.pipex.com [81.86.65.15]) by blaster.systems.pipex.net (Postfix) with ESMTP id 3410CE000135; Fri, 27 May 2005 09:40:10 +0100 (BST) Date: Fri, 27 May 2005 08:40:00 -0000 From: Tigran Aivazian X-X-Sender: tigran@ezer.homenet To: Vasu S Cc: gdb@sources.redhat.com Subject: Re: kernel debugging with gdb In-Reply-To: <2acab652050527013212d1ecfe@mail.gmail.com> Message-ID: References: <2acab652050527013212d1ecfe@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-SW-Source: 2005-05/txt/msg00344.txt.bz2 Hello Vasu, First of all, access to /proc/kcore (and /dev/kmem) is explicitly disabled on some distributions (e.g. Red Hat) as they consider it a security issue. Second, what you were trying to do wouldn't allow to debug the kernel anyway. At best (if the kernel was compiled with -g) you would get access to dump data variables like jiffies. Third, to actually debug the kernel using gdb you need to go to kgdb homepage: http://kgdb.linsyssoft.com/ and download the bits and pieces you need. If you are running on x86_64 architecture and wish to debug modules (as opposed to just statically linked kernel bits) then you will also need my fixes to the gdb patch which I can email you. Kind regards Tigran On Fri, 27 May 2005, Vasu S wrote: > Hello all, > > I am trying to use gdb for kernel debugging. I am getting the following error > > # gdb vmlinux /proc/kcore > > /proc/kcore: Operation not permitted. > (gdb) > > I have compiled the kernel with debug options enabled. I am on 2.6.5 kernel. > Can someone tell me what could be the problem here? Any help is appreciated. > > Thanks, > Vasu >