This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

why program counter register in core file is misaligned!!!

hello everyoone

I encountered a problem that the PC program counter register in a core file is misaligned!!! The info of registers as follow

(gdb) info registers
x0             0x1      1
x1             0x0      0
x2             0x5be5503d1f1bab00       6621787050563316480
x3             0x98629ade8a03f19f       -7466234951637929569
x4             0xffff829f5310   281472873222928
x5             0x2000   8192
x6             0xffff829f4000   281472873218048
x7             0xc0c0   49344
x8             0x0      0
x9             0x3b9aca00000000 16777216000000000
x10            0x61559894       1632999572
x11            0x88f83  561027
x12            0x18     24
x13            0x3e8000000      16777216000
x14            0x1      1
x15            0x509091a34a45   88581848910405
x16            0x5fe0278        100532856
x17            0xffff827c1ac0   281472870914752
x18            0xfffdacba0bf7   281464989682679
x19            0x5      5
x20            0xfffdacba68a0   281464989706400
x21            0x0      0
x22            0xfffdf4194330   281466187105072
x23            0x1cd7a  118138
x24            0xfffdb57f6196   281465136832918
x25            0x1      1
x26            0x12903da4       311442852
x27            0x5fde000        100524032
x28            0x91     145
x29            0x100fffdacba34c0        72339059027621056
x30            0x4ba701 4957953
sp             0xfffdacba34a0   0xfffdacba34a0
pc             0x4ba701 0x4ba701 <mac_prepare_pucch_harq+705>
cpsr           0x60000000       [ EL=0 C Z ]
fpsr           0x11     17
fpcr           0x0      0

The program is compiled with gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)  and runs on Arm® Cortex®-A72 .After running a while , the program

received signal SIGBUS, Bus error and generated a core file. Use gdb to analysis the core file ,I found that the pc register is misaligned and I guess it results the

Bus error.The Program Counter (PC) contains the address of the currently executing instruction. It is incremented by the size of the instruction executed, which is

always four bytes.So i don't know in what condition the PC may be misaligned. Would you please help me ,thank you very much!