-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
115 changed files
with
3,341 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/kotlin/allegrex/agent/ppsspp/PpssppWsDebuggerModelFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package allegrex.agent.ppsspp | ||
|
||
import allegrex.agent.ppsspp.client.websocket.PpssppWsClient | ||
import allegrex.agent.ppsspp.model.PpssppDebuggerObjectModel | ||
import ghidra.dbg.DebuggerModelFactory | ||
import ghidra.dbg.DebuggerObjectModel | ||
import ghidra.dbg.util.ConfigurableFactory | ||
import java.util.concurrent.CompletableFuture | ||
|
||
@Suppress("unused") | ||
@ConfigurableFactory.FactoryDescription( | ||
brief = "PPSSPP WebSocket debugger (beta)", | ||
htmlDetails = """Connect to a running PPSSPP instance over WebSocket. | ||
Make sure "Allow remote debugger" is enabled in Developer tools. | ||
Note: This integration is in beta. Please report any issues | ||
to kotcrab/ghidra-allegrex GitHub repository""" | ||
) | ||
class PpssppWsDebuggerModelFactory : DebuggerModelFactory { | ||
@JvmField | ||
@ConfigurableFactory.FactoryOption("Connection Address (empty to auto-detect)") | ||
val connectionUrlOption: ConfigurableFactory.Property<String> = | ||
ConfigurableFactory.Property.fromAccessors(String::class.java, { connectionUrl }, { connectionUrl = it }) | ||
|
||
private var connectionUrl = "" | ||
|
||
override fun build(): CompletableFuture<out DebuggerObjectModel> { | ||
val model = PpssppDebuggerObjectModel(PpssppWsClient(connectionUrl)) | ||
return model.start().thenApply { model } | ||
} | ||
} |
Oops, something went wrong.