www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/12/19/05:57:51

Date: Thu, 19 Dec 1996 11:47:27 +0100 (MET)
From: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>
To: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Question about exceptions
Message-Id: <Pine.HPP.3.95.961219113421.7752D-100000@newton.mathematik.tu-chemnitz.de>
Mime-Version: 1.0

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.

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.

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).

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?

BTW: While testing some code to the above, I came to same
like Eli with the _dos_ds-limit and I was wondering about
it too.

Robert

- Raw text -


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