www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/12/19/14:31:29

Message-Id: <m0vaiQn-000S1kC@natacha.inti.edu.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT edu DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT natacha DOT inti DOT edu DOT ar>
To: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>,
djgpp-workers AT delorie DOT com
Date: Thu, 19 Dec 1996 16:30:45 +0000
MIME-Version: 1.0
Subject: Re: Question about exceptions

Robert wrote about catching the display access.
> In the last days I played something with a thought, if it is possible
> when debugging a program to setup an exception handler for watching
> all accesses to the video memory of the debuggee.
> 
> This idea came to me to make the display swapping when debugging
> faster by calling it only when needed.
That's a nice idea but I guess that's imposible in our case, Borland 
does that OK in the BC 3.1 because the program is in real mode and 
the DEBUGGER is in pmode.

> 
> OK. I tried until now the following:
> 
> When the debugge has started I get the the value of the _dos_ds
> of the debuggee (using the print command of my libgdb).
> 
> Now I set the limit of that descriptor to '0x9ffff' and set up
> a signal-handler for SIGSEGV.
Good try.

> 
> What I wanted to do now is to analize the exception if it
> is generated by accessing the video memory and depending
> on it switching to the user screen. I think this would be
> possible.
> 
> But now I found, that this works ONLY, if the debuggee writes
> direct using it's _dos_ds to the video-memory and NOT when
> using functions like 'printf' (they write to video-mem in
> real mode).
Isn't the only problem.

> 
> Now my question: Is it possible in general also to generate an
> exeption, when the real mode code (mostly the bios) accesses
> the video-memory and if it is possibly how or is the above
> whish from too hard?
There another problem: What happends if the debugee uses your own 
descriptor for the screen? you can't avoid that easily.


I guess that is very hard to catch the access using the segmentation, 
may be using the paging system? I don't know the answer because I'm 
don't know very much of the DPMI standard, but have in mind this 
problem too.

SET 
--------------- 0 --------------------------------
Salvador Eduardo Tropea (SET).
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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