aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-12-14 10:59:08 +0000
committerMark Kettenis <kettenis@gnu.org>2003-12-14 10:59:08 +0000
commit5daa5b4ecc8e4dd8532538fedcdaeeec25244c15 (patch)
treed2d211c3b9795ed58e80a69427fcfe98f25a45d0 /gdb/i386-tdep.c
parent1eb4d9af741c85cffd483959ef08354e1d553273 (diff)
downloadgdb-5daa5b4ecc8e4dd8532538fedcdaeeec25244c15.zip
gdb-5daa5b4ecc8e4dd8532538fedcdaeeec25244c15.tar.gz
gdb-5daa5b4ecc8e4dd8532538fedcdaeeec25244c15.tar.bz2
* i386-tdep.c (i386_analyze_frame_setup): Add missing encodings
for `subl' and `xorl' instructions.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 973fa63..4ee9fa4 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -508,9 +508,13 @@ i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
subl %edx, %edx
subl %eax, %eax
+ Because of the symmetry, there are actually two ways to
+ encode these instructions; with opcode bytes 0x29 and 0x2b
+ for `subl' and opcode bytes 0x31 and 0x33 for `xorl'.
+
Make sure we only skip these instructions if we later see the
`movl %esp, %ebp' that actually sets up the frame. */
- while (op == 0x29 || op == 0x31)
+ while (op == 0x29 || op == 0x2b || op == 0x31 || op == 0x33)
{
op = read_memory_unsigned_integer (pc + skip + 2, 1);
switch (op)