[GH-ISSUE #2350] [Feature Request]: Debugging PS4 code #792

Open
opened 2026-02-27 21:08:10 +03:00 by kerem · 2 comments
Owner

Originally created by @mailwl on GitHub (Feb 4, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2350

Checklist

  • I have searched for a similar issue in this repository and did not find one.

Description

I see two way to debug loaded ps4 code

  1. using IDA Pro (or maybe NSA Ghidra, but not sure), and gdbstub in shadPS4
  2. using VS2022, and set int3 as breakpoint in POI - as eboot.bin always load at same address, the POI addresses can be found in ida dissasembly. But there is a problem - how to return original code, replaced by int3?

what do you think?

Reason

some games just not working because of problems deep inside the code, and no way to found problem just looking at log

Examples

https://github.com/shadps4-emu/shadPS4/pull/2339
sceVideoOutDeleteFlipEvent called AFTER error in game, and it releases resources. Real error somewhere early

Originally created by @mailwl on GitHub (Feb 4, 2025). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/2350 ### Checklist - [x] I have searched for a similar issue in this repository and did not find one. ### Description I see two way to debug loaded ps4 code 1) using IDA Pro (or maybe NSA Ghidra, but not sure), and gdbstub in shadPS4 2) using VS2022, and set int3 as breakpoint in POI - as eboot.bin always load at same address, the POI addresses can be found in ida dissasembly. But there is a problem - how to return original code, replaced by int3? what do you think? ### Reason some games just not working because of problems deep inside the code, and no way to found problem just looking at log ### Examples https://github.com/shadps4-emu/shadPS4/pull/2339 sceVideoOutDeleteFlipEvent called AFTER error in game, and it releases resources. Real error somewhere early
Author
Owner

@auser1337 commented on GitHub (Feb 5, 2025):

I’ve been working on a GDB stub, and so far I’ve gotten IDA to connect to it and read memory. However, there are still some issues; I’ll make a PR soon™ hopefully.

<!-- gh-comment-id:2638251024 --> @auser1337 commented on GitHub (Feb 5, 2025): I’ve been working on a GDB stub, and so far I’ve gotten IDA to connect to it and read memory. However, there are still some issues; I’ll make a PR soon™ hopefully.
Author
Owner

@Hermiten commented on GitHub (Feb 14, 2025):

If you want to help Devs, you can come on Discord and ask for help how to setup everything.
They already use Ghidra and others tools to do RE and more.
There is also devtools available for the emulator, they can explain to you how to use it on Discord too
I'm closing this one

<!-- gh-comment-id:2658629281 --> @Hermiten commented on GitHub (Feb 14, 2025): If you want to help Devs, you can come on Discord and ask for help how to setup everything. They already use Ghidra and others tools to do RE and more. There is also devtools available for the emulator, they can explain to you how to use it on Discord too I'm closing this one
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#792
No description provided.