Search
lxdream.org :: lxdream/src/gtkui/gtk_debug.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gtkui/gtk_debug.c
changeset 1065:bc1cc0c54917
prev574:d6c015ea56bd
prev1000:6e4cabe2b32b
next1091:186558374345
author nkeynes
date Sun Jul 05 13:52:50 2009 +1000 (10 years ago)
permissions -rw-r--r--
last change No-op merge lxdream-mmu to remove head (actually merged long ago)
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/gtkui/gtk_debug.c Sun Jul 05 13:52:50 2009 +1000
1.3 @@ -0,0 +1,465 @@
1.4 +/**
1.5 + * $Id$
1.6 + * This file is responsible for the main debugger gui frame.
1.7 + *
1.8 + * Copyright (c) 2005 Nathan Keynes.
1.9 + *
1.10 + * This program is free software; you can redistribute it and/or modify
1.11 + * it under the terms of the GNU General Public License as published by
1.12 + * the Free Software Foundation; either version 2 of the License, or
1.13 + * (at your option) any later version.
1.14 + *
1.15 + * This program is distributed in the hope that it will be useful,
1.16 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.17 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.18 + * GNU General Public License for more details.
1.19 + */
1.20 +#include <stdlib.h>
1.21 +#include <stdarg.h>
1.22 +#include <stdio.h>
1.23 +#include <string.h>
1.24 +#include <math.h>
1.25 +#include <gdk/gdkkeysyms.h>
1.26 +#include "mem.h"
1.27 +#include "cpu.h"
1.28 +#include "dreamcast.h"
1.29 +#include "gtkui/gtkui.h"
1.30 +#include "sh4/sh4.h"
1.31 +#include "aica/armdasm.h"
1.32 +
1.33 +GdkColor *msg_colors[] = { &gui_colour_error, &gui_colour_error, &gui_colour_warn,
1.34 + &gui_colour_normal,&gui_colour_debug, &gui_colour_trace };
1.35 +
1.36 +const cpu_desc_t cpu_list[4] = { &sh4_cpu_desc, &arm_cpu_desc, &armt_cpu_desc, NULL };
1.37 +
1.38 +void init_register_list( debug_window_t data );
1.39 +uint32_t row_to_address( debug_window_t data, int row );
1.40 +int address_to_row( debug_window_t data, uint32_t address );
1.41 +void set_disassembly_pc( debug_window_t data, unsigned int pc, gboolean select );
1.42 +void set_disassembly_region( debug_window_t data, unsigned int page );
1.43 +void set_disassembly_cpu( debug_window_t data, const gchar *cpu );
1.44 +
1.45 +void on_mode_field_changed ( GtkEditable *editable, gpointer user_data);
1.46 +gboolean on_page_field_key_press_event( GtkWidget * widget, GdkEventKey *event,
1.47 + gpointer user_data);
1.48 +void on_jump_pc_btn_clicked( GtkButton *button, gpointer user_data);
1.49 +void on_disasm_list_select_row (GtkCList *clist, gint row, gint column,
1.50 + GdkEvent *event, gpointer user_data);
1.51 +void on_disasm_list_unselect_row (GtkCList *clist, gint row, gint column,
1.52 + GdkEvent *event, gpointer user_data);
1.53 +gboolean on_debug_delete_event(GtkWidget *widget, GdkEvent event, gpointer user_data);
1.54 +
1.55 +struct debug_window_info {
1.56 + int disasm_from;
1.57 + int disasm_to;
1.58 + int disasm_pc;
1.59 + const struct cpu_desc_struct *cpu;
1.60 + const cpu_desc_t *cpu_list;
1.61 + GtkCList *regs_list;
1.62 + GtkCList *disasm_list;
1.63 + GtkEntry *page_field;
1.64 + GtkWidget *window;
1.65 + GtkWidget *statusbar;
1.66 + char saved_regs[0];
1.67 +};
1.68 +
1.69 +debug_window_t debug_window_new( const gchar *title, GtkWidget *menubar,
1.70 + GtkWidget *toolbar, GtkAccelGroup *accel_group )
1.71 +{
1.72 + debug_window_t data = g_malloc0( sizeof(struct debug_window_info) + cpu_list[0]->regs_size );
1.73 + GtkWidget *vbox;
1.74 +
1.75 + data->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
1.76 + gtk_window_set_default_size (GTK_WINDOW (data->window), 700, 480);
1.77 + gtk_window_set_title( GTK_WINDOW(data->window), title );
1.78 + gtk_window_add_accel_group (GTK_WINDOW (data->window), accel_group);
1.79 +
1.80 + gtk_toolbar_set_style( GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS );
1.81 +
1.82 + data->statusbar = gtk_statusbar_new();
1.83 +
1.84 + GtkWidget *hpaned = gtk_hpaned_new ();
1.85 + gtk_paned_set_position (GTK_PANED (hpaned), 500);
1.86 +
1.87 + GtkWidget *disasm_box = gtk_vbox_new(FALSE,0);
1.88 + gtk_paned_pack1 (GTK_PANED (hpaned), disasm_box, TRUE, TRUE);
1.89 +
1.90 + GtkWidget *hbox1 = gtk_hbox_new (FALSE, 0);
1.91 + gtk_box_pack_start (GTK_BOX (disasm_box), hbox1, FALSE, FALSE, 3);
1.92 + gtk_box_pack_start (GTK_BOX (hbox1), gtk_label_new (_("Page")), FALSE, FALSE, 4);
1.93 +
1.94 + data->page_field = GTK_ENTRY(gtk_entry_new ());
1.95 + gtk_box_pack_start (GTK_BOX (hbox1), GTK_WIDGET(data->page_field), FALSE, TRUE, 0);
1.96 +
1.97 + GtkWidget *jump_pc_btn = gtk_button_new_with_mnemonic (_(" Jump to PC "));
1.98 + gtk_box_pack_start (GTK_BOX (hbox1), jump_pc_btn, FALSE, FALSE, 4);
1.99 +
1.100 + gtk_box_pack_start (GTK_BOX (hbox1), gtk_label_new(_("Mode")), FALSE, FALSE, 5);
1.101 +
1.102 + GtkWidget *mode_box = gtk_combo_new ();
1.103 + gtk_box_pack_start (GTK_BOX (hbox1), mode_box, FALSE, FALSE, 0);
1.104 + GList *mode_box_items = NULL;
1.105 + mode_box_items = g_list_append (mode_box_items, (gpointer) _("SH4"));
1.106 + mode_box_items = g_list_append (mode_box_items, (gpointer) _("ARM7"));
1.107 + mode_box_items = g_list_append (mode_box_items, (gpointer) _("ARM7T"));
1.108 + gtk_combo_set_popdown_strings (GTK_COMBO (mode_box), mode_box_items);
1.109 + g_list_free (mode_box_items);
1.110 +
1.111 + GtkWidget *mode_field = GTK_COMBO (mode_box)->entry;
1.112 + gtk_editable_set_editable (GTK_EDITABLE (mode_field), FALSE);
1.113 +
1.114 + GtkWidget *disasm_scroll = gtk_scrolled_window_new (NULL, NULL);
1.115 + gtk_box_pack_start (GTK_BOX (disasm_box), disasm_scroll, TRUE, TRUE, 0);
1.116 + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (disasm_scroll), GTK_SHADOW_IN);
1.117 + data->disasm_list = GTK_CLIST(gtk_clist_new (4));
1.118 + gtk_clist_set_column_width (GTK_CLIST (data->disasm_list), 0, 80);
1.119 + gtk_clist_set_column_width (GTK_CLIST (data->disasm_list), 2, 80);
1.120 + gtk_clist_set_column_width (GTK_CLIST (data->disasm_list), 3, 80);
1.121 + gtk_clist_set_column_width( data->disasm_list, 1, 16 );
1.122 + gtk_clist_column_titles_hide (GTK_CLIST (data->disasm_list));
1.123 + gtk_container_add (GTK_CONTAINER (disasm_scroll), GTK_WIDGET(data->disasm_list));
1.124 +
1.125 + GtkWidget *reg_scroll = gtk_scrolled_window_new (NULL, NULL);
1.126 + gtk_paned_pack2 (GTK_PANED (hpaned), reg_scroll, FALSE, TRUE);
1.127 + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (reg_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
1.128 + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (reg_scroll), GTK_SHADOW_IN);
1.129 +
1.130 + data->regs_list = GTK_CLIST(gtk_clist_new (2));
1.131 + gtk_container_add (GTK_CONTAINER (reg_scroll), GTK_WIDGET(data->regs_list));
1.132 + gtk_clist_set_column_width (GTK_CLIST (data->regs_list), 0, 80);
1.133 + gtk_clist_set_column_width (GTK_CLIST (data->regs_list), 1, 80);
1.134 + gtk_clist_column_titles_hide (GTK_CLIST (data->regs_list));
1.135 + gtk_widget_modify_font( GTK_WIDGET(data->regs_list), gui_fixed_font );
1.136 +
1.137 + vbox = gtk_vbox_new(FALSE, 0);
1.138 + gtk_container_add( GTK_CONTAINER(data->window), vbox );
1.139 + gtk_box_pack_start( GTK_BOX(vbox), menubar, FALSE, FALSE, 0 );
1.140 + gtk_box_pack_start( GTK_BOX(vbox), toolbar, FALSE, FALSE, 0 );
1.141 + gtk_box_pack_start( GTK_BOX(vbox), hpaned, TRUE, TRUE, 0 );
1.142 + gtk_box_pack_start( GTK_BOX(vbox), data->statusbar, FALSE, FALSE, 0 );
1.143 +
1.144 + g_signal_connect ((gpointer) data->page_field, "key_press_event",
1.145 + G_CALLBACK (on_page_field_key_press_event),
1.146 + data);
1.147 + g_signal_connect ((gpointer) jump_pc_btn, "clicked",
1.148 + G_CALLBACK (on_jump_pc_btn_clicked),
1.149 + data);
1.150 + g_signal_connect ((gpointer) mode_field, "changed",
1.151 + G_CALLBACK (on_mode_field_changed),
1.152 + data);
1.153 + g_signal_connect ((gpointer) data->disasm_list, "select_row",
1.154 + G_CALLBACK (on_disasm_list_select_row),
1.155 + data);
1.156 + g_signal_connect ((gpointer) data->disasm_list, "unselect_row",
1.157 + G_CALLBACK (on_disasm_list_unselect_row),
1.158 + data);
1.159 + g_signal_connect ((gpointer) data->window, "delete_event",
1.160 + G_CALLBACK (on_debug_delete_event),
1.161 + data);
1.162 +
1.163 + data->disasm_from = -1;
1.164 + data->disasm_to = -1;
1.165 + data->disasm_pc = -1;
1.166 + data->cpu = cpu_list[0];
1.167 + data->cpu_list = cpu_list;
1.168 +
1.169 + init_register_list( data );
1.170 + gtk_object_set_data( GTK_OBJECT(data->window), "debug_data", data );
1.171 + set_disassembly_pc( data, *data->cpu->pc, FALSE );
1.172 + debug_window_set_running( data, FALSE );
1.173 +
1.174 + gtk_widget_show_all( data->window );
1.175 + return data;
1.176 +}
1.177 +
1.178 +void debug_window_show( debug_window_t data, gboolean show )
1.179 +{
1.180 + if( show ) {
1.181 + gtk_widget_show( data->window );
1.182 + } else {
1.183 + gtk_widget_hide( data->window );
1.184 + }
1.185 +}
1.186 +
1.187 +int debug_window_get_selected_row( debug_window_t data )
1.188 +{
1.189 + if( data->disasm_list->selection == NULL ) {
1.190 + return -1;
1.191 + } else {
1.192 + return GPOINTER_TO_INT(data->disasm_list->selection->data);
1.193 + }
1.194 +}
1.195 +
1.196 +void init_register_list( debug_window_t data )
1.197 +{
1.198 + int i;
1.199 + char buf[20];
1.200 + char *arr[2];
1.201 +
1.202 + gtk_clist_clear( data->regs_list );
1.203 + arr[1] = buf;
1.204 + for( i=0; data->cpu->regs_info[i].name != NULL; i++ ) {
1.205 + arr[0] = data->cpu->regs_info[i].name;
1.206 + void *value = data->cpu->get_register(i);
1.207 + if( value != NULL ) {
1.208 + if( data->cpu->regs_info->type == REG_INT ) {
1.209 + sprintf( buf, "%08X", *((uint32_t *)value) );
1.210 + gtk_clist_append( data->regs_list, arr );
1.211 + } else if( data->cpu->regs_info->type == REG_FLOAT ) {
1.212 + sprintf( buf, "%f", *((float *)value) );
1.213 + gtk_clist_append( data->regs_list, arr );
1.214 + }
1.215 + }
1.216 + }
1.217 +}
1.218 +
1.219 +/*
1.220 + * Check for changed registers and update the display
1.221 + */
1.222 +void debug_window_update( debug_window_t data )
1.223 +{
1.224 + int i;
1.225 + int posn = 0;
1.226 + for( i=0; data->cpu->regs_info[i].name != NULL; i++ ) {
1.227 + void *value = data->cpu->get_register(i);
1.228 + if( value != NULL ) {
1.229 + if( data->cpu->regs_info[i].type == REG_INT ) {
1.230 + /* Yes this _is_ probably fairly evil */
1.231 + if( *((uint32_t *)value) !=
1.232 + *((uint32_t *)((char *)data->saved_regs + ((char *)value - (char *)data->cpu->regs))) ) {
1.233 + char buf[20];
1.234 + sprintf( buf, "%08X", *((uint32_t *)value) );
1.235 + gtk_clist_set_text( data->regs_list, posn, 1, buf );
1.236 + gtk_clist_set_foreground( data->regs_list, posn, &gui_colour_changed );
1.237 + } else {
1.238 + gtk_clist_set_foreground( data->regs_list, posn, &gui_colour_normal );
1.239 + }
1.240 + posn++;
1.241 + } else {
1.242 + if( *((float *)value) !=
1.243 + *((float *)((char *)data->saved_regs + ((char *)value - (char *)data->cpu->regs))) ) {
1.244 + char buf[20];
1.245 + sprintf( buf, "%f", *((float *)value) );
1.246 + gtk_clist_set_text( data->regs_list, i, posn, buf );
1.247 + gtk_clist_set_foreground( data->regs_list, posn, &gui_colour_changed );
1.248 + } else {
1.249 + gtk_clist_set_foreground( data->regs_list, posn, &gui_colour_normal );
1.250 + }
1.251 + posn++;
1.252 + }
1.253 + }
1.254 + }
1.255 +
1.256 + set_disassembly_pc( data, *data->cpu->pc, TRUE );
1.257 + memcpy( data->saved_regs, data->cpu->regs, data->cpu->regs_size );
1.258 +}
1.259 +
1.260 +void set_disassembly_region( debug_window_t data, unsigned int page )
1.261 +{
1.262 + uint32_t i, posn, next;
1.263 + char buf[80];
1.264 + char addr[10];
1.265 + char opcode[16] = "";
1.266 + char *arr[4] = { addr, " ", opcode, buf };
1.267 + unsigned int from = page & 0xFFFFF000;
1.268 + unsigned int to = from + 4096;
1.269 +
1.270 + gtk_clist_clear(data->disasm_list);
1.271 +
1.272 + sprintf( addr, "%08X", from );
1.273 + gtk_entry_set_text( data->page_field, addr );
1.274 +
1.275 + if( !data->cpu->is_valid_page_func( from ) ) {
1.276 + arr[3] = (char *)_("This page is currently unmapped");
1.277 + gtk_clist_append( data->disasm_list, arr );
1.278 + gtk_clist_set_foreground( data->disasm_list, 0, &gui_colour_error );
1.279 + } else {
1.280 + for( i=from; i<to; i = next ) {
1.281 + next = data->cpu->disasm_func( i, buf, sizeof(buf), opcode );
1.282 + sprintf( addr, "%08X", i );
1.283 + posn = gtk_clist_append( data->disasm_list, arr );
1.284 + if( buf[0] == '?' )
1.285 + gtk_clist_set_foreground( data->disasm_list, posn, &gui_colour_warn );
1.286 + if( data->cpu->get_breakpoint != NULL ) {
1.287 + int type = data->cpu->get_breakpoint( i );
1.288 + switch(type) {
1.289 + case BREAK_ONESHOT:
1.290 + gtk_clist_set_background( data->disasm_list, posn, &gui_colour_temp_break );
1.291 + break;
1.292 + case BREAK_KEEP:
1.293 + gtk_clist_set_background( data->disasm_list, posn, &gui_colour_break );
1.294 + break;
1.295 + }
1.296 + }
1.297 + }
1.298 + if( data->disasm_pc != -1 && data->disasm_pc >= from && data->disasm_pc < to )
1.299 + gtk_clist_set_foreground( data->disasm_list, address_to_row(data, data->disasm_pc),
1.300 + &gui_colour_pc );
1.301 + }
1.302 +
1.303 + if( page != from ) { /* not a page boundary */
1.304 + gtk_clist_moveto( data->disasm_list, (page-from)>>1, 0, 0.5, 0.0 );
1.305 + }
1.306 + data->disasm_from = from;
1.307 + data->disasm_to = to;
1.308 +}
1.309 +
1.310 +void jump_to_disassembly( debug_window_t data, unsigned int addr, gboolean select )
1.311 +{
1.312 + int row;
1.313 +
1.314 + if( addr < data->disasm_from || addr >= data->disasm_to )
1.315 + set_disassembly_region(data,addr);
1.316 +
1.317 + row = address_to_row( data, addr );
1.318 + if(select) {
1.319 + gtk_clist_select_row( data->disasm_list, row, 0 );
1.320 + }
1.321 + if( gtk_clist_row_is_visible( data->disasm_list, row ) != GTK_VISIBILITY_FULL ){
1.322 + gtk_clist_moveto( data->disasm_list, row, 0, 0.5, 0.0 );
1.323 + }
1.324 +}
1.325 +
1.326 +void jump_to_pc( debug_window_t data, gboolean select )
1.327 +{
1.328 + jump_to_disassembly( data, *data->cpu->pc, select );
1.329 +}
1.330 +
1.331 +void set_disassembly_pc( debug_window_t data, unsigned int pc, gboolean select )
1.332 +{
1.333 + int row;
1.334 +
1.335 + jump_to_disassembly( data, pc, select );
1.336 + if( data->disasm_pc != -1 && data->disasm_pc >= data->disasm_from &&
1.337 + data->disasm_pc < data->disasm_to )
1.338 + gtk_clist_set_foreground( data->disasm_list,
1.339 + (data->disasm_pc - data->disasm_from) / data->cpu->instr_size,
1.340 + &gui_colour_normal );
1.341 + row = address_to_row( data, pc );
1.342 + gtk_clist_set_foreground( data->disasm_list, row, &gui_colour_pc );
1.343 + data->disasm_pc = pc;
1.344 +}
1.345 +
1.346 +void set_disassembly_cpu( debug_window_t data, const gchar *cpu )
1.347 +{
1.348 + int i;
1.349 + for( i=0; data->cpu_list[i] != NULL; i++ ) {
1.350 + if( strcmp( data->cpu_list[i]->name, cpu ) == 0 ) {
1.351 + if( data->cpu != data->cpu_list[i] ) {
1.352 + data->cpu = data->cpu_list[i];
1.353 + data->disasm_from = data->disasm_to = -1; /* Force reload */
1.354 + set_disassembly_pc( data, *data->cpu->pc, FALSE );
1.355 + init_register_list( data );
1.356 + }
1.357 + return;
1.358 + }
1.359 + }
1.360 +}
1.361 +
1.362 +void debug_window_toggle_breakpoint( debug_window_t data, int row )
1.363 +{
1.364 + uint32_t pc = row_to_address( data, row );
1.365 + int oldType = data->cpu->get_breakpoint( pc );
1.366 + if( oldType != BREAK_NONE ) {
1.367 + data->cpu->clear_breakpoint( pc, oldType );
1.368 + gtk_clist_set_background( data->disasm_list, row, &gui_colour_white );
1.369 + } else {
1.370 + data->cpu->set_breakpoint( pc, BREAK_KEEP );
1.371 + gtk_clist_set_background( data->disasm_list, row, &gui_colour_break );
1.372 + }
1.373 +}
1.374 +
1.375 +void debug_window_set_oneshot_breakpoint( debug_window_t data, int row )
1.376 +{
1.377 + uint32_t pc = row_to_address( data, row );
1.378 + data->cpu->clear_breakpoint( pc, BREAK_ONESHOT );
1.379 + data->cpu->set_breakpoint( pc, BREAK_ONESHOT );
1.380 + gtk_clist_set_background( data->disasm_list, row, &gui_colour_temp_break );
1.381 +}
1.382 +
1.383 +/**
1.384 + * Execute a single instruction using the current CPU mode.
1.385 + */
1.386 +void debug_window_single_step( debug_window_t data )
1.387 +{
1.388 + data->cpu->step_func();
1.389 + gtk_gui_update();
1.390 +}
1.391 +
1.392 +uint32_t row_to_address( debug_window_t data, int row ) {
1.393 + return data->cpu->instr_size * row + data->disasm_from;
1.394 +}
1.395 +
1.396 +int address_to_row( debug_window_t data, uint32_t address ) {
1.397 + if( data->disasm_from > address || data->disasm_to <= address )
1.398 + return -1;
1.399 + return (address - data->disasm_from) / data->cpu->instr_size;
1.400 +}
1.401 +
1.402 +debug_window_t get_debug_info( GtkWidget *widget ) {
1.403 +
1.404 + GtkWidget *win = gtk_widget_get_toplevel(widget);
1.405 + debug_window_t data = (debug_window_t)gtk_object_get_data( GTK_OBJECT(win), "debug_data" );
1.406 + return data;
1.407 +}
1.408 +
1.409 +void debug_window_set_running( debug_window_t data, gboolean isRunning )
1.410 +{
1.411 + if( data != NULL ) {
1.412 + gtk_gui_enable_action( "SingleStep", !isRunning );
1.413 + gtk_gui_enable_action( "RunTo", !isRunning && dreamcast_can_run() );
1.414 + }
1.415 +}
1.416 +
1.417 +void on_mode_field_changed ( GtkEditable *editable, gpointer user_data)
1.418 +{
1.419 + const gchar *text = gtk_entry_get_text( GTK_ENTRY(editable) );
1.420 + set_disassembly_cpu( gtk_gui_get_debugger(), text );
1.421 +}
1.422 +
1.423 +
1.424 +gboolean on_page_field_key_press_event( GtkWidget * widget, GdkEventKey *event,
1.425 + gpointer user_data)
1.426 +{
1.427 + if( event->keyval == GDK_Return || event->keyval == GDK_Linefeed ) {
1.428 + debug_window_t data = get_debug_info(widget);
1.429 + const gchar *text = gtk_entry_get_text( GTK_ENTRY(widget) );
1.430 + gchar *endptr;
1.431 + unsigned int val = strtoul( text, &endptr, 16 );
1.432 + if( text == endptr ) { /* invalid input */
1.433 + char buf[10];
1.434 + sprintf( buf, "%08X", row_to_address(data,0) );
1.435 + gtk_entry_set_text( GTK_ENTRY(widget), buf );
1.436 + } else {
1.437 + set_disassembly_region(data, val);
1.438 + }
1.439 + }
1.440 + return FALSE;
1.441 +}
1.442 +
1.443 +
1.444 +void on_jump_pc_btn_clicked( GtkButton *button, gpointer user_data)
1.445 +{
1.446 + debug_window_t data = get_debug_info( GTK_WIDGET(button) );
1.447 + jump_to_pc( data, TRUE );
1.448 +}
1.449 +
1.450 +void on_disasm_list_select_row (GtkCList *clist, gint row, gint column,
1.451 + GdkEvent *event, gpointer user_data)
1.452 +{
1.453 + gtk_gui_enable_action( "SetBreakpoint", TRUE );
1.454 + gtk_gui_enable_action( "RunTo", dreamcast_can_run() );
1.455 +}
1.456 +
1.457 +void on_disasm_list_unselect_row (GtkCList *clist, gint row, gint column,
1.458 + GdkEvent *event, gpointer user_data)
1.459 +{
1.460 + gtk_gui_enable_action( "SetBreakpoint", FALSE );
1.461 + gtk_gui_enable_action( "RunTo", FALSE );
1.462 +}
1.463 +
1.464 +gboolean on_debug_delete_event(GtkWidget *widget, GdkEvent event, gpointer user_data)
1.465 +{
1.466 + gtk_widget_hide( widget );
1.467 + return TRUE;
1.468 +}
.