linux-mips
[Top] [All Lists]

Re: Can't debug core files with GDB

To: Tony Lin <lin.tony@gmail.com>
Subject: Re: Can't debug core files with GDB
From: Daniel Jacobowitz <dan@debian.org>
Date: Thu, 25 May 2006 09:35:29 -0400
Cc: ashley jones <ashley_jones_2000@yahoo.com>, linux-mips@linux-mips.org
In-reply-to: <404548f40605241844y41b897b6sb8a7512feb8655f6@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <404548f40605171139i67084776pd9ae7c34ec19ec95@mail.gmail.com> <20060524081406.90333.qmail@web38407.mail.mud.yahoo.com> <404548f40605241844y41b897b6sb8a7512feb8655f6@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11+cvs20060403
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

<Prev in Thread] Current Thread [Next in Thread>