Sender: nate AT cartsys DOT com Message-ID: <36F6F564.5293FA58@cartsys.com> Date: Mon, 22 Mar 1999 17:59:00 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.3 i586) MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com, sandmann AT clio DOT rice DOT edu Subject: Re: DPMI Get Memory Block Size and Base call Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com sandmann AT clio DOT rice DOT edu wrote: > > Charles: Would you mind adding DPMI call 0x050a (Get Memory Block Size > > and Base) to CWSDPMI? It would greatly simplify a change I have in mind > > for libdbg (to check the page attributes before touching the child's > > memory). The call looks extremely simple, and I would write it myself, > > but I don't have the necessary Borland tools to build it. > > I think it would be better if the application kept track of the blocks > allocated and the size. Why? > > 1) It puts the code in the one application that needs it, instead of all > apps carrying around the code. > 2) Since DPMI 1.0 is dead on arrival, I think it's a good idea to minimize > calls to the API. > 3) CWSDPMI is essentially in maintenence mode. In the last year I've gotten > one patch request to support PC98 systems in raw mode, and some continued > grief over my promise to eventually build it into the stub. Given my > time constraints and lack of screams to fix things - my policy is to leave > it alone. Okay, these are all good points. Having the app keep track of the blocks is tricky in this case, since the beast doing the allocating is really another app (the debuggee) and we're outside looking in, but since libdbg is already trapping int 31 to keep tabs on the child's memory handles, getting their addresses is possible. It just ain't pretty. If you don't want to add it, I won't insist. I will clean up my current patch for libdbg and submit it shortly. -- Nate Eldredge nate AT cartsys DOT com