From: Tim Newsome Date: Mon, 12 Dec 2016 20:48:58 +0000 (-0800) Subject: Reuse the ebreak constants in encoding.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=481afc249eeb63de3f47700af505343a53ffd1b1;p=riscv-isa-sim.git Reuse the ebreak constants in encoding.h. --- diff --git a/riscv/gdbserver.cc b/riscv/gdbserver.cc index 141ffe5..dda120a 100644 --- a/riscv/gdbserver.cc +++ b/riscv/gdbserver.cc @@ -17,9 +17,7 @@ #include "sim.h" #include "gdbserver.h" #include "mmu.h" - -#define C_EBREAK 0x9002 -#define EBREAK 0x00100073 +#include "encoding.h" //////////////////////////////////////// Utility Functions @@ -1936,13 +1934,13 @@ void gdbserver_t::software_breakpoint_insert(reg_t vaddr, unsigned int size) add_operation(new collect_translation_info_op_t(*this, vaddr, size)); unsigned char* inst = new unsigned char[4]; if (size == 2) { - inst[0] = C_EBREAK & 0xff; - inst[1] = (C_EBREAK >> 8) & 0xff; + inst[0] = MATCH_C_EBREAK & 0xff; + inst[1] = (MATCH_C_EBREAK >> 8) & 0xff; } else { - inst[0] = EBREAK & 0xff; - inst[1] = (EBREAK >> 8) & 0xff; - inst[2] = (EBREAK >> 16) & 0xff; - inst[3] = (EBREAK >> 24) & 0xff; + inst[0] = MATCH_EBREAK & 0xff; + inst[1] = (MATCH_EBREAK >> 8) & 0xff; + inst[2] = (MATCH_EBREAK >> 16) & 0xff; + inst[3] = (MATCH_EBREAK >> 24) & 0xff; } software_breakpoint_t bp = {