Search
lxdream.org :: lxdream :: r45:f99236f0632e
lxdream 0.9.1
released Jun 29
Download Now
changeset45:f99236f0632e
parent44:8da2cbcffe24
child46:30d123047e16
authornkeynes
dateTue Dec 27 08:41:22 2005 +0000 (14 years ago)
Fix output list click
Fix mmr column widths
Fix run-to for ARM
src/gui/callbacks.c
src/gui/debug_win.c
src/gui/gui.h
src/gui/mmio_win.c
1.1 --- a/src/gui/callbacks.c Mon Dec 26 11:52:56 2005 +0000
1.2 +++ b/src/gui/callbacks.c Tue Dec 27 08:41:22 2005 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: callbacks.c,v 1.11 2005-12-26 11:47:15 nkeynes Exp $
1.6 + * $Id: callbacks.c,v 1.12 2005-12-27 08:41:22 nkeynes Exp $
1.7 *
1.8 * All GTK callbacks go here (stubs are autogenerated by Glade)
1.9 *
1.10 @@ -138,8 +138,8 @@
1.11 if( selected_pc == -1 )
1.12 WARN( "No address selected, so can't run to it", NULL );
1.13 else {
1.14 - INFO( "Running until %08X...", selected_pc );
1.15 - sh4_set_breakpoint( selected_pc, BREAK_ONESHOT );
1.16 + debug_info_t data = get_debug_info(GTK_WIDGET(button));
1.17 + debug_win_set_oneshot_breakpoint( data, selected_row );
1.18 dreamcast_run();
1.19 }
1.20 }
1.21 @@ -150,7 +150,7 @@
1.22 gpointer user_data)
1.23 {
1.24 debug_info_t data = get_debug_info(GTK_WIDGET(button));
1.25 - debug_win_toggle_breakpoint( data, selected_row, BREAK_KEEP );
1.26 + debug_win_toggle_breakpoint( data, selected_row );
1.27 }
1.28
1.29
1.30 @@ -265,7 +265,7 @@
1.31 {
1.32 if( event->type == GDK_2BUTTON_PRESS && event->button.button == 1 ) {
1.33 char *val;
1.34 - gtk_clist_get_text( clist, row, 1, &val );
1.35 + gtk_clist_get_text( clist, row, 2, &val );
1.36 if( val[0] != '\0' ) {
1.37 int addr = strtoul( val, NULL, 16 );
1.38 debug_info_t data = get_debug_info( GTK_WIDGET(clist) );
2.1 --- a/src/gui/debug_win.c Mon Dec 26 11:52:56 2005 +0000
2.2 +++ b/src/gui/debug_win.c Tue Dec 27 08:41:22 2005 +0000
2.3 @@ -1,5 +1,5 @@
2.4 /**
2.5 - * $Id: debug_win.c,v 1.13 2005-12-26 11:47:15 nkeynes Exp $
2.6 + * $Id: debug_win.c,v 1.14 2005-12-27 08:41:22 nkeynes Exp $
2.7 * This file is responsible for the main debugger gui frame.
2.8 *
2.9 * Copyright (c) 2005 Nathan Keynes.
2.10 @@ -25,6 +25,8 @@
2.11 GdkColor *msg_colors[] = { &clrError, &clrError, &clrWarn, &clrNormal,
2.12 &clrDebug, &clrTrace };
2.13
2.14 +void init_register_list( debug_info_t data );
2.15 +
2.16 struct debug_info_struct {
2.17 int disasm_from;
2.18 int disasm_to;
2.19 @@ -234,28 +236,25 @@
2.20 }
2.21 }
2.22
2.23 -void debug_win_toggle_breakpoint( debug_info_t data, int row, int type )
2.24 +void debug_win_toggle_breakpoint( debug_info_t data, int row )
2.25 {
2.26 uint32_t pc = row_to_address( data, row );
2.27 int oldType = data->cpu->get_breakpoint( pc );
2.28 if( oldType != BREAK_NONE ) {
2.29 data->cpu->clear_breakpoint( pc, oldType );
2.30 - type = BREAK_NONE;
2.31 + gtk_clist_set_background( data->disasm_list, row, &clrWhite );
2.32 } else {
2.33 - if( data->cpu->set_breakpoint != NULL )
2.34 - data->cpu->set_breakpoint( pc, type );
2.35 + data->cpu->set_breakpoint( pc, BREAK_KEEP );
2.36 + gtk_clist_set_background( data->disasm_list, row, &clrBreak );
2.37 }
2.38 - switch(type) {
2.39 - case BREAK_ONESHOT:
2.40 - gtk_clist_set_background( data->disasm_list, row, &clrTempBreak );
2.41 - break;
2.42 - case BREAK_KEEP:
2.43 - gtk_clist_set_background( data->disasm_list, row, &clrBreak );
2.44 - break;
2.45 - default:
2.46 - gtk_clist_set_background( data->disasm_list, row, &clrWhite );
2.47 - break;
2.48 - }
2.49 +}
2.50 +
2.51 +void debug_win_set_oneshot_breakpoint( debug_info_t data, int row )
2.52 +{
2.53 + uint32_t pc = row_to_address( data, row );
2.54 + data->cpu->clear_breakpoint( pc, BREAK_ONESHOT );
2.55 + data->cpu->set_breakpoint( pc, BREAK_ONESHOT );
2.56 + gtk_clist_set_background( data->disasm_list, row, &clrTempBreak );
2.57 }
2.58
2.59 /**
3.1 --- a/src/gui/gui.h Mon Dec 26 11:52:56 2005 +0000
3.2 +++ b/src/gui/gui.h Tue Dec 27 08:41:22 2005 +0000
3.3 @@ -1,5 +1,5 @@
3.4 /**
3.5 - * $Id: gui.h,v 1.13 2005-12-26 11:47:15 nkeynes Exp $
3.6 + * $Id: gui.h,v 1.14 2005-12-27 08:41:22 nkeynes Exp $
3.7 *
3.8 * General GUI definitions
3.9 *
3.10 @@ -57,7 +57,8 @@
3.11 void jump_to_pc( debug_info_t debug, gboolean select );
3.12 void debug_win_set_running( debug_info_t debug, gboolean isRunning );
3.13 void debug_win_single_step( debug_info_t debug );
3.14 -void debug_win_toggle_breakpoint( debug_info_t debug, int row, int type );
3.15 +void debug_win_toggle_breakpoint( debug_info_t debug, int row );
3.16 +void debug_win_set_oneshot_breakpoint( debug_info_t debug, int row );
3.17 uint32_t row_to_address( debug_info_t debug, int row );
3.18 int address_to_row( debug_info_t debug, uint32_t address );
3.19
4.1 --- a/src/gui/mmio_win.c Mon Dec 26 11:52:56 2005 +0000
4.2 +++ b/src/gui/mmio_win.c Tue Dec 27 08:41:22 2005 +0000
4.3 @@ -1,5 +1,5 @@
4.4 /**
4.5 - * $Id: mmio_win.c,v 1.2 2005-12-25 08:24:11 nkeynes Exp $
4.6 + * $Id: mmio_win.c,v 1.3 2005-12-27 08:41:22 nkeynes Exp $
4.7 *
4.8 * Implements the MMIO register viewing window
4.9 *
4.10 @@ -67,10 +67,10 @@
4.11 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scroll),
4.12 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS );
4.13 list = GTK_CLIST(gtk_clist_new(5));
4.14 - gtk_clist_set_column_width(list, 0, 60);
4.15 - gtk_clist_set_column_width(list, 1, 50);
4.16 - gtk_clist_set_column_width(list, 2, 60);
4.17 - gtk_clist_set_column_width(list, 3, 220);
4.18 + gtk_clist_set_column_width(list, 0, 70);
4.19 + gtk_clist_set_column_width(list, 1, 75);
4.20 + gtk_clist_set_column_width(list, 2, 70);
4.21 + gtk_clist_set_column_width(list, 3, 280);
4.22 gtk_clist_set_column_width(list, 4, 160);
4.23 gtk_clist_set_column_justification(list, 0, GTK_JUSTIFY_CENTER );
4.24 gtk_clist_set_column_justification(list, 2, GTK_JUSTIFY_CENTER );
.