| View previous topic :: View next topic |
| Author |
Message |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Mon Aug 25, 2008 11:27 pm Post subject: help on using gdb and psplink |
|
|
on the psp i have start psplink V3.0
on the pc i start USBHOSTFS /home/f731/myhomebrew
on the pc i start pspsh
[f731@localhost pspsh]$ ./pspsh
host0:/> debug psp_pdf.prx
PSPLink USB GDBServer (c) 2k7 TyRaNiD
host0:/> Loaded host0:/psp_pdf.prx - UID 0x042B945D, Entry 0x088040AC
as said in the tutorial i must now start psp-gdb psp_pdf.prx
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-linux-gnu --target=psp"...
(no debugging symbols found)
First question why have i no debugging symbols found i have compiled with the -g flag
here is the makefile
TARGET = psp_pdf
OBJS = psp_pdf.o splashscreen.o filechooser.o rendering.o error.o
PSP_FW_VERSION=401
PSP_PDF_VERSION=1.0.0
PSPSDK=$(shell psp-config --pspsdk-path)
PSPDIR=$(shell psp-config --psp-prefix)
PSP_LARGE_MEMORY = 1
INCDIR =
CFLAGS = -O2 -G0 -Wall -g -DDEBUG -D_DEBU -D_DEBUG_LOG -D_DEBUG_MEMORY -D__PSP__ -DTRI_SUPPORT_PNG -I $(PSPDIR)/includre -I $(PSPDIR)/include/freetype2 -I../../include -g
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS = -g
LIBS = -ltri -lmupdf -lstream -lworld -lraster -lfonts -lbase -ljpeg -lpsprtc -lpspgum -lpspgu -lpng -lz -lm -lfreetype -lpsppower
BUILD_PRX = 1
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = PSP PDF Reader
PSP_EBOOT_ICON = psp_pdf.png
PSP_EBOOT_PIC1 = psp_pdf-pic.png
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
when i as said in the tuto invoke : target remote :10001
i"ve got this
(gdb) target remote : 10001
Remote debugging using : 10001
[New Thread 0]
0x088040ac in ?? ()
(gdb) step
warning: GDB can't find the start of the function at 0x88040ac.
GDB is unable to find the start of the function at 0x88040ac
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
This problem is most likely caused by an invalid program counter or
stack pointer.
However, if you think GDB should simply search farther back
from 0x88040ac for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
Cannot find bounds of current function
it can determine my main module any help to explain why will be appreciated
i will debug at source level and not at mips level (very very newbies on mips) |
|
| Back to top |
|
 |
sturatt
Joined: 13 Jul 2006 Posts: 46
|
Posted: Mon Aug 25, 2008 11:36 pm Post subject: |
|
|
One thing I had to do in order for it to work was turn off compiler optimizations, so -O0, but I dont know if that will solve your problem as well
Also make sure you have gdbdebug option turned on in usbhostfs_pc, I dont know if you enabled that or not |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Tue Aug 26, 2008 12:11 am Post subject: |
|
|
what do you mean by gdbdebug option turned on ???? on usbhostfs_pc
is it when i launch the program ? i haven't found this ?
on the pc side when i start psp-gdb and i i load the psp_pdf.elf i have the debugging symbols when i load psp_pdf.prx i haven't |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Tue Aug 26, 2008 12:33 am Post subject: |
|
|
It's work !!!!!!!
on the pspsh i launch psp_pdf.prx because the psp at kernel 4.01m33 cannot launch elf binaries
on the psp-gdb i launch the psp_pdf.elf and guess what i have my source
and i can debug yes yes yes to happy |
|
| Back to top |
|
 |
|