Hello,
Recently I'm working on a AT91SAM9263 based project. I encountered a problem that the GDB debugger cannot step conditional jump instrution such as "beq 0x********". I notice that GDB is always thinking the register CPSR's value is 0xd3 when debugging program. Therefore, GDB misplaces the breakpoint needed for stepping and continues to run. See the following:
GNU gdb (Sourcery G++ Lite 2009q1-203) 6.8.50.20081022-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>.
(gdb) tar remote 192.168.5.9:2331
Remote debugging using 192.168.5.9:2331
0x00000000 in ?? ()
(gdb) info reg
r0 0x0 0
r1 0x0 0
r2 0x0 0
r3 0x0 0
r4 0x0 0
r5 0x0 0
r6 0x0 0
r7 0x0 0
r8 0x0 0
r9 0x0 0
r10 0x0 0
r11 0x0 0
r12 0x0 0
sp 0x0 0x0
lr 0x0 0
pc 0x0 0
fps 0x0 0
cpsr 0xd3 211
(gdb) mon regs
PC = 23F15568, CPSR = 600000D3 (SVC mode, ARM FIQ dis. IRQ dis.)
R0 = 00000000, R1 = 23F5F014, R2 = 00000000, R3 = 40001A1A
R4 = 23E7EFC0, R5 = 00000000, R6 = 00000000, R7 = 00000000
USR: R8 =23E7EFDC, R9 =00000000, R10=00000000, R11 =23E7ED90, R12 =23F51D74
Actually, r0 to r15 can be changed when executing program. Whatever you do, even change CPSR's value directly, command "info reg" shows CPSR never changed.
I have tried gdb 6.5 and gdb 6.8, J-Link 3.80a, 3.94 and 4.08i, the problem was all the same.
Recently I'm working on a AT91SAM9263 based project. I encountered a problem that the GDB debugger cannot step conditional jump instrution such as "beq 0x********". I notice that GDB is always thinking the register CPSR's value is 0xd3 when debugging program. Therefore, GDB misplaces the breakpoint needed for stepping and continues to run. See the following:
GNU gdb (Sourcery G++ Lite 2009q1-203) 6.8.50.20081022-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi".
For bug reporting instructions, please see:
<https://support.codesourcery.com/GNUToolchain/>.
(gdb) tar remote 192.168.5.9:2331
Remote debugging using 192.168.5.9:2331
0x00000000 in ?? ()
(gdb) info reg
r0 0x0 0
r1 0x0 0
r2 0x0 0
r3 0x0 0
r4 0x0 0
r5 0x0 0
r6 0x0 0
r7 0x0 0
r8 0x0 0
r9 0x0 0
r10 0x0 0
r11 0x0 0
r12 0x0 0
sp 0x0 0x0
lr 0x0 0
pc 0x0 0
fps 0x0 0
cpsr 0xd3 211
(gdb) mon regs
PC = 23F15568, CPSR = 600000D3 (SVC mode, ARM FIQ dis. IRQ dis.)
R0 = 00000000, R1 = 23F5F014, R2 = 00000000, R3 = 40001A1A
R4 = 23E7EFC0, R5 = 00000000, R6 = 00000000, R7 = 00000000
USR: R8 =23E7EFDC, R9 =00000000, R10=00000000, R11 =23E7ED90, R12 =23F51D74
Actually, r0 to r15 can be changed when executing program. Whatever you do, even change CPSR's value directly, command "info reg" shows CPSR never changed.
I have tried gdb 6.5 and gdb 6.8, J-Link 3.80a, 3.94 and 4.08i, the problem was all the same.