diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-09-13 08:26:11 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-09-13 08:26:11 +0000 |
commit | bede5f5f81e145b3c1dd21cbf4e8695de83298e6 (patch) | |
tree | 46a44ab48981b0332bc8959f0b887da3e5a085ca | |
parent | 29d3e15313a23862a2b10dd15a2a1f254327f442 (diff) | |
download | gdb-bede5f5f81e145b3c1dd21cbf4e8695de83298e6.zip gdb-bede5f5f81e145b3c1dd21cbf4e8695de83298e6.tar.gz gdb-bede5f5f81e145b3c1dd21cbf4e8695de83298e6.tar.bz2 |
gdb/
Fix compatibility with gcc < 4.3 and non-gcc compilers.
* amd64-tdep.c (amd64_skip_xmm_prologue): Convert 0b constants.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/amd64-tdep.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b49d76c..05d523f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-09-13 Jan Kratochvil <jan.kratochvil@redhat.com> + + Fix compatibility with gcc < 4.3 and non-gcc compilers. + * amd64-tdep.c (amd64_skip_xmm_prologue): Convert 0b constants. + 2011-09-12 Pedro Alves <pedro@codesourcery.com> Matt Rice <ratmice@gmail.com> diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 8f686d1..55bedab 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -1962,17 +1962,19 @@ amd64_skip_xmm_prologue (CORE_ADDR pc, CORE_ADDR start_pc) offset = 4; for (xmmreg = 0; xmmreg < 8; xmmreg++) { - /* movaps %xmmreg?,-0x??(%rbp) */ + /* 0x0f 0x29 0b??000101 movaps %xmmreg?,-0x??(%rbp) */ if (buf[offset] != 0x0f || buf[offset + 1] != 0x29 - || (buf[offset + 2] & 0b00111111) != (xmmreg << 3 | 0b101)) + || (buf[offset + 2] & 0x3f) != (xmmreg << 3 | 0x5)) return pc; - if ((buf[offset + 2] & 0b11000000) == 0b01000000) + /* 0b01?????? */ + if ((buf[offset + 2] & 0xc0) == 0x40) { /* 8-bit displacement. */ offset += 4; } - else if ((buf[offset + 2] & 0b11000000) == 0b10000000) + /* 0b10?????? */ + else if ((buf[offset + 2] & 0xc0) == 0x80) { /* 32-bit displacement. */ offset += 7; |