From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30311 invoked by alias); 18 Dec 2012 11:56:58 -0000 Received: (qmail 30303 invoked by uid 22791); 18 Dec 2012 11:56:57 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,TW_XC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.17.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Dec 2012 11:56:51 +0000 Received: from mailout-de.gmx.net ([10.1.76.39]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MGUSk-1TpLeL2MSW-00DFQp for ; Tue, 18 Dec 2012 12:56:49 +0100 Received: (qmail 26525 invoked by uid 0); 18 Dec 2012 11:56:49 -0000 Received: from 217.31.17.2 by www027.gmx.net with HTTP; Tue, 18 Dec 2012 12:56:48 +0100 (CET) Cc: ecos-discuss@ecos.sourceware.org Content-Type: text/plain; charset="utf-8" Date: Tue, 18 Dec 2012 11:56:00 -0000 From: "Bernd Schuster" In-Reply-To: <50D0453D.4090409@dallaway.org.uk> Message-ID: <20121218115648.274280@gmx.net> MIME-Version: 1.0 References: <20121217172456.214150@gmx.net> <50CF6BE2.1020305@dallaway.org.uk> <20121217210437.182230@gmx.net> <50D0453D.4090409@dallaway.org.uk> To: John Dallaway Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Re: GDB stub support X-SW-Source: 2012-12/txt/msg00035.txt.bz2 Hi John, > If you specify the ELF executable filename when you launch GDB then > symbols will be loaded automatically. You can just use "load" with no > filename and "continue" to start execution. The section records in the > elf file will indicate where each section must be loaded. You do not > need to specify the addresses manually. > Thank you for your help. Could you tell me the reason why the symbol table won`t be loaded or usable starting GDB without specifying a executable? I can`t see the difference. > bash$ mipsisa32-elf-gdb myProgram.elf > (gdb) target remote > (gdb) load > (gdb) break web_init > (gdb) continue > > I hope this helps... Yes it helps a lot. I`m now able to set a breakpoint to a specific function like "web_init" without any error message. (gdb) break web_init Breakpoint 1 at 0x80202054: file ../../.../web.c, line 231. Warning: the current language does not match this frame. (gdb) break web.c:1549 No line 1549 in file "../../.../web.c". Viewing the web.c file by Kwrite, the file will have more than 1549 lines of code. For example, the function "web_init" starts at line 1509 instead of line 231 (recognized by GDB). Could you tell me where the difference will come from and if there`s a trick to specify a breakpoint at the correct line number? (gdb) set remotebaud 115200 (gdb) target remote /dev/ttyS0 Remote debugging using /dev/ttyS0 0x8000c44c in ?? () (gdb) load Loading section .rom_vectors, size 0xcc lma 0x80040000 Loading section .rel.dyn, size 0x6c0 lma 0x800400cc Loading section .text, size 0x313eac lma 0x8004078c Loading section .rodata, size 0xab630 lma 0x80354638 Loading section .data, size 0xf3828 lma 0x803ffc68 Loading section .ctors, size 0x68 lma 0x804f3490 Loading section .dtors, size 0x44 lma 0x804f34f8 Loading section .devtab, size 0x792c lma 0x804f353c Start address 0x800400bc, load size 4959848 Transfer rate: 10 KB/sec, 666 bytes/write. (gdb) step warning: GDB can't find the start of the function at 0x8000c44c. GDB is unable to find the start of the function at 0x8000c44c and thus can't determine the size of that function's stack frame. This means that GDB may be unable to access that stack frame, or the frames below it. This problem is most likely caused by an invalid program counter or stack pointer. However, if you think GDB should simply search farther back from 0x8000c44c for code which looks like the beginning of a function, you can increase the range of the search using the `set heuristic-fence-post' command. Cannot find bounds of current function (gdb) continue Continuing. Unfortunately my software application is not running as expected. It seems to me that the app won`t be executed at all. Using Redboot bootloader to download the elf image by xmodem (at 0x80040000) I just use the command go 0x800400BC and the programm will run. Do you have any hints where the problem could be? best regards Bernd > > John Dallaway > eCos maintainer > http://www.dallaway.org.uk/john > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss