[ECOS] powerpc-eabi-gdb woes (fwd)

Jamie Guinan guinan@bluebutton.com
Thu Oct 28 17:28:00 GMT 1999

(Duh, this never got out to the list - no wonder there
 were no replies.  :P )

---------- Forwarded message ----------
Date: Tue, 26 Oct 1999 14:04:08 -0400 (EDT)
From: Jamie Guinan <guinan@bluebutton.com>
To: ecos-discuss@bluebutton.com
                 ^^^^^^^^^^^^^^  (silly me)
Subject: powerpc-eabi-gdb woes

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

Test case:

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

2) I then tried building a program *with* eCos, but I get
what look like GDB protocol errors when trying to print local variables.

Test case:

Test session:
$ powerpc-eabi-gdb -b 38400 test6
(gdb) target remote /dev/ttyS0
(gdb) load
Loading section .vectors, size 0x2000 lma 0x10000
Loading section .text, size 0x1ae7c lma 0x12000
Loading section .rodata, size 0xcc54 lma 0x2ce80
ding section .data, size 0x888 lma 0x39ad8
Start address 0x10100 , load size 172888
Transfer rate: 26096 bits/sec.
(gdb) b main
Breakpoint 1 at 0x124c0: file test6.c, line 10.
(gdb) cont
Breakpoint 1, main () at test6.c:10
10	  a=4;
(gdb) n
11	  b=50;
(gdb) p a
Reply contains invalid hex digit 84

I've repeated this several times, it happens each time.

For this ram-based configuration, I used the following script
to create the target "install" directory,

The script requires this patch to set up 40Mhz operation and GDB params,

Thanks in advance...

Jamie Guinan                         Blue Button Solutions, Inc.
guinan@bluebutton.com                  http://www.bluebutton.com

More information about the Ecos-discuss mailing list