I just ported my engine code to PSP and I want to use gdb to be able to debug it. From what I understand, I have a really standard dev env. I've been able to reproduce the problem with the sprite sample from the sdk. I modified the makefile to compile it as a PRX since i've got a slim, and I added debug info (-g)... well to be able to debug :)
* I'm using cygwin under WinXP
* I obtained the latest pspdev from svn
* I built everything and got no error... except for remote joy. As mentionned in other threads, it does need linux/joystick.h but this package is not available under cygwin? I don't need remote joy so I don't really care :)
* I start usbhostfs_pc
* I start pspsh, then "debug sprite.prx"
* I then proceed to debug using GDB... Here's what I get :
Code: Select all
$ psp-gdb sprite.elf
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=psp"...
(gdb) target remote:10001
Remote debugging using :10001
[New Thread 0]
_start (args=0, argp=0x0) at crt0_prx.c:109
109 if (&sce_newlib_nocreate_thread_in_start != NULL) {
(gdb) break main
Breakpoint 1 at 0x88042d0: file sprite.c, line 71.
(gdb) c
Continuing.
[New Thread 72894009]
[Switching to Thread 72894009]
Breakpoint 1, main (argc=Cannot access memory at address 0xbbbfe00
) at sprite.c:71
71 setupCallbacks();
(gdb) next
75 for (i = 0; i < NUM_SLICES; ++i)
(gdb) next
77 for (j = 0; j < NUM_ROWS; ++j)
(gdb) next
79 float s = i + 0.5f, t = j;
(gdb) next
82 x = (RING_SIZE + RING_RADIUS * cosf(s * ((GU_PI*2)/NUM_SLICES))) * cosf(t * ((GU_PI*2)/NUM_ROWS)
);
(gdb)
As you can see, the problem is this:
Code: Select all
Breakpoint 1, main (argc=Cannot access memory at address 0xbbbfe00
) at sprite.c:71
Has anyone seen this ? The problem is that I would like to use Eclipse, but it chokes when gdb give this error.
Thanks for your help!