# korcankaraokcu/pince architecture

> Architecture diagram of the GitHub repository korcankaraokcu/pince, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/korcankaraokcu/pince
- Repository: https://github.com/korcankaraokcu/pince

## Overview

PINCE is a Qt front end for GDB focused on game reverse engineering. The main workflow is to select or attach to a target, inspect and scan its memory, then examine or modify values and code; sessions preserve address tables, bookmarks, notes, and structures. Additional capabilities include debugging and tracing, managed-runtime inspection, scripting, and speedhack support. The graph combines README-described features with shown imports and calls; many feature-specific GUI implementations were not sampled, so uncertain wiring is left out or marked unverified.

Main entry points: [`libpince/debugcore.py`](https://github.com/korcankaraokcu/pince/blob/master/libpince/debugcore.py) (GDB control and memory access), [`GUI/Widgets/Structures/StructureViewDialog.py`](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/Structures/StructureViewDialog.py) (Structure inspection), [`GUI/Widgets/MainWindow/MainWindow.py`](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/MainWindow/MainWindow.py) (Main window), [`GUI/Widgets/MemoryView/MemoryView.py`](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/MemoryView/MemoryView.py) (Memory view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application UI"]
  node_app_entry["Application entry<br/>[PINCE.py]"]
  node_main_window["Main window<br/>[MainWindow.py]"]
  node_process_select["Process selection<br/>[SelectProcess.py]"]
  node_settings["Settings and themes<br/>[settings.py]"]
end

subgraph group_inspection["Memory Inspection"]
  node_memory_view["Memory view<br/>[MemoryView.py]"]
  node_hex_view["Hex and ASCII views<br/>[HexView.py]"]
  node_hex_model["Memory table model<br/>[HexModel.py]"]
  node_scan_ui["Memory scanning"]
  node_scan_engine["Scan engine<br/>[scancore.py]"]
  node_pointer_scan["Pointer scanning<br/>[PointerScan.py]"]
  node_debug_tools["Dissection and search<br/>[DissectCode.py]"]
end

subgraph group_debugging["Debugging"]
  node_debugcore["GDB control and memory access<br/>[debugcore.py]"]
  node_debug_features["Breakpoints and tracing<br/>[TrackBreakpoint.py]"]
  node_managed_runtime["Mono and IL2CPP<br/>[monocore.py]"]
end

subgraph group_persistence["Sessions and Structures"]
  node_session[("Session data<br/>[session.py]")]
  node_structures["Structure inspection"]
end

subgraph group_engine["Execution Engines"]
  node_script_engine["Libpince scripting<br/>[LibpinceEngine.py]"]
  node_speedhack["Speedhack<br/>[speedhack.py]"]
  node_types["Value and structure types<br/>[typedefs.py]"]
end

node_user(("Engineer"))
node_target(("Debugged process"))
node_gdb["GDB"]

node_user -->|"starts"| node_app_entry
node_app_entry -->|"opens"| node_main_window
node_user -->|"selects target"| node_process_select
node_process_select -.->|"attaches"| node_debugcore
node_main_window -.->|"opens"| node_memory_view
node_user -->|"inspects memory"| node_memory_view
node_memory_view -.->|"reads and modifies"| node_debugcore
node_hex_view -->|"uses model"| node_hex_model
node_hex_model -->|"reads memory"| node_debugcore
node_user -->|"scans values"| node_scan_ui
node_scan_ui -.->|"runs scan"| node_scan_engine
node_user -->|"finds pointers"| node_pointer_scan
node_user -->|"dissects code"| node_debug_tools
node_debug_tools -.->|"queries target"| node_debugcore
node_debugcore -->|"issues commands"| node_gdb
node_gdb -->|"controls process"| node_target
node_user -->|"sets breakpoints"| node_debug_features
node_debug_features -.->|"controls debugging"| node_debugcore
node_user -->|"dissects runtime"| node_managed_runtime
node_user -->|"saves and restores"| node_session
node_session -.->|"stores structures"| node_structures
node_structures -->|"inspects memory"| node_debugcore
node_user -->|"runs scripts"| node_script_engine
node_script_engine -->|"calls debugger"| node_debugcore
node_user -->|"enables speedhack"| node_speedhack
node_settings -.->|"configures UI"| node_main_window
node_structures -->|"uses definitions"| node_types
node_debugcore -->|"uses definitions"| node_types

click node_app_entry "https://github.com/korcankaraokcu/pince/blob/master/PINCE.py"
click node_main_window "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/MainWindow/MainWindow.py"
click node_process_select "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/SelectProcess/SelectProcess.py"
click node_settings "https://github.com/korcankaraokcu/pince/blob/master/GUI/Settings/settings.py"
click node_memory_view "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/MemoryView/MemoryView.py"
click node_hex_view "https://github.com/korcankaraokcu/pince/blob/master/GUI/TableViews/HexView.py"
click node_hex_model "https://github.com/korcankaraokcu/pince/blob/master/GUI/AbstractTableModels/HexModel.py"
click node_scan_ui "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/PointerScanSearch/PointerScanSearch.py"
click node_scan_engine "https://github.com/korcankaraokcu/pince/blob/master/libpince/scancore.py"
click node_pointer_scan "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/PointerScan/PointerScan.py"
click node_debug_tools "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/DissectCode/DissectCode.py"
click node_debugcore "https://github.com/korcankaraokcu/pince/blob/master/libpince/debugcore.py"
click node_debug_features "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/TrackBreakpoint/TrackBreakpoint.py"
click node_managed_runtime "https://github.com/korcankaraokcu/pince/blob/master/libpince/monocore.py"
click node_session "https://github.com/korcankaraokcu/pince/blob/master/GUI/Session/session.py"
click node_structures "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/Structures/StructureViewDialog.py"
click node_script_engine "https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/LibpinceEngine/LibpinceEngine.py"
click node_speedhack "https://github.com/korcankaraokcu/pince/blob/master/libpince/speedhack.py"
click node_types "https://github.com/korcankaraokcu/pince/blob/master/libpince/typedefs.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_entry,node_main_window,node_process_select,node_settings toneBlue
class node_memory_view,node_hex_view,node_hex_model,node_scan_ui,node_scan_engine,node_pointer_scan,node_debug_tools toneAmber
class node_debugcore,node_debug_features,node_managed_runtime toneMint
class node_session,node_structures toneRose
class node_script_engine,node_speedhack,node_types,node_user,node_target,node_gdb toneIndigo
```

## Components

### Application UI

- [Application entry](https://github.com/korcankaraokcu/pince/blob/master/PINCE.py): `PINCE.py`
- [Main window](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/MainWindow/MainWindow.py): `GUI/Widgets/MainWindow/MainWindow.py`
- [Process selection](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/SelectProcess/SelectProcess.py): `GUI/Widgets/SelectProcess/SelectProcess.py`
- [Settings and themes](https://github.com/korcankaraokcu/pince/blob/master/GUI/Settings/settings.py): `GUI/Settings/settings.py`

### Memory Inspection

- [Memory view](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/MemoryView/MemoryView.py): `GUI/Widgets/MemoryView/MemoryView.py`
- [Hex and ASCII views](https://github.com/korcankaraokcu/pince/blob/master/GUI/TableViews/HexView.py): `GUI/TableViews/HexView.py`
- [Memory table model](https://github.com/korcankaraokcu/pince/blob/master/GUI/AbstractTableModels/HexModel.py): `GUI/AbstractTableModels/HexModel.py`
- [Memory scanning](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/PointerScanSearch/PointerScanSearch.py): `GUI/Widgets/PointerScanSearch/PointerScanSearch.py`
- [Scan engine](https://github.com/korcankaraokcu/pince/blob/master/libpince/scancore.py): `libpince/scancore.py`
- [Pointer scanning](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/PointerScan/PointerScan.py): `GUI/Widgets/PointerScan/PointerScan.py`
- [Dissection and search](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/DissectCode/DissectCode.py): `GUI/Widgets/DissectCode/DissectCode.py`

### Debugging

- [GDB control and memory access](https://github.com/korcankaraokcu/pince/blob/master/libpince/debugcore.py): `libpince/debugcore.py`
- [Breakpoints and tracing](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/TrackBreakpoint/TrackBreakpoint.py): `GUI/Widgets/TrackBreakpoint/TrackBreakpoint.py`
- [Mono and IL2CPP](https://github.com/korcankaraokcu/pince/blob/master/libpince/monocore.py): `libpince/monocore.py`

### Sessions and Structures

- [Session data](https://github.com/korcankaraokcu/pince/blob/master/GUI/Session/session.py): `GUI/Session/session.py`
- [Structure inspection](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/Structures/StructureViewDialog.py): `GUI/Widgets/Structures/StructureViewDialog.py`

### Execution Engines

- [Libpince scripting](https://github.com/korcankaraokcu/pince/blob/master/GUI/Widgets/LibpinceEngine/LibpinceEngine.py): `GUI/Widgets/LibpinceEngine/LibpinceEngine.py`
- [Speedhack](https://github.com/korcankaraokcu/pince/blob/master/libpince/speedhack.py): `libpince/speedhack.py`
- [Value and structure types](https://github.com/korcankaraokcu/pince/blob/master/libpince/typedefs.py): `libpince/typedefs.py`

### Other components

- **Engineer**
- **Debugged process**
- **GDB**

## Connections

- Engineer → Application entry: starts (evidence: `README.md`)
- Application entry → Main window: opens (evidence: `PINCE.py`)
- Engineer → Process selection: selects target (evidence: `README.md`)
- Process selection → GDB control and memory access: attaches
- Main window → Memory view: opens
- Engineer → Memory view: inspects memory (evidence: `README.md`)
- Memory view → GDB control and memory access: reads and modifies
- Hex and ASCII views → Memory table model: uses model (evidence: `GUI/TableViews/HexView.py`)
- Memory table model → GDB control and memory access: reads memory (evidence: `GUI/AbstractTableModels/HexModel.py`)
- Engineer → Memory scanning: scans values (evidence: `README.md`)
- Memory scanning → Scan engine: runs scan
- Engineer → Pointer scanning: finds pointers (evidence: `README.md`)
- Engineer → Dissection and search: dissects code (evidence: `README.md`)
- Dissection and search → GDB control and memory access: queries target
- GDB control and memory access → GDB: issues commands (evidence: `libpince/debugcore.py`)
- GDB → Debugged process: controls process (evidence: `README.md`)
- Engineer → Breakpoints and tracing: sets breakpoints (evidence: `README.md`)
- Breakpoints and tracing → GDB control and memory access: controls debugging
- Engineer → Mono and IL2CPP: dissects runtime (evidence: `README.md`)
- Engineer → Session data: saves and restores (evidence: `README.md`)
- Session data → Structure inspection: stores structures (evidence: `GUI/Widgets/Structures/StructureViewDialog.py`)
- Structure inspection → GDB control and memory access: inspects memory (evidence: `GUI/Widgets/Structures/StructureViewDialog.py`)
- Engineer → Libpince scripting: runs scripts (evidence: `README.md`)
- Libpince scripting → GDB control and memory access: calls debugger (evidence: `GUI/Widgets/LibpinceEngine/LibpinceEngine.py`)
- Engineer → Speedhack: enables speedhack (evidence: `README.md`)
- Settings and themes → Main window: configures UI
- Structure inspection → Value and structure types: uses definitions (evidence: `GUI/Widgets/Structures/StructureViewDialog.py`)
- GDB control and memory access → Value and structure types: uses definitions (evidence: `libpince/debugcore.py`)
