- patch updated for current CVS

This commit is contained in:
Volker Ruppert 2005-10-13 19:13:33 +00:00
parent 3edd8c0c06
commit 934ad9f4d7

View File

@ -8,39 +8,54 @@ This patch shows how to create your own siminterface callback function.
It is not intended to be checked in anytime, only to serve as an example
of how to use the siminterface.
Patch updated for current CVS. (Volker Ruppert, Oct 13, 2005)
Patch was created with:
cvs diff -u
diff -u
Apply patch to what version:
cvs checked out on DATE, release version VER
cvs checked out on DATE
Instructions:
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
--- bochs/config.h.in Mon Sep 23 12:51:22 2002
+++ bochs-overrideask/config.h.in Mon Sep 23 12:12:45 2002
@@ -678,6 +678,7 @@
--- bochs/config.h.in 2005-10-13 20:40:50.131262080 +0200
+++ bochs-overrideask/config.h.in 2005-10-13 20:44:40.841188840 +0200
@@ -949,6 +949,9 @@
// External Debugger
#define BX_EXTERNAL_DEBUGGER 0
#define BX_OVERRIDE_ASK 0
+#define BX_OVERRIDE_ASK_EXAMPLE 1
#ifdef WIN32
#define BX_FLOPPY0_NAME "Floppy Disk A:"
--- bochs/main.cc Mon Sep 23 12:51:23 2002
+++ bochs-overrideask/main.cc Mon Sep 23 12:17:25 2002
@@ -1306,6 +1306,10 @@
bx_init_main (argc, argv);
bx_do_text_config_interface (argc, argv);
bx_config_interface (BX_CI_INIT);
+// Override ask dialog (demo)
+#define BX_OVERRIDE_ASK_EXAMPLE 1
+
// Magic breakpoints
#define BX_MAGIC_BREAKPOINT 1
--- bochs/gui/textconfig.cc 2005-06-06 22:14:50.000000000 +0200
+++ bochs-overrideask/gui/textconfig.cc 2005-10-13 20:12:16.090835832 +0200
@@ -996,6 +996,10 @@
case CI_START:
//fprintf (stderr, "textconfig.cc: start\n");
bx_config_interface_init ();
+#if BX_OVERRIDE_ASK_EXAMPLE
+ extern void override_ask_init();
+ override_ask_init ();
+ extern void override_ask_init();
+ override_ask_init ();
+#endif
static jmp_buf context;
if (setjmp (context) == 0) {
SIM->set_quit_context (&context);
--- bochs/overrideask.cc Mon Sep 23 12:52:01 2002
+++ bochs-overrideask/overrideask.cc Mon Sep 23 12:35:14 2002
if (SIM->get_param_enum(BXP_BOCHS_START)->get () == BX_QUICK_START)
bx_config_interface (BX_CI_START_SIMULATION);
else {
diff -urN bochs/Makefile.in bochs-overrideask/Makefile.in
--- bochs/Makefile.in 2005-07-30 17:02:40.000000000 +0200
+++ bochs-overrideask/Makefile.in 2005-10-13 20:04:06.137320088 +0200
@@ -146,6 +146,7 @@
pc_system.o \
osdep.o \
plugin.o \
+ overrideask.o \
@EXTRA_BX_OBJS@
EXTERN_ENVIRONMENT_OBJS = \
--- bochs/overrideask.cc 1970-01-01 01:00:00.000000000 +0100
+++ bochs-overrideask/overrideask.cc 2005-10-13 20:15:25.713008880 +0200
@@ -0,0 +1,52 @@
+#include <stdio.h>
+#include <assert.h>
@ -48,7 +63,7 @@ Instructions:
+#include "osdep.h"
+#include "gui/siminterface.h"
+
+bx_simulator_interface_c::sim_interface_callback_t old_callback = NULL;
+bxevent_handler old_callback = NULL;
+void *old_callback_arg = NULL;
+
+BxEvent *
@ -94,15 +109,3 @@ Instructions:
+ assert (old_callback != NULL);
+ SIM->set_notify_callback (override_ask_callback, NULL);
+}
--- bochs/Makefile.in Mon Sep 23 00:07:49 2002
+++ bochs-overrideask/Makefile.in Mon Sep 23 12:55:56 2002
@@ -132,7 +132,8 @@
load32bitOShack.o \
state_file.o \
pc_system.o \
- osdep.o
+ osdep.o \
+ overrideask.o
EXTERN_ENVIRONMENT_OBJS = \
main.o \