From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23527 invoked by alias); 13 Sep 2007 16:49:32 -0000 Received: (qmail 23518 invoked by uid 22791); 13 Sep 2007 16:49:32 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Sep 2007 16:49:24 +0000 Received: (qmail 15208 invoked from network); 13 Sep 2007 16:49:23 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 13 Sep 2007 16:49:23 -0000 To: wang Cc: gdb@sourceware.org Subject: Re: help !why cannot i get core file? References: <9d174ef60709130134n10fec073r6319f337b8cff9d1@mail.gmail.com> From: Jim Blandy Date: Thu, 13 Sep 2007 18:28:00 -0000 In-Reply-To: <9d174ef60709130134n10fec073r6319f337b8cff9d1@mail.gmail.com> (wang's message of "Thu, 13 Sep 2007 16:34:57 +0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2007-09/txt/msg00122.txt.bz2 wang writes: > hi all > i use fedora 7.debug a device based on arm + linux using gdb on > fedora and gdbserver on device. > [root@wang wang]# ulimit -a > core file size (blocks, -c) unlimited > data seg size (kbytes, -d) unlimited > scheduling priority (-e) 0 > file size (blocks, -f) unlimited > pending signals (-i) 2560 > max locked memory (kbytes, -l) 32 > max memory size (kbytes, -m) unlimited > open files (-n) 1024 > pipe size (512 bytes, -p) 8 > POSIX message queues (bytes, -q) 819200 > real-time priority (-r) 0 > stack size (kbytes, -s) 10240 > cpu time (seconds, -t) unlimited > max user processes (-u) 2560 > virtual memory (kbytes, -v) unlimited > file locks (-x) unlimited Unless I'm missing something, this ulimit command shows the limits you've set on your host machine --- the machine running GDB --- and not on the target machine --- the machine that's running the program you want to debug. You'll need to make sure that core dumps are enabled in the kernel running on your target machine, and make sure that ulimit -c is set appropriately *on that machine*. > [root@wang wang]# > > [root@wang wang]# /usr/local/arm-linux/bin/arm-linux-gdb -q > (gdb) file /home/wang/master/master.exe > Reading symbols from /home/wang/master/master.exe...done. > (gdb) target remote 192.168.1.203:2323 > Remote debugging using 192.168.1.203:2323 > Cannot access memory at address 0x0 > 0x40001b80 in ?? () > (gdb) c > Continuing. > > Program received signal SIGSEGV, Segmentation fault. > Cannot access memory at address 0x5a4 > 0x40046ca4 in ?? () This message means that GDB doesn't have debugging information for the code at 0x40046ca4. Are you running master.exe under gdbserver on the target machine? Did you compile master.exe with -g?