forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PSPLINK adventures

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
binaryONE



Joined: 18 Apr 2006
Posts: 19

PostPosted: Wed Mar 12, 2008 4:07 pm    Post subject: PSPLINK adventures Reply with quote

Hey guys,

I am running 3.80 - m33 CFW with 1.5 kernel addon, all apps, every single one that i've downloaded run perfectly.

My problem is this,

If I wrote a simple program that uses file io functions such as,

sceIoOpen/Close/Read/Write ...

THe wierd thing is when i compile my program WITHOUT: BUILD_PRX = 1

and run the EBOOT.PBP from the pspsh (in psplink) it runs just fine.

However when i compile it WITH: BUILD_PRX = 1

if i run the <app>.prx or EBOOT.PBP
it chokes with no error or anything... psplink just acts like it is ok
however if i try to type anything in pspsh, such as, reset or anything else
it just hangs...

THis is driving me insane,

I have tried debugging and the only thing I can see is that, the <app>.prx chokes on the sceIoXXXX functions.

Here's the debugger output, hope it helps you help me:


GDB is unable to find the start of the function at 0x88140f4
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 0x88140f4 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.
warning: GDB can't find the start of the function at 0x88140f3.
0x088140f4 in ?? ()
Back to top
View user's profile Send private message Visit poster's website
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Mar 12, 2008 4:33 pm    Post subject: Reply with quote

Try adding PSP_HEAP_SIZE_MAX() near PSP_MODULE_INFO.
Back to top
View user's profile Send private message
binaryONE



Joined: 18 Apr 2006
Posts: 19

PostPosted: Wed Mar 12, 2008 4:38 pm    Post subject: Reply with quote

Oh ! nice man, fixed it.

Thanks.

Is there some heap-size difference between firmwares now?
Back to top
View user's profile Send private message Visit poster's website
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Wed Mar 12, 2008 5:12 pm    Post subject: Reply with quote

binaryONE wrote:
Oh ! nice man, fixed it.

Thanks.

Is there some heap-size difference between firmwares now?


a .PRX module doesn't take all the memory by default (a .PRX module being to a .DLL or .SO module in PC world, it doesn't make a sense for it to take all the memory). By adding the macro PSP_HEAP_SIZE_MAX(), you allow this .PRX module to do so which is not a problem because it happens to be run as the main executable and not as a single dynamic library. I guess stack is allocated at the end of the heap, so its size may naturally varied. I don't know for sure about how a .PRX module creates and handles its stack as I suppose it is just a collection of functions to be called by another executable (so those functions should run in the stack of the executable, not in their module stack if any).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group