revision 8:6730608cdaf0
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 8:6730608cdaf0 |
parent | 7:976a16e92aab |
child | 9:2784c7660165 |
author | nkeynes |
date | Sun Dec 12 07:44:49 2004 +0000 (18 years ago) |
Rename reg_map to sh4_reg_map
1.1 --- a/src/gui/debug_win.c Sun Dec 12 07:44:09 2004 +00001.2 +++ b/src/gui/debug_win.c Sun Dec 12 07:44:49 2004 +00001.3 @@ -19,7 +19,10 @@1.4 char *name;1.5 int type;1.6 void *value;1.7 -} reg_map[] = { {"R0", REG_INT, &sh4r.r[0]}, {"R1", REG_INT, &sh4r.r[1]},1.8 +};1.9 +1.10 +struct reg_map_struct sh4_reg_map[] =1.11 + { {"R0", REG_INT, &sh4r.r[0]}, {"R1", REG_INT, &sh4r.r[1]},1.12 {"R2", REG_INT, &sh4r.r[2]}, {"R3", REG_INT, &sh4r.r[3]},1.13 {"R4", REG_INT, &sh4r.r[4]}, {"R5", REG_INT, &sh4r.r[5]},1.14 {"R6", REG_INT, &sh4r.r[6]}, {"R7", REG_INT, &sh4r.r[7]},1.15 @@ -55,12 +58,12 @@1.17 regs = gtk_object_get_data(GTK_OBJECT(win), "reg_list");1.18 arr[1] = buf;1.19 - for( i=0; reg_map[i].name != NULL; i++ ) {1.20 - arr[0] = reg_map[i].name;1.21 - if( reg_map[i].type == REG_INT )1.22 - sprintf( buf, "%08X", *((uint32_t *)reg_map[i].value) );1.23 + for( i=0; sh4_reg_map[i].name != NULL; i++ ) {1.24 + arr[0] = sh4_reg_map[i].name;1.25 + if( sh4_reg_map[i].type == REG_INT )1.26 + sprintf( buf, "%08X", *((uint32_t *)sh4_reg_map[i].value) );1.27 else1.28 - sprintf( buf, "%f", *((float *)reg_map[i].value) );1.29 + sprintf( buf, "%f", *((float *)sh4_reg_map[i].value) );1.30 gtk_clist_append( regs, arr );1.31 }1.32 gtk_widget_modify_font( GTK_WIDGET(regs), fixed_list_font );1.33 @@ -81,23 +84,23 @@1.34 void update_registers( void )1.35 {1.36 int i;1.37 - for( i=0; reg_map[i].name != NULL; i++ ) {1.38 - if( reg_map[i].type == REG_INT ) {1.39 + for( i=0; sh4_reg_map[i].name != NULL; i++ ) {1.40 + if( sh4_reg_map[i].type == REG_INT ) {1.41 /* Yes this _is_ probably fairly evil */1.42 - if( *((uint32_t *)reg_map[i].value) !=1.43 - *((uint32_t *)((char *)&sh4r_s + ((char *)reg_map[i].value - (char *)&sh4r))) ) {1.44 + if( *((uint32_t *)sh4_reg_map[i].value) !=1.45 + *((uint32_t *)((char *)&sh4r_s + ((char *)sh4_reg_map[i].value - (char *)&sh4r))) ) {1.46 char buf[20];1.47 - sprintf( buf, "%08X", *((uint32_t *)reg_map[i].value) );1.48 + sprintf( buf, "%08X", *((uint32_t *)sh4_reg_map[i].value) );1.49 gtk_clist_set_text( regs, i, 1, buf );1.50 gtk_clist_set_foreground( regs, i, &clrChanged );1.51 } else {1.52 gtk_clist_set_foreground( regs, i, &clrNormal );1.53 }1.54 } else {1.55 - if( *((float *)reg_map[i].value) !=1.56 - *((float *)((char *)&sh4r_s + ((char *)reg_map[i].value - (char *)&sh4r))) ) {1.57 + if( *((float *)sh4_reg_map[i].value) !=1.58 + *((float *)((char *)&sh4r_s + ((char *)sh4_reg_map[i].value - (char *)&sh4r))) ) {1.59 char buf[20];1.60 - sprintf( buf, "%f", *((float *)reg_map[i].value) );1.61 + sprintf( buf, "%f", *((float *)sh4_reg_map[i].value) );1.62 gtk_clist_set_text( regs, i, 1, buf );1.63 gtk_clist_set_foreground( regs, i, &clrChanged );1.64 } else {
.