convert bx_bool to bool in instrumentation stubs

This commit is contained in:
Stanislav Shwartsman 2021-01-31 05:41:43 +00:00
parent 89522c30d8
commit b4a031a70e
5 changed files with 14 additions and 14 deletions

View File

@ -35,15 +35,15 @@
// Use this variable to turn on/off collection of instrumentation data
// If you are not using the debugger to turn this on/off, then possibly
// start this at 1 instead of 0.
static bx_bool active = 1;
static bool active = 1;
static disassembler bx_disassembler;
static struct instruction_t {
bx_bool ready; // is current instruction ready to be printed
bool ready; // is current instruction ready to be printed
unsigned opcode_length;
Bit8u opcode[MAX_OPCODE_LENGTH];
bx_bool is32, is64;
bool is32, is64;
unsigned num_data_accesses;
struct {
bx_address laddr; // linear address
@ -52,8 +52,8 @@ static struct instruction_t {
unsigned size; // 1 .. 64
unsigned memtype;
} data_access[MAX_DATA_ACCESSES];
bx_bool is_branch;
bx_bool is_taken;
bool is_branch;
bool is_taken;
bx_address target_linear;
} *instruction;

View File

@ -39,15 +39,15 @@ void bx_instr_initialize(unsigned cpu);
class bxInstrumentation {
public:
bx_bool ready; // is current instruction ready to be printed
bx_bool active;
bool ready; // is current instruction ready to be printed
bool active;
unsigned cpu_id;
/* decoding */
unsigned opcode_length;
Bit8u opcode[MAX_OPCODE_LENGTH];
bx_bool is32, is64;
bool is32, is64;
/* memory accesses */
unsigned num_data_accesses;
@ -60,8 +60,8 @@ public:
} data_access[MAX_DATA_ACCESSES];
/* branch resolution and target */
bx_bool is_branch;
bx_bool is_taken;
bool is_branch;
bool is_taken;
bx_address target_linear;
public:
@ -72,7 +72,7 @@ public:
void activate() { active = 1; }
void deactivate() { active = 0; }
void toggle_active() { active = !active; }
bx_bool is_active() const { return active; }
bool is_active() const { return active; }
void bx_instr_reset(unsigned type);

View File

@ -28,7 +28,7 @@
#define BX_IA_STATS_ENTRIES (BX_IA_LAST*2) /* /r and /m form */
static struct bx_instr_ia_stats {
bx_bool active;
bool active;
Bit32u ia_cnt[BX_IA_STATS_ENTRIES];
Bit32u total_cnt;
Bit32u interrupts;

View File

@ -41,7 +41,7 @@ void bx_instr_cnear_branch_not_taken(unsigned cpu, bx_address branch_eip) {}
void bx_instr_ucnear_branch(unsigned cpu, unsigned what, bx_address branch_eip, bx_address new_eip) {}
void bx_instr_far_branch(unsigned cpu, unsigned what, Bit16u prev_cs, bx_address prev_eip, Bit16u new_cs, bx_address new_eip) {}
void bx_instr_opcode(unsigned cpu, bxInstruction_c *i, const Bit8u *opcode, unsigned len, bx_bool is32, bx_bool is64) {}
void bx_instr_opcode(unsigned cpu, bxInstruction_c *i, const Bit8u *opcode, unsigned len, bool is32, bool is64) {}
void bx_instr_interrupt(unsigned cpu, unsigned vector) {}
void bx_instr_exception(unsigned cpu, unsigned vector, unsigned error_code) {}

View File

@ -45,7 +45,7 @@ void bx_instr_cnear_branch_not_taken(unsigned cpu, bx_address branch_eip);
void bx_instr_ucnear_branch(unsigned cpu, unsigned what, bx_address branch_eip, bx_address new_eip);
void bx_instr_far_branch(unsigned cpu, unsigned what, Bit16u prev_cs, bx_address prev_eip, Bit16u new_cs, bx_address new_eip);
void bx_instr_opcode(unsigned cpu, bxInstruction_c *i, const Bit8u *opcode, unsigned len, bx_bool is32, bx_bool is64);
void bx_instr_opcode(unsigned cpu, bxInstruction_c *i, const Bit8u *opcode, unsigned len, bool is32, bool is64);
void bx_instr_interrupt(unsigned cpu, unsigned vector);
void bx_instr_exception(unsigned cpu, unsigned vector, unsigned error_code);