102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
pcdogs_symbols.c File Reference
#include <dttr_pcdogs.h>
#include "core_internal.h"

Go to the source code of this file.

Functions

static void patch_report_init (DTTR_PCDOGS_T_Patch_Report *report)
static void patch_report_fail (DTTR_PCDOGS_T_Patch_Report *report, size_t index, DTTR_Result result)
static uintptr_t function_address_at (uint32_t index)
static uintptr_t global_address_at (uint32_t index)
static DTTR_Result resolve_symbol (const DTTR_Core_Context *ctx, uint32_t id, uint32_t count, uintptr_t(*address_at)(uint32_t index), uintptr_t *out_addr, const char *invalid_message, const char *not_found_message)
DTTR_Result DTTR_PCDOGS_SymbolFunctionResolve (const DTTR_Core_Context *ctx, DTTR_PCDOGS_T_Symbol_Function_ID id, uintptr_t *out_addr)
DTTR_Result DTTR_PCDOGS_FunctionResolve (const DTTR_Core_Context *ctx, DTTR_PCDOGS_T_Function_ID id, uintptr_t *out_addr)
DTTR_Result DTTR_PCDOGS_SymbolDataResolve (const DTTR_Core_Context *ctx, DTTR_PCDOGS_T_Symbol_Data_ID id, uintptr_t *out_addr)
DTTR_Result DTTR_PCDOGS_DataResolve (const DTTR_Core_Context *ctx, DTTR_PCDOGS_T_Data_ID id, uintptr_t *out_addr)
DTTR_Result DTTR_PCDOGS_Hook_DataPointer (const DTTR_Core_Context *ctx, DTTR_PCDOGS_T_Data_ID id, void *new_value, void **out_original, DTTR_Core_Hook **out_hook)
static DTTR_Result patch_group_hook_symbol_function (DTTR_Core_PatchGroup *group, DTTR_PCDOGS_T_Symbol_Function_ID id, void *detour, void **out_original)
DTTR_Result DTTR_PCDOGS_PatchGroup_HookFunction (DTTR_Core_PatchGroup *group, DTTR_PCDOGS_T_Function_ID id, void *detour, void **out_original)
DTTR_Result DTTR_PCDOGS_PatchGroup_HookDataPointer (DTTR_Core_PatchGroup *group, DTTR_PCDOGS_T_Data_ID id, void *new_value, void **out_original)
static DTTR_Result patch_spec_target (const DTTR_PCDOGS_T_Patch_Spec *spec, DTTR_Core_TargetSpec *out_target)
static DTTR_Result patch_spec_install (DTTR_Core_PatchGroup *group, const DTTR_PCDOGS_T_Patch_Spec *spec)
DTTR_Result DTTR_PCDOGS_PatchGroup_Install (const DTTR_Core_Context *ctx, const DTTR_PCDOGS_T_Patch_Spec *specs, size_t spec_count, DTTR_Core_PatchGroup **out_group, DTTR_PCDOGS_T_Patch_Report *out_report)

Function Documentation

◆ DTTR_PCDOGS_DataResolve()

◆ DTTR_PCDOGS_FunctionResolve()

DTTR_Result DTTR_PCDOGS_FunctionResolve ( const DTTR_Core_Context * ctx,
DTTR_PCDOGS_T_Function_ID id,
uintptr_t * out_addr )

◆ DTTR_PCDOGS_Hook_DataPointer()

DTTR_Result DTTR_PCDOGS_Hook_DataPointer ( const DTTR_Core_Context * ctx,
DTTR_PCDOGS_T_Data_ID id,
void * new_value,
void ** out_original,
DTTR_Core_Hook ** out_hook )

◆ DTTR_PCDOGS_PatchGroup_HookDataPointer()

DTTR_Result DTTR_PCDOGS_PatchGroup_HookDataPointer ( DTTR_Core_PatchGroup * group,
DTTR_PCDOGS_T_Data_ID id,
void * new_value,
void ** out_original )

◆ DTTR_PCDOGS_PatchGroup_HookFunction()

DTTR_Result DTTR_PCDOGS_PatchGroup_HookFunction ( DTTR_Core_PatchGroup * group,
DTTR_PCDOGS_T_Function_ID id,
void * detour,
void ** out_original )

◆ DTTR_PCDOGS_PatchGroup_Install()

◆ DTTR_PCDOGS_SymbolDataResolve()

DTTR_Result DTTR_PCDOGS_SymbolDataResolve ( const DTTR_Core_Context * ctx,
DTTR_PCDOGS_T_Symbol_Data_ID id,
uintptr_t * out_addr )

◆ DTTR_PCDOGS_SymbolFunctionResolve()

DTTR_Result DTTR_PCDOGS_SymbolFunctionResolve ( const DTTR_Core_Context * ctx,
DTTR_PCDOGS_T_Symbol_Function_ID id,
uintptr_t * out_addr )

◆ function_address_at()

uintptr_t function_address_at ( uint32_t index)
static

◆ global_address_at()

uintptr_t global_address_at ( uint32_t index)
static

◆ patch_group_hook_symbol_function()

◆ patch_report_fail()

void patch_report_fail ( DTTR_PCDOGS_T_Patch_Report * report,
size_t index,
DTTR_Result result )
static

Definition at line 11 of file pcdogs_symbols.c.

References dttr_core_report_fail().

Referenced by DTTR_PCDOGS_PatchGroup_Install().

◆ patch_report_init()

void patch_report_init ( DTTR_PCDOGS_T_Patch_Report * report)
static

Definition at line 7 of file pcdogs_symbols.c.

References dttr_core_report_init().

Referenced by DTTR_PCDOGS_PatchGroup_Install().

◆ patch_spec_install()

◆ patch_spec_target()

◆ resolve_symbol()

DTTR_Result resolve_symbol ( const DTTR_Core_Context * ctx,
uint32_t id,
uint32_t count,
uintptr_t(* address_at )(uint32_t index),
uintptr_t * out_addr,
const char * invalid_message,
const char * not_found_message )
static