Mail Archives: djgpp/1998/11/09/18:20:58
I have a bit of a problem with RHIDE 1.4
The following two source files are in a .GPR file of mine...
#include <stdio.h>
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.
- Raw text -