improved iteraction of internal dbger with instrumentation
This commit is contained in:
parent
7d01754bae
commit
6758f9e49a
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: dbg_main.cc,v 1.197 2009-06-01 14:50:19 sshwarts Exp $
|
||||
// $Id: dbg_main.cc,v 1.198 2009-07-03 15:05:43 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -2704,25 +2704,10 @@ void bx_dbg_disassemble_command(const char *format, Bit64u from, Bit64u to)
|
||||
void bx_dbg_instrument_command(const char *comm)
|
||||
{
|
||||
#if BX_INSTRUMENTATION
|
||||
if (!strcmp(comm, "start")) {
|
||||
BX_INSTR_START();
|
||||
}
|
||||
else if (!strcmp(comm, "stop")) {
|
||||
BX_INSTR_STOP();
|
||||
}
|
||||
else if (!strcmp(comm, "reset")) {
|
||||
BX_INSTR_RESET(dbg_cpu, BX_RESET_HARDWARE);
|
||||
}
|
||||
else if (!strcmp(comm, "print")) {
|
||||
BX_INSTR_PRINT();
|
||||
}
|
||||
else {
|
||||
dbg_printf("Error: command 'instrument %s' not recognized\n", comm);
|
||||
bx_dbg_exit(1);
|
||||
}
|
||||
dbg_printf("Command '%s' passed to instrumentation module\n", comm);
|
||||
bx_instr_debug_cmd(comm);
|
||||
#else
|
||||
UNUSED(comm);
|
||||
|
||||
dbg_printf("Error: instrumentation not enabled.\n");
|
||||
#endif
|
||||
}
|
||||
@ -2731,8 +2716,6 @@ void bx_dbg_doit_command(unsigned n)
|
||||
{
|
||||
// generic command to add temporary hacks to
|
||||
// for debugging purposes
|
||||
UNUSED(n);
|
||||
|
||||
bx_dbg.interrupts = n;
|
||||
bx_dbg.exceptions = n;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.h,v 1.34 2009-02-09 10:35:55 vruppert Exp $
|
||||
// $Id: instrument.h,v 1.35 2009-07-03 15:05:44 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -92,9 +92,7 @@ void bx_instr_mem_data_access(unsigned cpu, unsigned seg, bx_address offset, uns
|
||||
|
||||
/* called from command line debugger */
|
||||
#define BX_INSTR_DEBUG_PROMPT()
|
||||
#define BX_INSTR_START()
|
||||
#define BX_INSTR_STOP()
|
||||
#define BX_INSTR_PRINT()
|
||||
#define BX_INSTR_DEBUG_CMD(cmd)
|
||||
|
||||
/* branch resoultion */
|
||||
#define BX_INSTR_CNEAR_BRANCH_TAKEN(cpu_id, new_eip) bx_instr_cnear_branch_taken(cpu_id, new_eip)
|
||||
@ -159,9 +157,7 @@ void bx_instr_mem_data_access(unsigned cpu, unsigned seg, bx_address offset, uns
|
||||
|
||||
/* called from command line debugger */
|
||||
#define BX_INSTR_DEBUG_PROMPT()
|
||||
#define BX_INSTR_START()
|
||||
#define BX_INSTR_STOP()
|
||||
#define BX_INSTR_PRINT()
|
||||
#define BX_INSTR_DEBUG_CMD(cmd)
|
||||
|
||||
/* branch resoultion */
|
||||
#define BX_INSTR_CNEAR_BRANCH_TAKEN(cpu_id, new_eip)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.h,v 1.33 2009-03-22 09:52:48 sshwarts Exp $
|
||||
// $Id: instrument.h,v 1.34 2009-07-03 15:05:44 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -142,9 +142,7 @@ extern bxInstrumentation *icpu;
|
||||
|
||||
/* called from command line debugger */
|
||||
#define BX_INSTR_DEBUG_PROMPT()
|
||||
#define BX_INSTR_START()
|
||||
#define BX_INSTR_STOP()
|
||||
#define BX_INSTR_PRINT()
|
||||
#define BX_INSTR_DEBUG_CMD(cmd)
|
||||
|
||||
/* branch resoultion */
|
||||
#define BX_INSTR_CNEAR_BRANCH_TAKEN(cpu_id, new_eip) icpu[cpu_id].bx_instr_cnear_branch_taken(new_eip)
|
||||
@ -208,9 +206,7 @@ extern bxInstrumentation *icpu;
|
||||
|
||||
/* called from command line debugger */
|
||||
#define BX_INSTR_DEBUG_PROMPT()
|
||||
#define BX_INSTR_START()
|
||||
#define BX_INSTR_STOP()
|
||||
#define BX_INSTR_PRINT()
|
||||
#define BX_INSTR_DEBUG_CMD(cmd)
|
||||
|
||||
/* branch resoultion */
|
||||
#define BX_INSTR_CNEAR_BRANCH_TAKEN(cpu_id, new_eip)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.cc,v 1.32 2009-02-09 10:35:55 vruppert Exp $
|
||||
// $Id: instrument.cc,v 1.33 2009-07-03 15:05:44 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -40,9 +40,7 @@ void bx_instr_mwait(unsigned cpu, bx_phy_address addr, unsigned len, Bit32u flag
|
||||
void bx_instr_new_instruction(unsigned cpu) {}
|
||||
|
||||
void bx_instr_debug_promt() {}
|
||||
void bx_instr_start() {}
|
||||
void bx_instr_stop() {}
|
||||
void bx_instr_print() {}
|
||||
void bx_instr_debug_cmd(const char *cmd) {}
|
||||
|
||||
void bx_instr_cnear_branch_taken(unsigned cpu, bx_address new_eip) {}
|
||||
void bx_instr_cnear_branch_not_taken(unsigned cpu) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: instrument.h,v 1.41 2009-06-20 20:44:12 sshwarts Exp $
|
||||
// $Id: instrument.h,v 1.42 2009-07-03 15:05:44 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -69,9 +69,7 @@ void bx_instr_mwait(unsigned cpu, bx_phy_address addr, unsigned len, Bit32u flag
|
||||
void bx_instr_new_instruction(unsigned cpu);
|
||||
|
||||
void bx_instr_debug_promt();
|
||||
void bx_instr_start();
|
||||
void bx_instr_stop();
|
||||
void bx_instr_print();
|
||||
void bx_instr_debug_command(const char *cmd);
|
||||
|
||||
void bx_instr_cnear_branch_taken(unsigned cpu, bx_address new_eip);
|
||||
void bx_instr_cnear_branch_not_taken(unsigned cpu);
|
||||
@ -122,9 +120,7 @@ void bx_instr_wrmsr(unsigned cpu, unsigned addr, Bit64u value);
|
||||
|
||||
/* called from command line debugger */
|
||||
#define BX_INSTR_DEBUG_PROMPT() bx_instr_debug_promt()
|
||||
#define BX_INSTR_START() bx_instr_start()
|
||||
#define BX_INSTR_STOP() bx_instr_stop()
|
||||
#define BX_INSTR_PRINT() bx_instr_print()
|
||||
#define BX_INSTR_DEBUG_CMD(cmd) bx_instr_debug_cmd(cmd)
|
||||
|
||||
/* branch resoultion */
|
||||
#define BX_INSTR_CNEAR_BRANCH_TAKEN(cpu_id, new_eip) bx_instr_cnear_branch_taken(cpu_id, new_eip)
|
||||
@ -189,9 +185,7 @@ void bx_instr_wrmsr(unsigned cpu, unsigned addr, Bit64u value);
|
||||
|
||||
/* called from command line debugger */
|
||||
#define BX_INSTR_DEBUG_PROMPT()
|
||||
#define BX_INSTR_START()
|
||||
#define BX_INSTR_STOP()
|
||||
#define BX_INSTR_PRINT()
|
||||
#define BX_INSTR_DEBUG_CMD(cmd)
|
||||
|
||||
/* branch resoultion */
|
||||
#define BX_INSTR_CNEAR_BRANCH_TAKEN(cpu_id, new_eip)
|
||||
|
Loading…
Reference in New Issue
Block a user