Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
emoon committed Mar 31, 2024
1 parent e78d3c1 commit 64977e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion external/capstone/arch/M68K/M68KDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -3397,7 +3397,7 @@ static int instruction_is_valid(m68k_info *info, const unsigned int word_check)
if ( (i->word2_mask && ((word_check & i->word2_mask) != i->word2_match)) ||
(i->instruction == d68000_invalid) ) {
d68000_invalid(info);
return 0;
return 1;
}

return 1;
Expand Down
19 changes: 0 additions & 19 deletions src/debugger/disassembly_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ static void draw_disassembly(DisassemblyView* self) {
size_t count = cs_disasm(self->capstone, pc_addr - offset, count_bytes, start_disasm, 0, &insn);
//size_t count = cs_disasm(self->capstone, (unsigned char*)M68K_CODE, 2, 0, 0, &insn);

//pc = 0;

int color_index = 0;

memset(&s_selected_registers, 0, sizeof(s_selected_registers));

for (size_t j = 0; j < count; j++) {
Expand Down Expand Up @@ -139,22 +136,6 @@ static void draw_disassembly(DisassemblyView* self) {
ImDrawList* draw_list = ImGui::GetWindowDrawList();
float op_str_start = p.x + ((max_instruction_width - 1) * text_char_width);

/*
for (int i = 0; i < detail->regs_read_string_count; i++) {
const RegisterStringInfo* reg = &detail->regs_read_string_info[i];
ImVec2 start_pos = ImVec2(op_str_start + (reg->offset * text_char_width), p.y);
ImVec2 end_pos = ImVec2(start_pos.x + (reg->length * text_char_width), p.y + text_height);
draw_list->AddRectFilled(start_pos, end_pos, IM_COL32(0, 127, 0, 100));
}
for (int i = 0; i < detail->regs_write_string_count; i++) {
const RegisterStringInfo* reg = &detail->regs_write_string_info[i];
ImVec2 start_pos = ImVec2(op_str_start + (reg->offset * text_char_width), p.y);
ImVec2 end_pos = ImVec2(start_pos.x + (reg->length * text_char_width), p.y + text_height);
draw_list->AddRectFilled(start_pos, end_pos, IM_COL32(127, 0, 0, 100));
}
*/

// Check if the current instruction includes any of the selected registers
for (int i = 0; i < detail->regs_read_count; i++) {
int reg_id = detail->regs_read[i];
Expand Down

0 comments on commit 64977e5

Please sign in to comment.