From: Michael Snyder <msnyder@specifix.com>
To: Roman Mashak <romez777@gmail.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: gdb for AT91SAM7
Date: Thu, 15 May 2008 12:09:00 -0000 [thread overview]
Message-ID: <1210811805.4615.602.camel@localhost.localdomain> (raw)
In-Reply-To: <40a670230805141712n3afdf48dladfa89d669d2aeaa@mail.gmail.com>
On Wed, 2008-05-14 at 17:12 -0700, Roman Mashak wrote:
> Hello,
>
> 2008/5/14 Michael Snyder <msnyder@specifix.com>:
> > When you say the application is linked to 0x100000,
> > do you mean that that is the start address?
>
> I mean, this is the address specified in the linker script and by
> which the image is burnt in flash.
Specified as what? The base load address? Or the start
of execution address? They're not the same, you know.
I'm developing a hunch that perhaps your linker script
does not specify a start-of-execution address.
>
> > Before you say "continue", or "jump *0x100000", if you
> > ask gdb for the current instruction pointer (presumably
> > "info reg pc"), what does it say?
>
> This is the strange point. The first time I run it says "pc =
> 0x100496", any other run gets PC equal to 0x0. Moreover ALL registers
> are set to 0x0.
>
> I guess there is something wrong with the initialization of JTAG in
> .gdbinit. T
Could very well be. If the PC contains some random address
(eg. zero) and you say "continue", gdb is just going to let
the target start executing code at that random address.
Elf files can have a start-of-execution address specified,
though. When you use gdb to load the file, gdb should
set the pc to that address.
parent reply other threads:[~2008-05-15 0:37 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <40a670230805141712n3afdf48dladfa89d669d2aeaa@mail.gmail.com>]
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=1210811805.4615.602.camel@localhost.localdomain \
--to=msnyder@specifix.com \
--cc=gdb-patches@sources.redhat.com \
--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