2017-06-05 02:02:04 +02:00
|
|
|
/*
|
2019-05-03 21:06:10 +02:00
|
|
|
* This file is part of Luma3DS.
|
2020-04-25 13:26:21 +01:00
|
|
|
* Copyright (C) 2016-2020 Aurora Wright, TuxSH
|
2017-06-05 02:02:04 +02:00
|
|
|
*
|
2019-05-03 21:06:10 +02:00
|
|
|
* SPDX-License-Identifier: (MIT OR GPL-2.0-or-later)
|
2017-06-05 02:02:04 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "gdb.h"
|
|
|
|
|
|
|
|
|
|
// We'll actually use SVC 0xFF for breakpoints :P
|
|
|
|
|
#define BREAKPOINT_INSTRUCTION_ARM 0xEF0000FF
|
|
|
|
|
#define BREAKPOINT_INSTRUCTION_THUMB 0xDFFF
|
|
|
|
|
|
|
|
|
|
u32 GDB_FindClosestBreakpointSlot(GDBContext *ctx, u32 address);
|
|
|
|
|
int GDB_GetBreakpointInstruction(u32 *instr, GDBContext *ctx, u32 address);
|
|
|
|
|
int GDB_AddBreakpoint(GDBContext *ctx, u32 address, bool thumb, bool persist);
|
|
|
|
|
int GDB_DisableBreakpointById(GDBContext *ctx, u32 id);
|
|
|
|
|
int GDB_RemoveBreakpoint(GDBContext *ctx, u32 address);
|