This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: powerpc-eabi-gdb woes [Followup]
- To: Ecos Discussion List <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] Re: powerpc-eabi-gdb woes [Followup]
- From: Jamie Guinan <guinan at bluebutton dot com>
- Date: Thu, 28 Oct 1999 20:28:03 -0400 (EDT)
- Reply-To: guinan at bluebutton dot com
On Tue, 26 Oct 1999, Jamie Guinan wrote:
>
> Hi all,
>
> I'm working with an MBX board, MPC821 @ 40Mhz.
>
> I've run into a few problems with powerpc-eabi-gdb, and
> I wanted to see if anyone else has seen similar problems.
>
> 1) GDB prints insane values for local variables. I found
> this while debugging a simple program without eCos (GDB is
> using the GDB stub in ROM in this case), and without
> optimization.
>
> Test case:
> http://www.bluebutton.com/ecos-discuss/10-26-1999/test5/Makefile
> http://www.bluebutton.com/ecos-discuss/10-26-1999/test5/test5.c
>
> Test session:
> $ powerpc-eabi-gdb -b 38400 test5
> (gdb) target remote /dev/ttyS0
> (gdb) load
> ...
> (gdb) b main
> (gdb) cont
> ...
> Breakpoint 1, main () at test5.c:21
> 21 i=90;
> (gdb) n
> 22 j=99;
> (gdb) p i
> $1 = 2087191462
> ^^^^^^^^^^^^^^^
For future readers of the ecos-discuss mail archives, the
GDB insane values problem has a simple fix. After running
pkgconf.tcl, edit pkgconf/hal.h and set the following,
#undef CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
#undef CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
-Jamie