aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorCarl Love <cel@us.ibm.com>2022-05-20 17:07:03 +0000
committerCarl Love <cel@us.ibm.com>2022-05-20 17:07:03 +0000
commitf9a8785566fcd9b36f8e504346f70bc3d5b6cf82 (patch)
tree753623f04cd6614e3bf01e73093bcbfdbad2cc02 /gdb/breakpoint.c
parent61cf5823fd01601391ee5db12645cfd032d65542 (diff)
downloadbinutils-f9a8785566fcd9b36f8e504346f70bc3d5b6cf82.zip
binutils-f9a8785566fcd9b36f8e504346f70bc3d5b6cf82.tar.gz
binutils-f9a8785566fcd9b36f8e504346f70bc3d5b6cf82.tar.bz2
PowerPC: Make test gdb.arch/powerpc-power10.exp Endian independent.
The .quad statement stores the 64-bit hex value in Endian order. When used to store a 64-bit prefix instructions on Big Endian (BE) systems, the .quad statement stores the 32-bit suffix followed by the 32-bit prefix rather than the expected order of prefix word followed by the suffix word. GDB fetches 32-bits at a time when disassembling instructions. The disassembly on BE gets messed up since GDB fetches the suffix first and interprets it as a word instruction not a prefixed instruction. When gdb fetches the prefix part of the instruction, following the initial suffix word, gdb associates the prefix word incorrectly with the following 32-bits as the suffix for the instruction when in fact it is the following instruction. For example on BE we have two prefixed instructions stored using the .quad statement as follows: addr word GDB action --------------------------------------------- 1 suffix inst A <- GDB interprets as a word instruction 2 prefix inst A <- GDB uses this prefix with 3 suffix inst B <- this suffix rather than the suffix at addr 1. 4 prefix inst B This patch changes the .quad statement into two .longs to explicitly store the prefix followed by the suffix of the instruction. The patch rearranges the instructions to put all of the word instructions together followed by the prefix instructions for clarity. The patch has been tested on Power 10 and Power 7 BE and LE to verify the change works as expected.
Diffstat (limited to 'gdb/breakpoint.c')
0 files changed, 0 insertions, 0 deletions