|
From: Pavel R. <pr...@gn...> - 2003-10-13 22:19:39
|
On Mon, 13 Oct 2003, Gao, Jiafu wrote:
> Maybe it does have illegal instruction. Either the executable is corrupted
> on disk, or the code is corrupted during execution.
>
> I would watch the memory where the instruction locates and find out who
> overwrite the code.
Why not just disassemble this sequence? It's clearly valid, just a very
rare instruction. But gdb knows it.
$ cat >test.c <<EOF
> char instr[] = {0xE0, 0x6E, 0x40, 0x80};
> int main(){}
> EOF
$ gcc -o test test.c
$ gdb --quiet test
(gdb) disassemble &instr
Dump of assembler code for function instr:
0x080493c4 <instr+0>: loopne 0x8049434 <_DYNAMIC+108>
0x080493c6 <instr+2>: inc %eax
0x080493c7 <instr+3>: addb $0x0,(%ecx)
End of assembler dump.
(gdb)
--
Regards,
Pavel Roskin
|