[U-Boot] [PATCH] ppc: transform init_sequence into a function.

Scott Wood scottwood at freescale.com
Tue Dec 7 01:59:07 CET 2010


On Tue, 7 Dec 2010 01:41:22 +0100
Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:

> Scott Wood <scottwood at freescale.com> wrote on 2010/12/07 01:21:44:
> >
> > On Tue, 7 Dec 2010 01:07:30 +0100
> > Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
> > > Scott, listen to yourself. You are proposing that one should turn the
> > > code inside out and scan the map files just do this simple thing.
> >
> > It looks like you're the one turning this code inside out. :-)
> 
> Some days it feels so :)
> 
> >
> > No need to scan anything yourself; let the tools (gdb/addr2line/etc) do
> > it.
> 
> gdb yes, addr2line/etc no. Needing to resort to external tools
> when gdb and a sensible code layout would do the trick? No thanks.

gdb is an external tool for me most of the time. :-)

It's what I use for lookup anyway (usually I'll want more context), I
just mentioned addr2line as an alternative.  Either one beats looking
at the map file (why?).

> > > What is so valuable with func ptrs that you think it is worth it?
> >
> > As I said, I think it's at least as easy to debug the way it is.  And
> > you admitted you found the new way uglier...
> 
> You haven't tried my way yet.

I usually don't even have a BDI hooked up. :-P

I've done breakpoint/step debugging.  Sometimes it's the right tool.
Usually printf works better for me, particularly if there's overhead
to setting up a debugger.

> > Plus, maybe someday we'll get real section-list initfuncs.
> 
> One day that hasn't come fore years yet and may never come

I can still hope. :-)

> and probably fixable with weak functions.

Weak functions are not a good substitute.

-Scott



More information about the U-Boot mailing list