Mail Archives: djgpp-workers/1996/12/05/14:14:57
Because of a hint of a user I tried it also and found, that somewher
the return value of a program is not returned correct when running
this program under any debugger (DJGPP of course). Or betther: is
always zero. I have tried
it with gdb, fsdb, rhgdb and RHIDE and so I think, there is somewhere
a bug either in 'dbgcom.c' or in 'exceptn.s'.
Here is the program, which I have tested:
------------------------------------
int main(void)
{
return -1;
}
------------------------------------
Ok. I have looked in the two files and think the problem is when the
debuggee exits, this is hooked in dbgcom.c. Then there is a call to
(Oh please forgive me, I have not the exact functions here)
__djgpp_save_exception_registers(). Until this point I can follow,
but after a look in the assembler file (exceptn.s) I gave up,
becuase I couldn't understand it in all details, but I think, at
the end of the function are the selectors compared and in case
of the result, the __djgpp_exception_ptr is changed or not.
Please can check this someone, who understand more than I about
this?? (Charles?).
Robert
- Raw text -