Date: Fri, 25 Oct 1996 12:21:48 +0200 (METDST) From: Robert Hoehne To: DJGPP workers Subject: function _exit() and about dbgcom.c Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi all, I have a question about the exit code (not the return value, but realy the code of the function _exit()). In that function is an cli instruction with the commant, that user may have hooked some interrupts. I understand this and there are commonly not problems with it, because after this in 0x21 is called, which enables interrupts after leaving this interrupt. But now come the problem with the debuggers. In dbgcom.c the int 0x21 is hooked in a way, the the ah=0x4c function is bypassed. So if the debuggee calls _exit() interrupts are disabled. This is in most common usage not a problem, because most of the debuggers call some interrupts after exiting the debuggee. But I had the problem (with the integrated debugger in RHIDE) that I show the user the return value of the debugge and waiting then for a key press or mouse. I found, that at this point interrupts are disabled so there helps only a reset. After cahnging it by calling enable() after exiting the debugge the problem was solved. But is this the correct way or should it be done in dbgcom.c ? And related to this topic an other hint/wish. Because dbgcom.c hooks the int 0x21 AH=0x4c all the files, which are still open at this point from the debugge are not closed. Because I'm probably the only person, which use the new feature of GDB 4.16 in killing and restarting the debugge without leaving GDB nobody else saw this problem. But you can test it by debugging a program, which opens some files and restarting it in GDB before the files are closed. Now my wish. Is there someone, who has alrady some code, which can determine all the files, which were opened by a program when all the information about the psp and so on are available or has someone an idea how this can be done? Robert