#1
|
|||
|
|||
Yes, Finally I make s-ice V2.80 work under Bochs
After many days of debugging, I debug Bochs's source code
with VS2019's embedded debugger which debugs Bochs's embedded debugger which debugs S-ICE which debugs a sample DOS exe program. I finally figure out the cause of S-ICE's crashing under Bochs. Bochs has a bug associated with unmasking the timer interrupt. Because there is a much long way to go for fixing Bochs's source code, here I provide an easy patch for S-ICE v2.80: Search hex bytes : 67F644240C020F854BF4 Replace them with: 67F644240C02E94CF490 ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ;the original instructions: 0000261D: 67F644240C02 test byte ptr [esp+0C],02 ; check VM bit in EFLAG 00002623: 0F854BF4 jnz 00001A72 ; ==> to_emulate_a_real_mode_int_8h ;----------------------------------------------------------------------------------------------------------------------------------------------------- ;after patch: 00002623: E94CF4 jmp 00001A72 00002626: 90 nop ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00002627: 6655 push ebp ; A General Protection Violation Has 00002629: 06 push es ; occurred. This is typicall caused 0000262A: 06 push es ; By A Protection Mode Instruction 0000262B: 1E push ds ; CS:IP = xxxx:yyyy 0000262C: 1E push ds ; Type 'C' Continue 0000262D: 6650 push eax ; Type 'R' Return to Soft-ICE 0000262F: 6653 push ebx 00002631: 6651 push ecx 00002633: 6652 push edx 00002635: 6656 push esi 00002637: 6657 push edi 00002639: 668BEC mov ebp,esp 0000263C: B80800 mov ax,0008 0000263F: 8ED8 mov ds,ax If you are also interested in DOS debugging stuff, you may contact me by iceman@zju.edu.cn |
The Following 3 Users Gave Reputation+1 to BlackWhite For This Useful Post: | ||
The Following 10 Users Say Thank You to BlackWhite For This Useful Post: | ||
Abaddon (03-27-2021), an0rma1 (03-23-2021), chants (03-14-2021), deepzero (03-14-2021), LordGarfio (03-14-2021), MarcElBichon (03-14-2021), niculaita (03-14-2021), p4r4d0x (03-14-2021), tonyweb (03-14-2021), yoza (03-15-2021) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bochs's source code fix for S-ICE v2.80 | BlackWhite | General Discussion | 2 | 03-17-2021 09:12 |
IDA and bochs | deepzero | General Discussion | 9 | 07-11-2020 02:42 |
IDA can't automatically recognize try/finally structures by Borland compilers | WhoCares | General Discussion | 2 | 10-09-2004 20:52 |