--- upstream/dynamips-0.2.5/mips64.h 2007/10/06 16:01:44 1 +++ upstream/dynamips-0.2.6-RC2/mips64.h 2007/10/06 16:05:34 3 @@ -374,6 +374,15 @@ /* MTS64 chunk forward declaration */ typedef struct mts64_chunk mts64_chunk_t; +/* Maximum results for idle pc */ +#define MIPS64_IDLE_PC_MAX_RES 10 + +/* Idle PC hash item */ +struct mips64_idle_pc { + m_uint64_t pc; + u_int count; +}; + /* MIPS CPU definition */ struct cpu_mips { /* MTS 1st level array */ @@ -432,7 +441,7 @@ /* "Idle" loop management */ volatile m_uint64_t idle_pc; - u_int idle_max,idle_sleep_time; + u_int idle_count,idle_max,idle_sleep_time; pthread_mutex_t idle_mutex; pthread_cond_t idle_cond; @@ -510,6 +519,10 @@ m_uint64_t breakpoints[MIPS64_MAX_BREAKPOINTS]; u_int breakpoints_enabled; + /* Idle PC proposal */ + struct mips64_idle_pc idle_pc_prop[MIPS64_IDLE_PC_MAX_RES]; + u_int idle_pc_prop_count; + /* Symtrace */ int sym_trace; rbtree_tree *sym_tree; @@ -602,6 +615,12 @@ /* Virtual breakpoint */ fastcall void mips64_run_breakpoint(cpu_mips_t *cpu); +/* Add a virtual breakpoint */ +int mips64_add_breakpoint(cpu_mips_t *cpu,m_uint64_t pc); + +/* Remove a virtual breakpoint */ +void mips64_remove_breakpoint(cpu_mips_t *cpu,m_uint64_t pc); + /* Debugging for register-jump to address 0 */ fastcall void mips64_debug_jr0(cpu_mips_t *cpu);