run stepN command in the simulation thread to avoid deadlock in wxBochs

GTK init is not required in the wxGTK case
removed unnecessary include
This commit is contained in:
Volker Ruppert 2013-02-15 15:47:16 +00:00
parent 5416e462e9
commit e44176f597
2 changed files with 9 additions and 8 deletions

View File

@ -17,7 +17,6 @@
#include <math.h>
#include "bochs.h"
#include "param_names.h"
#include "cpu/cpu.h"
#include "disasm/disasm.h"
@ -2559,10 +2558,8 @@ void doStepN()
PrevStepNSize = i;
AtBreak = FALSE;
StatusChange = TRUE;
bx_dbg_stepN_command(CurrentCPU, i);
AtBreak = TRUE;
StatusChange = TRUE;
OnBreak();
sprintf(debug_cmd, "s %d", i);
debug_cmd_ready = TRUE;
}
// User wants a custom disassembly

View File

@ -2131,9 +2131,13 @@ bx_bool OSInit()
argvp = argv;
argc = 1;
// you MUST call gtk_init, even with faked arguments, because it inits GDK and Glib
if (gtk_init_check(&argc, &argvp) == FALSE)
printf ("gtk init failed, can not access display?\n");
if (!SIM->is_wx_selected()) {
// you MUST call gtk_init, even with faked arguments, because it inits GDK and Glib
if (gtk_init_check(&argc, &argvp) == FALSE) {
fprintf(stderr, "gtk init failed, can not access display?\n");
return FALSE;
}
}
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "Bochs Enhanced Debugger");
gtk_window_set_default_size(GTK_WINDOW(window), 500, 500);