This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project. See the eCos home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [ECOS] No stack frames in gdb


Have you tried the "backtrace" command ?  I use "bt" for short.

Brendan Simon.



Andrew Lunn wrote:

> I've a problem with gdb. It does not show the stack frames. It can
> tell you what function you are in, but not what function calls are
> nested to get where you are.
>
> bash-2.02$ ppcgdb mtest.exe
> GNU gdb 4.17-ecosSWtools-981021
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.  This version of GDB is supported
> for customers of Cygnus Solutions.  Type "show warranty" for details.
> This GDB was configured as "--host=i586-cygwin32 --target=powerpc-eabi"...
> (gdb) psim
> Size of register r0 (0) incorrect (1 instead of 4))Connected to the simulator.
> Breakpoint 1 at 0x83868: file //d/cygnus/ecos-1.1/packages/infra/v1_1/src/buffer.
> cxx, line 707.
> (gdb) break main
> Breakpoint 2 at 0x80324: file mtest.c, line 14.
> (gdb) run
> Starting program: /h/aplett/mbuf/mtest.exe
>
> Breakpoint 2, main () at mtest.c:14
> 14        mbinit();
> (gdb) s
> mbinit () at upic_mbuf.c:64
> 64              mmbfree = NULL; mclfree = NULL;
> (gdb) s
> 65              m_mballoc(NMB_INIT);
> (gdb) s
> m_mballoc (nmb=128) at upic_mbuf.c:82
> 82              nbytes = (nmb * MSIZE);
> (gdb) where
> #0  m_mballoc (nmb=128) at upic_mbuf.c:82
> (gdb)
>
> Here i am three functions deep, but it only shows the current
> function. Do i need to turn on some configuration option so that stack
> frame GBD understands are be used?
>
>         Thanks
>                 Andrew