From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24613 invoked by alias); 1 Oct 2008 21:32:53 -0000 Received: (qmail 24600 invoked by uid 22791); 1 Oct 2008 21:32:52 -0000 X-Spam-Check-By: sourceware.org Received: from mail-gx0-f10.google.com (HELO mail-gx0-f10.google.com) (209.85.217.10) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Oct 2008 21:32:17 +0000 Received: by gxk3 with SMTP id 3so823244gxk.0 for ; Wed, 01 Oct 2008 14:32:14 -0700 (PDT) Received: by 10.150.147.9 with SMTP id u9mr12753038ybd.191.1222896734425; Wed, 01 Oct 2008 14:32:14 -0700 (PDT) Received: by 10.150.198.5 with HTTP; Wed, 1 Oct 2008 14:32:14 -0700 (PDT) Message-ID: Date: Wed, 01 Oct 2008 21:32:00 -0000 From: rdtorres@gmail.com To: gdb@sourceware.org Subject: CoreDump -- Cannot access memory MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00010.txt.bz2 Hi all, First of all sorry to send an email to linuxsh-dev list directly, I doing it because my attempt to use linux-sh@m17n.org fail (its site is down). My problem: I trying to analyse a core-dump of "Hello-world" like app that is running on SH4-STLinux, but it fails. gdb gives me : /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-gdb mysand core GNU gdb STMicroelectronics/Linux Base 6.4-12 [build Oct 15 2006] 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 "--host=i686-pc-linux-gnu --target=sh4-linux"... warning: exec file is newer than core file. Core was generated by `./mysand'. Program terminated with signal 6, Aborted. Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/usr/lib/libstdc++.so.6...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/usr/lib/libstdc++.so.6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libm.so.6...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libm.so.6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libgcc_s.so.1...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libgcc_s.so.1 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/libc.so.6...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 Reading symbols from /opt/7109/STM/STLinux-2.2/devkit/sh4/target/lib/ld-linux.so.2...done. Loaded symbols for /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/ld-linux.so.2 #0 0x297382d4 in raise () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 (gdb) bt full #0 0x297382d4 in raise () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 No symbol table info available. #1 0x29739dd6 in abort () from /opt/7109/STM/STLinux-2.2/devkit/sh4/bin/../target/lib/libc.so.6 No symbol table info available. Cannot access memory at address 0x7b916ff8 My program code: #include extern void m1(); static int count = 0; void m3(){ if (count++ > 2) abort(); m1(); } void m2(){ m3(); } void m1 (){ m2(); } int main (int argc, char* argv[]) { m1(); return 0; } I compiled it with /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-g++ -g -o mysand sandbox.cpp I've tried -fstack-protector-all option without success too. Before running it on STLinux I'm running: ulimited -c unlimited. Do you have any idea why the stack of my core-dump is broken ? Ps. Note that the memory address is a huge address ( 0x7b916ff8 ). Thanks in advance, Rafael Torres