linux-mips
[Top] [All Lists]

Can't debug core files with GDB

To: linux-mips@linux-mips.org
Subject: Can't debug core files with GDB
From: "Tony Lin" <lin.tony@gmail.com>
Date: Tue, 16 May 2006 17:02:35 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Rs/wj3cZhWQ5oJS+wmz+qqIotS+MLwUb6HErxJCnmsNP7liwm29CxQWKNsi49a8IOEjgD1LBqR9PFPVbNE3iTcr/a+EMUDCLNdLDIm0ZQ2QKKyaeJz51Eo2J7XQRbQhqRcQcYL9PxHob18y/xSect3csZajlRv1D8jX56p6kKf4=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi there,

I have a gdb-6.4 that I cross-compiled for mips-linux. Along with my
test program, I can use gdb to walk the code execution just fine, but
is unable to read core dumps. Maybe you guys can spot if I did
something wrong.

Machine used to compile gdb:
---
i386-linux, using cross-compiled mips toolchain (gcc 3.4.3, glibc 2.3.2)
target kernel is mips-linux-2.6.6

gdb was configured with:
---
export CC=mipsisa32-linux-gcc
export AR=mipsisa32-linux-ar
../gdb/configure --build=i386-linux --host=mips-linux
--target=mips-linux --disable-sim

resulting gdb file:
gdb: ELF 32-bit MSB executable, MIPS, version 1 (SYSV), for GNU/Linux
2.4.3, dynamically linked (uses shared libs), not stripped


When I force a core file and try to debug it, I get empty values:

./gdb ./nebtest ./core.524.nebtest

GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "mips-linux"...Using host libthread_db
library "/lib/libthread_db.so.1".

Core was generated by `./nebtest'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
#0  0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x00000000 in ?? ()







Any idea what this may be? It's strange because if I just do 'gdb
nebtest' I can step through the program just fine. It's reading core
files that fail.

Thanks much!

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