Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Turny Dávid" <Turny.David@stud.u-szeged.hu>
To: Michael Snyder <Michael.Snyder@palmsource.com>,
	Daniel Jacobowitz 	<drow@false.org>
Cc: gdb@sourceware.org
Subject: "cannot find bounds of current function"
Date: Tue, 17 Oct 2006 18:23:00 -0000	[thread overview]
Message-ID: <20061017201934.col8270y88s0wgg4@www.stud.u-szeged.hu> (raw)

Hi,

Thak You! The details:
My target is remote, the AT91SAM7S256 microcontoller. It has ARM7TDMI  
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  
(native) or the sourcery g++ toolchain (native, but it can use the  
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=2;
       b=3;
       a+=b;
    }
}
COMPILE
==========
    I compile with these parameters:
    > CC -march=armv4t -mcpu=arm7tdmi -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  
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
==========
    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 CEST)
    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 during
    the flash write. I load the test.bin in the flash using telnet.


LOAD the test.bin
===================
    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
=====================
    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  
this would be
    important:
     This GDB was configured as  "--host=i686-pc-mingw32  
--target=arm-elf" ...      (yagarto)
                                                          
--target=arm-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.


             reply	other threads:[~2006-10-17 18:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-17 18:23 Turny Dávid [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-17 18:50 Turny Dávid
2006-10-17 20:20 ` Michael Snyder
2006-10-16  1:05 Turny Dávid
2006-10-16  9:16 ` Daniel Jacobowitz
2006-10-17  2:37 ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061017201934.col8270y88s0wgg4@www.stud.u-szeged.hu \
    --to=turny.david@stud.u-szeged.hu \
    --cc=Michael.Snyder@palmsource.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox