Mail Archives: djgpp/2000/04/03/20:19:16
I use CWSDPMI.
I got around the random exception stuff in FSDB, but new one
arises.
Hmm, I still haven't upgrade to 2.03 yet. In the meantime,
here's the offending code :
DETECT_SAVES EQU 32
_detectVBE :
pushad
mov ebp,esp
; enable near pointer
call ___djgpp_nearptr_enable
and eax,eax
jnz detect_near_ok
mov esp,ebp
popad
mov eax,-1
ret
; allocate DOS memory
detect_near_ok:
mov eax,100h
mov ebx,32
sub edx,edx
int 31h
jnc detect_dpmi_ok1
and eax,0FFFFh
mov [retVal],eax
mov esp,ebp
popad
mov eax,[retVal]
ret
detect_dpmi_ok1:
mov [dosmem_selector],dx ; here FSDB throws
exception 0x3030 or 0x3036
mov [dosmem_segment],ax
; notify that we want VBE 2.0
mov edi,eax
mov eax,'VBE2'
shl edi,4
sub edi,[___djgpp_base_address]
stosd
; simulate real-mode interrupt 10h func. 4F00h
mov ax,[dosmem_segment]
mov word [rmRegs+rm_regsStruc.es],ax
mov dword [rmRegs+rm_regsStruc.edi],0
mov dword [rmRegs+rm_regsStruc.eax], 4F00h
mov eax,300h
mov ebx,10h
sub ecx,ecx
mov edi,rmRegs
int 31h
; copy the infos back to pmode
mov ecx,VBE20InfoStruc_size
shr ecx,2
sub esi,esi
mov si,[dosmem_segment]
shl esi,4
sub esi,[___djgpp_base_address]
mov edi,_vbe20DrvInfo
rep movsd
; if I try 'x/20bx vbe20DrvInfo' here, GDB crashes, error 04.
vbe20DrvInfo is global.
; fix OEM string pointer
mov eax,[_vbe20DrvInfo+VBE20InfoStruc.OEMStrPtr]
mov ebx,eax
and eax,0FFFFh
shr ebx,16
and ebx,0FFFFh
shl ebx,4
add ebx,eax
mov [_vbe20DrvInfo+VBE20InfoStruc.OEMStrPtr],ebx
; fix mode list pointer
mov eax,[_vbe20DrvInfo+VBE20InfoStruc.ModeListPtr]
mov ebx,eax
and eax,0FFFFh
shr ebx,16
and ebx,0FFFFh
shl ebx,4
add ebx,eax
mov [_vbe20DrvInfo+VBE20InfoStruc.ModeListPtr],ebx
; de-allocate DOS memory
mov eax,101h
mov dx,[dosmem_selector]
int 31h
mov esp,ebp
popad
ret
How can I redirect the crash info from GDB to a file? Also, what
do I need to upgrade my djgpp to 2.03?
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
- Raw text -