This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

Problems with GDB on MPC8240


Hi,

We are facing a lot of problems with bringing up gdb. We have already
brought up RedBoot. I'm able to connect to the target through gdb. I'm
also able to load the program. Once I give the "continue" I'm struck;
even if I give a breakpoint. I'm testing withj the Hello application.



The follwing is the snapshot of what is happening at the FRIST TIME
after boot of my linux (RH6.2) host
(gdb) load
Loading section .text, size 0x138e4 lma 0xf6000
Loading section .rodata, size 0x858 lma 0x1098e8
Loading section .data, size 0x704 lma 0x10a140
Start address 0xf6000 , load size 84032
Transfer rate: 26890 bits/sec, 506 bytes/write.
(gdb) set debug remote 1
(gdb) break cyg_user_start
Sending packet: $mf6544,4#06...Ack
Packet received: 4082102c
Breakpoint 1 at 0xf6544: file hello.c, line 13.
(gdb) continue
Continuing.
Sending packet: $Z0,f6544,4#4f...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
Packet received: T0f40:50494338;01:000030a3;

Program received signal SIGTERM, Terminated.
Sending packet: $z0,f6544,4#6f...Ack
Packet received: OK
0x50494338 in ?? ()





The follwing is the snapshot of what is happening for all OTHER tries
after boot of my linux (RH6.2) host
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0xa6358 in ?? ()
(gdb) load
Loading section .text, size 0x138e4 lma 0xf6000
Loading section .rodata, size 0x858 lma 0x1098e8
Loading section .data, size 0x704 lma 0x10a140
Start address 0xf6000 , load size 84032
Transfer rate: 26890 bits/sec, 506 bytes/write.
(gdb)
(gdb) set debug remote 1
(gdb) del 1
(gdb) b cyg_user_start
Sending packet: $mf6544,4#06...Ack
Packet received: 4082102c
Breakpoint 2 at 0xf6544: file hello.c, line 13.
(gdb) continue
Continuing.
Sending packet: $Z0,f6544,4#4f...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack
(gdb) continue
Continuing.
Sending packet: $Z0,f6544,4#4f...Ack
Packet received: OK
Sending packet: $Hc0#db...Ack
Packet received: OK
Sending packet: $c#63...Ack


I donot understand why the program is getting the SIGTERM ONLY for the
first time.


Also, I found that when I give the "continue" command at the gdb
console prompt, the RedBoot is able to return in the sequence of
functions  __handle_exception(), cyg_hal_exception_handler(),
cyg_default_exception_handler(). I have yet to trace if it is restoring
the state propoerly now.  


I hope it is not required to port any extra debugging stuffs in the
powerpc HAL (this is because it is already there for PPC603 simulator
version and MPC8240's core is PPC603). I have enabled the
"...BREAKPOINT_LIST_SIZE..." macro;but still it is the same; is this
really required. I donot know where am I doing the mistake.


The flash of my board has DINK32 running on it. I'm running the RAM
version of RedBoot on DINK32. My "Hello application" is linked to the
memory area which is flagged free by the RedBoot. Could there a clash
between the exception handlers of the DINK and eCos.


I didn't get any help for some of my previous mails on this discuss
list. Please help us to start debugging my applications.



Thanks and Regards,
K Srinivas Aithal

 



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


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