-
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.
Implemented IDA native conditional breakpoints.
- Loading branch information
Showing
16 changed files
with
2,781 additions
and
1,001 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
*.obj | ||
*.json | ||
*.tlog | ||
*.pdb | ||
*.iobj | ||
|
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug8|Win32'"> | ||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release8|Win32'"> | ||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_68k|Win32'"> | ||
<LocalDebuggerCommandArguments>-nodebug 1</LocalDebuggerCommandArguments> | ||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory> | ||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug8|Win32'"> | ||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release8|Win32'"> | ||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_68k|Win32'"> | ||
<LocalDebuggerCommandArguments> | ||
</LocalDebuggerCommandArguments> | ||
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory> | ||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | ||
</PropertyGroup> | ||
</Project> |
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 |
---|---|---|
@@ -1,79 +1,82 @@ | ||
#ifndef DEBUG_WINDOW_H | ||
#define DEBUG_WINDOW_H | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <map> | ||
|
||
typedef unsigned int uint32; | ||
typedef unsigned short ushort; | ||
|
||
enum class bp_type | ||
{ | ||
BP_PC = 1, | ||
BP_READ, | ||
BP_WRITE, | ||
}; | ||
|
||
struct Breakpoint | ||
{ | ||
bp_type type; | ||
|
||
uint32 start; | ||
uint32 end; | ||
|
||
bool enabled; | ||
bool is_forbid; | ||
|
||
#ifdef DEBUG_68K | ||
bool is_vdp; | ||
|
||
Breakpoint(bp_type _type, uint32 _start, uint32 _end, bool _enabled, bool _is_vdp, bool _is_forbid) : | ||
type(_type), start(_start), end(_end), enabled(_enabled), is_vdp(_is_vdp), is_forbid(_is_forbid) {}; | ||
#else | ||
Breakpoint(bp_type _type, uint32 _start, uint32 _end, bool _enabled, bool _is_forbid) : | ||
type(_type), start(_start), end(_end), enabled(_enabled), is_forbid(_is_forbid) {}; | ||
#endif | ||
}; | ||
|
||
typedef std::vector<Breakpoint> bp_list; | ||
|
||
#ifdef DEBUG_68K | ||
#define MAX_ROM_SIZE 0x800000 | ||
#else | ||
#define MAX_ROM_SIZE 0x10000 // including possible z80 code in 0x8000 - 0xFFFF | ||
#endif | ||
|
||
struct DebugWindow | ||
{ | ||
DebugWindow(); | ||
std::vector<uint32> callstack; | ||
std::map<uint32_t, uint32_t> changed; | ||
bp_list Breakpoints; | ||
|
||
bool DebugStop; | ||
|
||
bool StepInto; | ||
uint32 StepOver; | ||
|
||
void Breakpoint(int pc); | ||
|
||
bool BreakPC(int pc); | ||
#ifdef DEBUG_68K | ||
bool BreakRead(int pc, uint32 start, uint32 stop, bool is_vdp); | ||
bool BreakWrite(int pc, uint32 start, uint32 stop, bool is_vdp); | ||
#else | ||
bool BreakRead(int pc, uint32 start, uint32 stop); | ||
bool BreakWrite(int pc, uint32 start, uint32 stop); | ||
#endif | ||
|
||
virtual void DoStepOver(); | ||
virtual void TracePC(int pc); | ||
virtual void TraceRead(uint32 start, uint32 stop); | ||
virtual void TraceWrite(uint32 start, uint32 stop); | ||
virtual ~DebugWindow(); | ||
}; | ||
|
||
extern void send_pause_event(int pc, std::map<uint32_t, uint32_t> changed); | ||
|
||
#endif | ||
#ifndef DEBUG_WINDOW_H | ||
#define DEBUG_WINDOW_H | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <map> | ||
|
||
typedef unsigned int uint32; | ||
typedef unsigned short ushort; | ||
|
||
enum class bp_type | ||
{ | ||
BP_PC = 1, | ||
BP_READ, | ||
BP_WRITE, | ||
}; | ||
|
||
struct Breakpoint | ||
{ | ||
bp_type type; | ||
|
||
uint32 start; | ||
uint32 end; | ||
|
||
bool enabled; | ||
|
||
uint32 elang; | ||
std::string condition; | ||
|
||
#ifdef DEBUG_68K | ||
bool is_vdp; | ||
|
||
Breakpoint(bp_type _type, uint32 _start, uint32 _end, bool _enabled, bool _is_vdp, uint32 _elang, const std::string & _condition) : | ||
type(_type), start(_start), end(_end), enabled(_enabled), is_vdp(_is_vdp), elang(_elang), condition(_condition) {}; | ||
#else | ||
Breakpoint(bp_type _type, uint32 _start, uint32 _end, bool _enabled, uint32 _elang, const std::string& _condition) : | ||
type(_type), start(_start), end(_end), enabled(_enabled), elang(_elang), condition(_condition) {}; | ||
#endif | ||
}; | ||
|
||
typedef std::vector<Breakpoint> bp_list; | ||
|
||
#ifdef DEBUG_68K | ||
#define MAX_ROM_SIZE 0x800000 | ||
#else | ||
#define MAX_ROM_SIZE 0x10000 // including possible z80 code in 0x8000 - 0xFFFF | ||
#endif | ||
|
||
struct DebugWindow | ||
{ | ||
DebugWindow(); | ||
std::vector<uint32> callstack; | ||
std::map<uint32_t, uint32_t> changed; | ||
bp_list Breakpoints; | ||
|
||
bool DebugStop; | ||
|
||
bool StepInto; | ||
uint32 StepOver; | ||
|
||
void Breakpoint(int pc); | ||
|
||
bool BreakPC(int pc); | ||
#ifdef DEBUG_68K | ||
bool BreakRead(int pc, uint32 start, uint32 stop, bool is_vdp); | ||
bool BreakWrite(int pc, uint32 start, uint32 stop, bool is_vdp); | ||
#else | ||
bool BreakRead(int pc, uint32 start, uint32 stop); | ||
bool BreakWrite(int pc, uint32 start, uint32 stop); | ||
#endif | ||
|
||
virtual void DoStepOver(); | ||
virtual void TracePC(int pc); | ||
virtual void TraceRead(uint32 start, uint32 stop); | ||
virtual void TraceWrite(uint32 start, uint32 stop); | ||
virtual ~DebugWindow(); | ||
}; | ||
|
||
extern void send_pause_event(int pc, std::map<uint32_t, uint32_t> changed); | ||
extern bool evaluate_condition(uint32 elang, const char* condition); | ||
|
||
#endif |
Oops, something went wrong.