From: mrwiggley AT aol DOT com (MrWiggley) Newsgroups: comp.os.msdos.djgpp Subject: Dissasember debugging bug? Lines: 49 NNTP-Posting-Host: ladder01.news.aol.com X-Admin: news AT aol DOT com Date: 9 Nov 1998 23:15:15 GMT Organization: AOL http://www.aol.com Message-ID: <19981109181515.00812.00001533@ng-fb2.aol.com> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I have a bit of a problem with RHIDE 1.4 The following two source files are in a .GPR file of mine... #include extern unsigned int AddFour(unsigned int); int main(void) { printf("AddFour(4) = %i\n", AddFour(4)); return 0; } [BITS 32] [GLOBAL _AddFour] [SECTION .text] x_AddFour equ 8 _AddFour: push ebp mov ebp, esp mov eax, [ebp + x_AddFour] add eax, 4 mov esp, ebp pop ebp ret Everything comples and runs fine, but try placing a breakpoint on the printf line, running the program, then opening the dissasembler. Press F8 to get to the "call AddFour" instruction, then press F7. This will bring you to the disasembly of the AddFour funciton. Press F8, and the program crashes. However, if you move the cursor down to say, "mov eax, [ebp + x_AddFour", and press F4, everything works fine! I am suspecting the problem is that rhide debugger debugger is not setting some registers properly when it transfers control back to the program. But I'm not experienced programmer, just an amatuer that's pulling his hairs out by the roots. I've got a routine in a larger program where I first noticed this problem. Doing any complicated ASM whatsoever is impossible without a debugger that works. Of course, I could be being stupid, so if I am, please let me know. If you don't mind, could you email me with a solition if one exists? (mrwiggley AT aol DOT com) Thanks everbody.