From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 25 May 2006 15:35:42 +0200 (CEST) Received: from nevyn.them.org ([66.93.172.17]:52415 "EHLO nevyn.them.org") by ftp.linux-mips.org with ESMTP id S8134080AbWEYNfe (ORCPT ); Thu, 25 May 2006 15:35:34 +0200 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FjFzu-0008At-12; Thu, 25 May 2006 09:35:30 -0400 Date: Thu, 25 May 2006 09:35:29 -0400 From: Daniel Jacobowitz To: Tony Lin Cc: ashley jones , linux-mips@linux-mips.org Subject: Re: Can't debug core files with GDB Message-ID: <20060525133529.GA31379@nevyn.them.org> References: <404548f40605171139i67084776pd9ae7c34ec19ec95@mail.gmail.com> <20060524081406.90333.qmail@web38407.mail.mud.yahoo.com> <404548f40605241844y41b897b6sb8a7512feb8655f6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <404548f40605241844y41b897b6sb8a7512feb8655f6@mail.gmail.com> User-Agent: Mutt/1.5.11+cvs20060403 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 11549 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: dan@debian.org Precedence: bulk X-list: linux-mips On Wed, May 24, 2006 at 06:44:26PM -0700, Tony Lin wrote: > I've pretty much concluded the gdb is not at fault. Loading a coredump > generated by another mips-linux system, it was able to read the > registers correctly and lookup the program counter. > > So the problem now is my 32-bit mips-linux is generating core files in > a different format than what gdb expects. I've been digging into > fs/exec.c and fs/binfmt_elf.c without much success. Are there > documents describing the expected coredump header format? No. But... > I'm not really familiar with the register terminology (fpu? xfpregs?) > so am having some trouble figuring out where linux write the program > counter into the core dump. Take a look at asm-mips/elf.h and IIRC arch/mips/kernel/process.c. Or, trace the macros through binfmt_elf.c, where it creates NOTE sections. -- Daniel Jacobowitz CodeSourcery