This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: powerpc-eabi-gdb backtrace problem
- From: "Gary D. Thomas" <gary dot thomas at mind dot be>
- To: Bob Koninckx <bob dot koninckx at mech dot kuleuven dot ac dot be>
- Cc: Christoph Csebits <christoph dot csebits at frequentis dot com>,ecos discuss list <ecos-discuss at sources dot redhat dot com>
- Date: 18 Feb 2003 07:46:22 -0700
- Subject: Re: [ECOS] powerpc-eabi-gdb backtrace problem
- References: <20030218151014.A17353@frequentis.com> <1045579178.25433.10.camel@pc086-2.mech.kuleuven.ac.be>
On Tue, 2003-02-18 at 07:39, Bob Koninckx wrote:
> I have seen something similar once because of a backchain at the top of
> the stack not being properly initialized to zero but with filled with
> rubbish (being left uninitialized actually). If you have bad luck this
> "rubbish" might point into something that generates some kind of memory
> protection error if you try to dereference it, crashing the sub in the
> process.
>
> This was a long time ago though and i've not seen it happen anymore
> since. So it could be that your problem is something completely
> different.
>
> I' check that the stacktop of the thread you are debugging did not get
> corrupted if I were you.
>
Have you enabled stack checking (runtime) and asserts? This can help
a lot.
How about CYGFUN_KERNEL_THREADS_STACK_MEASUREMENT? If it's on, the
kernel marks the stack with 0xDEADBEEF so it can find the actual usage.
Perhaps this is causing problems.
n.b. The GDB 'bt' command is pure wizardry and full of twisty little
passages. It's failure is sadly not uncommon.
> Hope this helps,
>
> Bob
>
> On Tue, 2003-02-18 at 15:10, Christoph Csebits wrote:
> > hi,
> >
> > i am starting the twothreads example with
> > gdb 5.0 and doing a break (ctrl-c).
> >
> > After 'bt' prints some frames i got
> > Reply contains invalid hex digit 84
> >
> > Turning debugging on shows that gdb
> > tries to dereference 0xdeadbeef.
> >
> > Its clear why the stub is causing
> > an exception invoking himself again
> >
> > whats wrong here? Is anybody else
> > experiencing such a problem?
> --
> ----------------------------------------------------------------------
> ir. Bob Koninckx
> Katholieke Universiteit Leuven
> Division Production Engineering, tel. +32 16 322535
> Machine Design and Automation fax. +32 16 322987
> Celestijnenlaan 300B bob.koninckx@mech.kuleuven.ac.be
> B-3001 Leuven Belgium http://www.mech.kuleuven.ac.be/pma
> ----------------------------------------------------------------------
>
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
--
.--------------------------------------------------------.
| Mind: Embedded Linux and eCos Development |
|--------------------------------------------------------|
| Gary Thomas email: gary.thomas@mind.be |
| Mind ( http://mind.be ) tel: +1 (970) 229-1963 |
| gpg: http://www.chez-thomas.org/gary/gpg_key.asc |
'--------------------------------------------------------'
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss