From: Michael Snyder <msnyder@specifix.com>
To: Roman Mashak <romez777@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: gdb for AT91SAM7
Date: Wed, 14 May 2008 18:13:00 -0000 [thread overview]
Message-ID: <1210788778.4615.590.camel@localhost.localdomain> (raw)
In-Reply-To: <40a670230805140042m311ccf04xb948628d0fa4532c@mail.gmail.com>
On Wed, 2008-05-14 at 00:42 -0700, Roman Mashak wrote:
> Hello.
>
> My question concerns to debugging of embedded code on AT91SAM7
> targets. Briefly about the background of the problem:
> 1) I'm using gdb-6.8.50.20080308-cvs
> 2) toolchain is based on gcc-4.2.2 for Windows
> 3) JTAG is by Segger, they also provide GDB server
>
> What I'm trying to do is to debug step-by-step the C-startup, written
> in ARM assembly language in order to clearly understand the process of
> chip initialization, peripheral setup and other low-level stuffs.
>
> I compiled C-startup and my simple application (printing string out of
> the USRT), with "-gdwarf-2 -O0" options as recommended. Then I run
> gdb, attach to the target. Since the application is linked to 0x100000
> I set breakpoint on this address:
When you say the application is linked to 0x100000,
do you mean that that is the start address?
> #arm-elf-gdb main.elf
> #target remote localhost:2331
> #break *0x100000
> #continue
> Continuing.
> ...
>
> At this point it hangs and doesn't step over. But if I do "jump
> *0x100000" right after setting up the breakpoint, it works! This is
> kind of strange, isn't it?
Before you say "continue", or "jump *0x100000", if you
ask gdb for the current instruction pointer (presumably
"info reg pc"), what does it say?
I've had somewhat similar problems in the past. The
start address is special in many ways, and so is the
whole start-up process.
Can you try setting your breakpoint at the 2nd or 3rd
instruction after the start address?
prev parent reply other threads:[~2008-05-14 18:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 7:43 Roman Mashak
2008-05-14 11:39 ` Daniel Jacobowitz
2008-05-14 23:39 ` Roman Mashak
2008-05-14 18:13 ` Michael Snyder [this message]
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=1210788778.4615.590.camel@localhost.localdomain \
--to=msnyder@specifix.com \
--cc=gdb@sourceware.org \
--cc=romez777@gmail.com \
/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