[fpc-devel] Building cross-compiler for arm-linux on win32
Nikolai Zhubr
n-a-zhubr at yandex.ru
Sun Dec 16 17:49:16 CET 2018
16.12.2018 18:13, Jonas Maebe:
> Which instructions does it show if you run the program in gdb and do
> "x/2i $pc-4" when it crashes?
I made some additional steps in gdb in order to check if the program in
question actually starts executing anything at all. Looks like it does:
GNU gdb (GDB; openSUSE Leap 42.3) 8.0
.....
Reading symbols from t-bad...(no debugging symbols found)...done.
(gdb) info files
Symbols from "/root/personal/t-bad".
Local exec file:
`/root/personal/t-bad', file type elf32-littlearm.
Entry point: 0x100ec
0x000100c0 - 0x000100e0 is .note.ABI-tag
0x000100e0 - 0x0003dff4 is .text
0x0003dff8 - 0x00042cf8 is .rodata
0x00053000 - 0x00053c5e is .data
0x00053c60 - 0x00055c18 is .bss
(gdb) break *0x100ec
Breakpoint 1 at 0x100ec
(gdb) run
Starting program: /root/personal/t-bad
Breakpoint 1, 0x000100ec in ?? ()
(gdb) x/2i $pc
=> 0x100ec: mov r11, #0
0x100f0: ldmfd sp!, {r1}
(gdb) stepi
0x000100f0 in ?? ()
(gdb) stepi
0x000100f4 in ?? ()
(gdb) x/2i $pc-4
0x100f0: ldmfd sp!, {r1}
=> 0x100f4: ldr r12, [pc, #92] ; 0x10158
(gdb) cont
Continuing.
Program received signal SIGILL, Illegal instruction.
0x0003155a in ?? ()
(gdb) x/2i $pc-4
0x31556:
stmdb sp!, {r0, r1, r2, r3, r4, r6, r7, r8, r9, r10, r11,
r12, pc}
=> 0x3155a: ; <UNDEFINED> instruction: 0xfaff0060
(gdb)
Thank you!
Regards,
Nikolai
>
> Jonas
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list