Skip to content

Commit 91beff6

Browse files
committed
GUI: added INT3 color customization
1 parent 0cf41d2 commit 91beff6

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

x64_dbg_gui/Project/Src/Disassembler/BeaTokenizer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ void BeaTokenizer::Mnemonic(BeaInstructionToken* instr, const DISASM* disasm)
136136
type = TokenMnemonicPushPop;
137137
else if(IsNopInstruction(mnemonic, disasm)) //nop instructions
138138
type = TokenMnemonicNop;
139+
else if(mnemonic == "int3" || mnemonic == "int 3") //int3 instruction on request
140+
type = TokenMnemonicInt3;
139141
else if(completeInstr.contains("movs") || completeInstr.contains("cmps") || completeInstr.contains("scas") || completeInstr.contains("lods") || completeInstr.contains("stos") || completeInstr.contains("outs"))
140142
{
141143
completeInstr = completeInstr.replace("rep ", "").replace("repne ", "");
@@ -470,6 +472,7 @@ void BeaTokenizer::Init()
470472
AddColorName(TokenMnemonicUncondJump, "InstructionUnconditionalJumpColor", "InstructionUnconditionalJumpBackgroundColor");
471473
AddColorName(TokenMnemonicNop, "InstructionNopColor", "InstructionNopBackgroundColor");
472474
AddColorName(TokenMnemonicFar, "InstructionFarColor", "InstructionFarBackgroundColor");
475+
AddColorName(TokenMnemonicInt3, "InstructionInt3Color", "InstructionInt3BackgroundColor");
473476
//memory
474477
AddColorName(TokenMemorySize, "InstructionMemorySizeColor", "InstructionMemorySizeBackgroundColor");
475478
AddColorName(TokenMemorySegment, "InstructionMemorySegmentColor", "InstructionMemorySegmentBackgroundColor");

x64_dbg_gui/Project/Src/Disassembler/BeaTokenizer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class BeaTokenizer : RichTextPainter
3333
TokenMnemonicUncondJump,
3434
TokenMnemonicNop,
3535
TokenMnemonicFar,
36+
TokenMnemonicInt3,
3637
//memory
3738
TokenMemorySize,
3839
TokenMemorySegment,

x64_dbg_gui/Project/Src/Gui/AppearanceDialog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ void AppearanceDialog::colorInfoListInit()
476476
colorInfoListAppend("Unconditional Jumps", "InstructionUnconditionalJumpColor", "InstructionUnconditionalJumpBackgroundColor");
477477
colorInfoListAppend("NOPs", "InstructionNopColor", "InstructionNopBackgroundColor");
478478
colorInfoListAppend("FAR", "InstructionFarColor", "InstructionFarBackgroundColor");
479+
colorInfoListAppend("INT3s", "InstructionInt3Color", "InstructionInt3BackgroundColor");
479480
colorInfoListAppend("General Registers", "InstructionGeneralRegisterColor", "InstructionGeneralRegisterBackgroundColor");
480481
colorInfoListAppend("FPU Registers", "InstructionFpuRegisterColor", "InstructionFpuRegisterBackgroundColor");
481482
colorInfoListAppend("SSE Registers", "InstructionSseRegisterColor", "InstructionSseRegisterBackgroundColor");

x64_dbg_gui/Project/Src/Utils/Configuration.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ Configuration::Configuration() : QObject()
8888
defaultColors.insert("InstructionNopBackgroundColor", Qt::transparent);
8989
defaultColors.insert("InstructionFarColor", QColor("#000000"));
9090
defaultColors.insert("InstructionFarBackgroundColor", Qt::transparent);
91+
defaultColors.insert("InstructionInt3Color", QColor("#000000"));
92+
defaultColors.insert("InstructionInt3BackgroundColor", Qt::transparent);
9193
defaultColors.insert("InstructionMemorySizeColor", QColor("#000080"));
9294
defaultColors.insert("InstructionMemorySizeBackgroundColor", Qt::transparent);
9395
defaultColors.insert("InstructionMemorySegmentColor", QColor("#FF00FF"));

0 commit comments

Comments
 (0)