public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] gdb shows incorrect source file while debugging
@ 2005-04-27 18:31 ken king
  2005-04-28  9:43 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: ken king @ 2005-04-27 18:31 UTC (permalink / raw)
  To: ecos-discuss


--- Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Apr 26, 2005 at 05:33:37PM -0700, ken king
> wrote:
> > I'm trying to port eCOS & RedBoot to a custom
> Power PC
> > (MPC852).
> > I started with the Adder sense it has a similar
> > processor an I/O.
> > I added my card to the cdl scripts, created a
> > directory and wrote a custom hal_hardware_init.
> > 
> > I'm using a BDM to download and debug, after
> > downloading I can see the reset vector (in
> assembly)
> > single stepping to another small assembly code
> > segment, but when it branches to hal_hardware_init
> --
> > gdb loads up some other source file (I think it's
> > displaying some .hxx file).
> > 
> > Looking at the registers and dumping memory around
> the
> > PC, I am running the code I wrote for
> > hal_hardware_init. I can even set breakpoints on
> my
> > label names.
> > 
> > I can copy and assemble _just_ this code module in
> > another directory and it works as expected. I even
> > changed the cdl to use -gstabs instead of -g ---no
> > luck.
> > 
> > Please tell me what I'm missing when I build with
> the
> > eCOS config tool.
> 
> But of a long shot, but try deleting your complete
> work tree and
> starting again. You might have some old symbols in
> yout libtarget.a.
> 
>         Andrew
> 
No Joy. 
Pulls up sorce code from ctype.inl and "stops" in
tolower(). But it is still really running
hal_hardware_init. This is different than yesterday,
which is really confusing.
kk

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] gdb shows incorrect source file while debugging
  2005-04-27 18:31 [ECOS] gdb shows incorrect source file while debugging ken king
@ 2005-04-28  9:43 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2005-04-28  9:43 UTC (permalink / raw)
  To: ken king; +Cc: eCos Discussion

On Wed, 2005-04-27 at 11:25 -0700, ken king wrote:
> --- Andrew Lunn <andrew@lunn.ch> wrote:
> > On Tue, Apr 26, 2005 at 05:33:37PM -0700, ken king
> > wrote:
> > > I'm trying to port eCOS & RedBoot to a custom
> > Power PC
> > > (MPC852).
> > > I started with the Adder sense it has a similar
> > > processor an I/O.
> > > I added my card to the cdl scripts, created a
> > > directory and wrote a custom hal_hardware_init.
> > > 
> > > I'm using a BDM to download and debug, after
> > > downloading I can see the reset vector (in
> > assembly)
> > > single stepping to another small assembly code
> > > segment, but when it branches to hal_hardware_init
> > --
> > > gdb loads up some other source file (I think it's
> > > displaying some .hxx file).
> > > 
> > > Looking at the registers and dumping memory around
> > the
> > > PC, I am running the code I wrote for
> > > hal_hardware_init. I can even set breakpoints on
> > my
> > > label names.
> > > 
> > > I can copy and assemble _just_ this code module in
> > > another directory and it works as expected. I even
> > > changed the cdl to use -gstabs instead of -g ---no
> > > luck.
> > > 
> > > Please tell me what I'm missing when I build with
> > the
> > > eCOS config tool.
> > 
> > But of a long shot, but try deleting your complete
> > work tree and
> > starting again. You might have some old symbols in
> > yout libtarget.a.
> > 
> >         Andrew
> > 
> No Joy. 
> Pulls up sorce code from ctype.inl and "stops" in
> tolower(). But it is still really running
> hal_hardware_init. This is different than yesterday,
> which is really confusing.

These are really tool chain issues.  What version of the
various tools are you trying to use?  Have you checked with
the tool [mailing] lists, in case they have any ideas?

I've often seen this behaviour with GDB - it can get quite
confused where the sources might be if you have code or functions
that come from include files.  For the most part, one just has
to work around it.

In other words, it doesn't look like you've done anything wrong.


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] gdb shows incorrect source file while debugging
  2005-04-27  5:00 ken king
@ 2005-04-27  5:34 ` Andrew Lunn
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2005-04-27  5:34 UTC (permalink / raw)
  To: ken king; +Cc: ecos-discuss

On Tue, Apr 26, 2005 at 05:33:37PM -0700, ken king wrote:
> I'm trying to port eCOS & RedBoot to a custom Power PC
> (MPC852).
> I started with the Adder sense it has a similar
> processor an I/O.
> I added my card to the cdl scripts, created a
> directory and wrote a custom hal_hardware_init.
> 
> I'm using a BDM to download and debug, after
> downloading I can see the reset vector (in assembly)
> single stepping to another small assembly code
> segment, but when it branches to hal_hardware_init --
> gdb loads up some other source file (I think it's
> displaying some .hxx file).
> 
> Looking at the registers and dumping memory around the
> PC, I am running the code I wrote for
> hal_hardware_init. I can even set breakpoints on my
> label names.
> 
> I can copy and assemble _just_ this code module in
> another directory and it works as expected. I even
> changed the cdl to use -gstabs instead of -g ---no
> luck.
> 
> Please tell me what I'm missing when I build with the
> eCOS config tool.

But of a long shot, but try deleting your complete work tree and
starting again. You might have some old symbols in yout libtarget.a.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS] gdb shows incorrect source file while debugging
@ 2005-04-27  5:00 ken king
  2005-04-27  5:34 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: ken king @ 2005-04-27  5:00 UTC (permalink / raw)
  To: ecos-discuss

I'm trying to port eCOS & RedBoot to a custom Power PC
(MPC852).
I started with the Adder sense it has a similar
processor an I/O.
I added my card to the cdl scripts, created a
directory and wrote a custom hal_hardware_init.

I'm using a BDM to download and debug, after
downloading I can see the reset vector (in assembly)
single stepping to another small assembly code
segment, but when it branches to hal_hardware_init --
gdb loads up some other source file (I think it's
displaying some .hxx file).

Looking at the registers and dumping memory around the
PC, I am running the code I wrote for
hal_hardware_init. I can even set breakpoints on my
label names.

I can copy and assemble _just_ this code module in
another directory and it works as expected. I even
changed the cdl to use -gstabs instead of -g ---no
luck.

Please tell me what I'm missing when I build with the
eCOS config tool.

Thanks for your help.
kk

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-27 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-27 18:31 [ECOS] gdb shows incorrect source file while debugging ken king
2005-04-28  9:43 ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2005-04-27  5:00 ken king
2005-04-27  5:34 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).