[coldfire-gnu-discuss] dbg sprite configuration problems
Jaysen Roper
jaysenroper at livewire-gaming.com
Thu Aug 21 14:33:23 UTC 2008
Yes nathan, “Set $pc = Game” skips all of the stack initialization so the debugger backtrace just runs off the top of the stack and keeps going.
Ive found the proper entrypoint now, its called ENTRY funnily enough :o
After downloading the app I examine vectors…
print/x *0x60000004
$1 = 0x6000c3d8
print/x &ENTRY
$3 = 0x6000c3d8
(gdb) print/x &Game
$2 = 0x60000408
I set $pc = &ENTRY and start stepping, you can see what happens below. I think perhaps memory is being reconfigured different to the xml script that I give to the elf-sprite when i connect??
As always, opinions and directions are greatly appreciated
Jayse
(gdb) disas
Dump of assembler code for function ENTRY:
0x6000c3d8 <ENTRY+0>: movew #9984,%sr
0x6000c3dc <ENTRY+4>: movew #9984,%sr
0x6000c3e0 <ENTRY+8>: moveal 0x60000000 <vectors_start>,%sp
Snipped loads of asm for clarity
0x6000c51a <ENTRY+322>: clrl %d0
0x6000c51c <ENTRY+324>: moveb %a1@(10),%d0
0x6000c520 <ENTRY+328>: moveb %d0,0xf0000057
0x6000c526 <ENTRY+334>: clrl %d0
0x6000c528 <ENTRY+336>: movew %a1@(12),%d0
0x6000c52c <ENTRY+340>: movew %d0,0xf0000058
Snipped loads of stepi commands for clarity
(gdb)si
0x6000c51c in ENTRY ()
(gdb)si
0x6000c520 in ENTRY ()
(gdb)si
0x08080808 in ?? () <<<<<<<<<<<<<<<< OUCH, how did I land here?
(gdb)
-----Original Message-----
From: Nathan Sidwell [mailto:nathan at codesourcery.com]
Sent: 20 August 2008 17:10
To: Jaysen Roper
Cc: coldfire-gnu-discuss at codesourcery.com
Subject: Re: [coldfire-gnu-discuss] dbg sprite configuration problems
Jaysen Roper wrote:
>> Is this actually causing the debug session to fail?
> The "run commands" section in eclipse...
>
> set $sp = &stack_end
> set $pc = Game
> continue
This is unlikely to be creating a correctly terminated stack.
I'm guessing you're using your own initialization sequence.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
More information about the coldfire-gnu-discuss
mailing list