filename | src/gui/debug_win.c |
changeset | 30:89b30313d757 |
prev | 29:c29373ff63ee |
next | 33:e74b5bc9d14b |
author | nkeynes |
date | Sun Dec 25 05:57:00 2005 +0000 (18 years ago) |
permissions | -rw-r--r-- |
last change | Change timeslice to nanoseconds (was microseconds) Generize single step (now steps through active CPU) Add lots of header blocks |
file | annotate | diff | log | raw |
1.1 --- a/src/gui/debug_win.c Sun Dec 25 04:54:40 2005 +00001.2 +++ b/src/gui/debug_win.c Sun Dec 25 05:57:00 2005 +00001.3 @@ -1,5 +1,5 @@1.4 /**1.5 - * $Id: debug_win.c,v 1.9 2005-12-25 04:54:40 nkeynes Exp $1.6 + * $Id: debug_win.c,v 1.10 2005-12-25 05:57:00 nkeynes Exp $1.7 * This file is responsible for the main debugger gui frame.1.8 *1.9 * Copyright (c) 2005 Nathan Keynes.1.10 @@ -20,7 +20,7 @@1.11 #include <math.h>1.12 #include "gui.h"1.13 #include "mem.h"1.14 -#include "disasm.h"1.15 +#include "cpu.h"1.17 GdkColor *msg_colors[] = { &clrError, &clrError, &clrWarn, &clrNormal,1.18 &clrDebug, &clrTrace };1.19 @@ -41,7 +41,7 @@1.20 char saved_regs[0];1.21 };1.23 -debug_info_t init_debug_win(GtkWidget *win, struct cpu_desc_struct **cpu_list )1.24 +debug_info_t init_debug_win(GtkWidget *win, const cpu_desc_t *cpu_list )1.25 {1.26 GnomeAppBar *appbar;1.28 @@ -214,7 +214,7 @@1.29 if( strcmp( data->cpu_list[i]->name, cpu ) == 0 ) {1.30 if( data->cpu != data->cpu_list[i] ) {1.31 data->cpu = data->cpu_list[i];1.32 - set_disassembly_region( data, data->disasm_from );1.33 + set_disassembly_pc( data, *data->cpu->pc, FALSE );1.34 init_register_list( data );1.35 }1.36 return;1.37 @@ -222,6 +222,15 @@1.38 }1.39 }1.41 +/**1.42 + * Execute a single instruction using the current CPU mode.1.43 + */1.44 +void debug_win_single_step( debug_info_t data )1.45 +{1.46 + data->cpu->step_func();1.47 + gtk_gui_update();1.48 +}1.49 +1.50 uint32_t row_to_address( debug_info_t data, int row ) {1.51 return data->cpu->instr_size * row + data->disasm_from;1.52 }
.