1 diff -ru bochs-2.6.11.dist/bochs.h bochs-2.6.11/bochs.h
2 --- bochs-2.6.11.dist/bochs.h 2019-12-19 23:42:07.299552000 -0800
3 +++ bochs-2.6.11/bochs.h 2021-01-17 17:28:08.093933541 -0800
5 void bx_gdbstub_init(void);
6 void bx_gdbstub_break(void);
7 int bx_gdbstub_check(unsigned int eip);
8 +void bx_gdbstub_exception(unsigned int nr);
9 #define GDBSTUB_STOP_NO_REASON (0xac0)
18 #endif /* BX_BOCHS_H */
19 Only in bochs-2.6.11: bochs.h.orig
20 diff -ru bochs-2.6.11.dist/cpu/exception.cc bochs-2.6.11/cpu/exception.cc
21 --- bochs-2.6.11.dist/cpu/exception.cc 2019-12-26 08:48:33.074097000 -0800
22 +++ bochs-2.6.11/cpu/exception.cc 2021-01-17 17:28:08.093933541 -0800
25 BX_CPU_THIS_PTR last_exception_type = exception_type;
28 + bx_gdbstub_exception(vector);
32 push_error = 0; // not INT, no error code pushed
34 Only in bochs-2.6.11/cpu: exception.cc.orig
35 diff -ru bochs-2.6.11.dist/gdbstub.cc bochs-2.6.11/gdbstub.cc
36 --- bochs-2.6.11.dist/gdbstub.cc 2017-03-06 13:30:05.467768000 -0800
37 +++ bochs-2.6.11/gdbstub.cc 2021-01-17 17:28:35.270952903 -0800
39 #define GDBSTUB_EXECUTION_BREAKPOINT (0xac1)
40 #define GDBSTUB_TRACE (0xac2)
41 #define GDBSTUB_USER_BREAK (0xac3)
42 +#define GDBSTUB_EXCEPTION_0E (0xac4)
44 static bx_list_c *gdbstub_list;
45 static int listen_socket_fd;
47 return GDBSTUB_STOP_NO_REASON;
50 +void bx_gdbstub_exception(unsigned int nr)
53 + last_stop_reason = GDBSTUB_EXCEPTION_0E;
56 static int remove_breakpoint(Bit64u addr, int len)
61 write_signal(&buf[1], SIGTRAP);
63 + else if (last_stop_reason == GDBSTUB_EXCEPTION_0E)
65 + write_signal(&buf[1], SIGSEGV);
69 write_signal(&buf[1], 0);
72 write_signal(&buf[1], SIGTRAP);
74 + else if (last_stop_reason == GDBSTUB_EXCEPTION_0E)
76 + write_signal(&buf[1], SIGSEGV);
80 write_signal(&buf[1], SIGTRAP);
81 Only in bochs-2.6.11: gdbstub.cc.orig
82 Only in bochs-2.6.11: gdbstub.cc~
83 diff -ru bochs-2.6.11.dist/iodev/pit82c54.cc bochs-2.6.11/iodev/pit82c54.cc
84 --- bochs-2.6.11.dist/iodev/pit82c54.cc 2018-05-14 11:17:04.955283000 -0700
85 +++ bochs-2.6.11/iodev/pit82c54.cc 2021-01-17 17:28:08.097266918 -0800
91 #define LOG_THIS this->
96 if (thisctr.count_written) {
97 if (thisctr.triggerGATE || thisctr.first_pass) {
98 - set_count(thisctr, thisctr.inlatch);
99 + //set_count(thisctr, thisctr.inlatch);
100 + unsigned n = thisctr.inlatch;
101 + if (jitter && n > 5) {
102 + n *= (double) rand() / RAND_MAX;
106 + set_count(thisctr, n);
107 thisctr.next_change_time=(thisctr.count_binary-1) & 0xFFFF;
108 thisctr.null_count=0;
109 if (thisctr.inlatch==1) {
110 diff -ru bochs-2.6.11.dist/main.cc bochs-2.6.11/main.cc
111 --- bochs-2.6.11.dist/main.cc 2020-01-02 08:19:02.083668000 -0800
112 +++ bochs-2.6.11/main.cc 2021-01-17 17:28:08.097266918 -0800
114 BOCHSAPI BX_MEM_C bx_mem;
116 char *bochsrc_filename = NULL;
119 size_t bx_get_timestamp(char *buffer)
122 else SIM->get_param_string(BXPN_DEBUGGER_LOG_FILENAME)->set(argv[arg]);
125 + else if (!strcmp ("-j", argv[arg])) {
126 + if (++arg >= argc) BX_PANIC(("-j must be followed by a number"));
129 + srand (atoi (argv[arg]));
132 else if (!strcmp("-f", argv[arg])) {
133 if (++arg >= argc) BX_PANIC(("-f must be followed by a filename"));
134 else bochsrc_filename = argv[arg];
135 Only in bochs-2.6.11: main.cc.orig