0 Guest Debugging & Tricks
Radosław Gliński edited this page 2024-06-08 12:52:39 +02:00

Requirements

  • Programming skill & Brain
  • Some knowledge about PPC architecture
  • Software: Visual Studio, Ghidra/IDA

Required Changes in Xenia Config

  • emit_source_annotations: true

Useful Settings in Debugging

  • break_on_instruction - Sets breakpoint on specified xex address (for example: 0x823605D0)

Specific break conditions:

  • break_condition_gpr - Sets breakpoint to be reached only for specific register (possible values: 1-31)
  • break_condition_value - Sets breakpoint to be reached only when register from break_condition_gpr
  • break_condition_op - Sets breakpoint to be reached only for specific condition (for example: r3 == 1, where == is "eq"). Possible operators for break_condition_op: eq, ne, slt, sle, sgt, sge, ult, ule, ugt, uge

Example: I want to Xenia to stop when register 9 will not contain value 1 at address 0x823605D0

  • break_on_instruction = 0x823605D0
  • break_condition_gpr = 3
  • break_condition_value = 1
  • break_condition_op = "ne"

Visual Studio Configuration

  • TBD

Checking PPC registers

  • TBD

Writing custom hooks

  • TBD