Mail Archives: djgpp/2004/07/25/17:26:07
> From: sterten AT aol DOT com (Sterten)
> Newsgroups: comp.os.msdos.djgpp
> Date: 25 Jul 2004 05:32:14 GMT
>
> >> >Bottom line, using the debugger in such cases might need some hard
> >> >work, but it is always the shortest way to the solution, because it
> >> >saves you the need to guess.
>
> ..which is sometimes the shorter way to the solution
In my experience, guessing is _never_ a shorter way.
> 0x1cfc <main+1660>: movl $0x0,(%eax,%ebx,4)
This is the instrcution that crashes. It can crash if either EAX or
EDX have bad values.
This part of the crash message:
> eax=0000d270 ebx=a00f0706 ecx=00000099 edx=5ff0f90b esi=a00f067e edi=ffffff78
clearly shows that EAX is okay (less than the segment limit
0x0009ffff), but EBX is not.
We need to know what source line produced the above instruction, and
what variables are in the EAX and EBX registers.
For the former, the GDB command
(gdb) info line *0x1cfc
will print the source line number that produced that instruction.
> now, I think, I needn't do the assembly listing with GCC.
You don't need that, but please do use the GDB command above, rather
than guess (again) what is the line that crashed.
> The order of where the arrays are stored could have been affected by
> the small changes which changes the crashing behaviour.
It shouldn't have been.
> Or maybe indices were read from the code-area.
That simply cannot happen in DJGPP.
Let's not guess, but instead stick to the ``slower'' way, shall we?
- Raw text -