From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29810 invoked by alias); 17 Oct 2006 18:23:15 -0000 Received: (qmail 29801 invoked by uid 22791); 17 Oct 2006 18:23:14 -0000 X-Spam-Check-By: sourceware.org Received: from eos.fwall.u-szeged.hu (HELO eos.fwall.u-szeged.hu) (160.114.120.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Oct 2006 18:23:03 +0000 Received: from localhost ([127.0.0.1] helo=eos.fwall.u-szeged.hu) by eos.fwall.u-szeged.hu with smtp (Exim 4.51) id 1GZtXL-00067U-Ky; Tue, 17 Oct 2006 20:19:35 +0200 Received: from eos.fwall.u-szeged.hu ([127.0.0.1]) by eos.fwall.u-szeged.hu (SMSSMTP 4.1.11.41) with SMTP id M2006101720193511542 ; Tue, 17 Oct 2006 20:19:35 +0200 Received: from iris.cc.u-szeged.hu ([160.114.8.100]) by eos.fwall.u-szeged.hu with esmtp (Exim 4.51) id 1GZtXL-000680-Gm; Tue, 17 Oct 2006 20:19:35 +0200 Received: from www by iris.cc.u-szeged.hu with local (Exim 4.51) id 1GZtXL-00064x-76; Tue, 17 Oct 2006 20:19:35 +0200 Received: from 84.236.21.163 ([84.236.21.163]) by www.stud.u-szeged.hu (Horde MIME library) with HTTP; Tue, 17 Oct 2006 20:19:34 +0200 Message-ID: <20061017201934.col8270y88s0wgg4@www.stud.u-szeged.hu> Date: Tue, 17 Oct 2006 18:23:00 -0000 From: Turny =?iso-8859-2?b?ROF2aWQ=?= To: Michael Snyder , Daniel Jacobowitz Cc: gdb@sourceware.org Subject: "cannot find bounds of current function" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) X-SZTE-local: YES X-SZTE-HU-local: YES X-SZTE-AVcheck: YES Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00127.txt.bz2 Hi, Thak You! The details: My target is remote, the AT91SAM7S256 microcontoller. It has ARM7TDMI=20=20 core. The architecture of it is armv4t. I use the openOCD created by Dominic Rath. Thank you Dominic! :) I didnt try this on Linux only on window$ yet. I can use the yagarto=20=20 (native) or the sourcery g++ toolchain (native, but it can use the=20=20 cygwin as well)...the problem is the same in either case. The code which I like to debug is this: /*test.c*/ main () { /*This is just a test code, meaningless.*/ int a; int b; while (1) { a=3D2; b=3D3; a+=3Db; } } COMPILE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I compile with these parameters: > CC -march=3Darmv4t -mcpu=3Darm7tdmi -LE -g -gdwarf-2 -o test.elf test= .c where CC is arm-none-eabi-gcc (sourcery g++) or arm-elf-gcc (yagarto). After that I create a .bin file. > OB -O binary test.elf test.bin Where OB is arm-none-eabi-objcopy (sourcery g++) or=20=20 arm-elf-objcopy (yagarto) I can compile without any error or warning message. I load the test.bin in the flash using JTAG wiggler interface and the openOCD. OPENOCD =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D My openOCD config file contain these lines: #Deamon configuration gdb_port 3333 telnet_port 4444 deamon_startup attach #JTAG interface configuration interface parport jtag_speed 0 reset_config srst_only jtag_device 4 0x1 0xf 0xe #jtag_nsrst_delay #jtag_ntrst_delay #Parport options parport_port 0x378 parport_cable wiggler #target configuration target arm7tdmi little reset_halt 0 arm7tdmi #run_and_halt_time #working_area #Flash configuration flash bank at91sam7 0 0 0 0 0 After the start I have got 2 info: info: openocd.c:82 main(): Open On-Chip Debbuger (2006-09-28 20:00 CE= ST) info: configuration.c:50 configuration_output_handler(): Command deamon_startup not found I dont know what is mean the second one, but there is no problem in dur= ing the flash write. I load the test.bin in the flash using telnet. LOAD the test.bin =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Start the telnet: >telnet localhost 4444 I get a prompt like this: Open On-Chip Debugger > The sequence is: >soft reset >flash erase 0 0 15 >flash write 0 test.bin 0 >soft reset >arm7_9 sw_bkpts enable This works well. Debug =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I use the arm-elf or the arm-none-eabi gdb...I will sign this just gdb. start: >gdb test.elf then it write some line information about himself. I think maybe=20=20 this would be important: This GDB was configured as "--host=3Di686-pc-mingw32=20=20 --target=3Darm-elf" ... (yagarto) =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 --target=3Darm-none-eabi" ...(sourcery g++) I have a celeron 800MHz. Then I connect to the remote target (the prompt is (gdb) now ) (gdb)target remote localhost:3333 Remote debugging using localhost:3333 0x000048a0 in ?? () (gdb) Now if I try to execute a "step" or "next" I see: (gdb)next Cannot find bounds of current function (gdb)step Cannot find bounds of current function Daniel Jacobowitz wrote me I am not in the main().I have to make a breakpoint at the entry of the main and execute the continue command. Thank You Daniel! If I do this then: (gdb)break main Breakpoint 1 at 0x821c: file test.c, line 6. (gdb)continue Continuing. Thats all...I dont get back the (gdb) prompt...:( Where is the mistake? What I can do? Please somebody help me! The list command is alright and I can debug assembly code without any trouble. Thank You! David ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.