EXPORT void * CALL DebugMemGetRecompInfo(m64p_dbg_mem_info recomp_type, unsigned int address, int index) { #ifdef DBG switch (recomp_type) { case M64P_DBG_RECOMP_OPCODE: return get_recompiled_opcode(address, index); case M64P_DBG_RECOMP_ARGS: return get_recompiled_args(address, index); case M64P_DBG_RECOMP_ADDR: return get_recompiled_addr(address, index); default: DebugMessage(M64MSG_ERROR, "Bug: DebugMemGetRecompInfo() called with invalid m64p_dbg_mem_info"); return NULL; } #else DebugMessage(M64MSG_ERROR, "Bug: DebugMemGetRecompInfo() called, but Debugger not supported in Core library"); return NULL; #endif }
static void disasm_list_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, gint column, GValue *value) { char opcode[64]; char args[128]; uint32 instr; long laddr; g_return_if_fail (DISASM_IS_LIST (tree_model)); g_return_if_fail (iter != NULL); g_return_if_fail (column < 3); g_value_init (value, disasm_list_get_column_type(tree_model,column)); if(((long)iter->user_data2)==-1) switch(column) { case 0: sprintf(opcode, "%08lX", (long)iter->user_data); g_value_set_string(value, opcode); break; case 1: case 2: if((get_memory_flags((uint32)(long)iter->user_data) & MEM_FLAG_READABLE) != 0) { instr = read_memory_32((uint32)(long)iter->user_data); r4300_decode_op( instr, opcode, args, (long)iter->user_data ); } else { strcpy( opcode, "X+X+X+X"); sprintf( args, "UNREADABLE (%d)",get_memory_type((uint32)(long)iter->user_data)); } if(column==1) g_value_set_string(value, opcode); else g_value_set_string(value, args); break; default: g_value_set_string(value, "xxx"); } else switch(column) { case 0: laddr = (long) get_recompiled_addr((uint32)(long) iter->user_data, (int)(long) iter->user_data2); if (sizeof(void *) == 4) sprintf(opcode, "[%08lX]", laddr); else sprintf(opcode, "[%016lX]", laddr); g_value_set_string(value, opcode); break; case 1: g_value_set_string(value, (char *)get_recompiled_opcode((uint32)(long) iter->user_data, (uint32)(long) iter->user_data2)); break; case 2: g_value_set_string(value, (char *)get_recompiled_args((uint32)(long) iter->user_data, (uint32)(long) iter->user_data2)); break; } }