linux-mips
[Top] [All Lists]

Re: Can't debug core files with GDB

To: Daniel Jacobowitz <dan@debian.org>
Subject: Re: Can't debug core files with GDB
From: Johannes Stezenbach <js@linuxtv.org>
Date: Fri, 26 May 2006 13:39:43 +0200
Cc: Tony Lin <lin.tony@gmail.com>, ashley jones <ashley_jones_2000@yahoo.com>, linux-mips@linux-mips.org
In-reply-to: <20060526024540.GA16815@nevyn.them.org>
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> <20060525133529.GA31379@nevyn.them.org> <404548f40605251750s2708df73td50a4e9db755408f@mail.gmail.com> <20060526024540.GA16815@nevyn.them.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11+cvs20060403
On Thu, May 25, 2006, Daniel Jacobowitz wrote:
> On Thu, May 25, 2006 at 05:50:56PM -0700, Tony Lin wrote:
> 
> [2.4]
> 
> >       /*
> >        * saved cp0 registers
> >        */
> >       unsigned long cp0_epc;
> >       unsigned long cp0_badvaddr;
> >       unsigned long cp0_status;
> >       unsigned long cp0_cause;
> 
> [2.6]
> 
> >       /* Saved special registers. */
> >       unsigned long cp0_status;
> >       unsigned long lo;
> >       unsigned long hi;
> >       unsigned long cp0_badvaddr;
> >       unsigned long cp0_cause;
> >       unsigned long cp0_epc;
> 
> > Notice how the offsets has changed, no idea why this was done. I
> > loaded the core file in the hex dump, and sure enough it is dumped
> > with this new ordering.
> > 
> > I guess gdb is still trying to decode using the old pt_regs format. Is
> > it correct to modify gdb to use this new format? Or modify linux to
> > output using the old format?

BTW, buildroot has a 400-mips-coredump.patch-2.4.23-29 patch.
http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gdb/

However, I've built a toolchain using gcc-3.4.4, uClibc 0.9.27-cvs,
gdb 6.3, kernel 2.6.13, and I had to build without the
buildroot 400-mips-coredump.patch-2.4.23-29 patch. Without
it my gdb can read coredumps without problems.


Johannes

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