www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/03/20:19:16

X-Originating-Host: 202.158.46.2
Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here
Subject: Re: HELP! : Debugging a c/asm mixed programs
Lines: 108
From: batchex <thedark1NOthSPAM AT phreaker DOT net DOT invalid>
Newsgroups: comp.os.msdos.djgpp
Message-ID: <007b545d.e4358c4a@usw-ex0105-036.remarq.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000402101441 DOT 9367X-100000 AT is>
Bytes: 2879
X-Wren-Trace: eH5bc3JrLGYtKmJzfz9tfD1NfnNpfz9jfmA/c3J+J2whKnAuJWYlJCQxKA==
Date: Mon, 03 Apr 2000 13:43:06 -0700
NNTP-Posting-Host: 10.0.2.36
X-Complaints-To: wrenabuse AT remarq DOT com
X-Trace: WReNphoon2 954794300 10.0.2.36 (Mon, 03 Apr 2000 13:38:20 PDT)
NNTP-Posting-Date: Mon, 03 Apr 2000 13:38:20 PDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019