1.1 --- a/src/gui/debug_win.c Tue Dec 27 08:41:22 2005 +0000
1.2 +++ b/src/gui/debug_win.c Sun Feb 05 04:02:57 2006 +0000
1.5 - * $Id: debug_win.c,v 1.14 2005-12-27 08:41:22 nkeynes Exp $
1.6 + * $Id: debug_win.c,v 1.15 2006-01-10 13:58:35 nkeynes Exp $
1.7 * This file is responsible for the main debugger gui frame.
1.9 * Copyright (c) 2005 Nathan Keynes.
1.17 #include "gui/gui.h"
1.22 GdkColor *msg_colors[] = { &clrError, &clrError, &clrWarn, &clrNormal,
1.23 &clrDebug, &clrTrace };
1.24 @@ -128,14 +130,14 @@
1.26 void update_icount( debug_info_t data )
1.28 - sprintf( data->icounter_text, "%d", *data->cpu->icount );
1.29 + // sprintf( data->icounter_text, "%d", *data->cpu->icount );
1.30 + sprintf( data->icounter_text, "%d", video_frame_count );
1.31 gtk_progress_bar_set_text( data->icounter, data->icounter_text );
1.34 void set_disassembly_region( debug_info_t data, unsigned int page )
1.36 uint32_t i, posn, next;
1.40 char opcode[16] = "";
1.42 for( i=from; i<to; i = next ) {
1.43 next = data->cpu->disasm_func( i, buf, sizeof(buf), opcode );
1.44 sprintf( addr, "%08X", i );
1.45 - op = sh4_read_phys_word(i);
1.46 posn = gtk_clist_append( data->disasm_list, arr );
1.48 gtk_clist_set_foreground( data->disasm_list, posn, &clrWarn );
1.50 if( strcmp( data->cpu_list[i]->name, cpu ) == 0 ) {
1.51 if( data->cpu != data->cpu_list[i] ) {
1.52 data->cpu = data->cpu_list[i];
1.53 + data->disasm_from = data->disasm_to = -1; /* Force reload */
1.54 set_disassembly_pc( data, *data->cpu->pc, FALSE );
1.55 init_register_list( data );
1.56 update_icount( data );
1.57 @@ -288,8 +290,14 @@
1.60 else data = (debug_info_t)ptr;
1.61 + va_start(ap, msg);
1.63 - va_start(ap, msg);
1.64 + if( data == NULL ) {
1.65 + vfprintf( stderr, msg, ap );
1.70 p = g_strdup_vprintf( msg, ap );
1.71 strftime( buf, sizeof(buf), "%H:%M:%S", localtime(&tm) );
1.72 sprintf( addr, "%08X", *data->cpu->pc );