diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-05-10 21:58:14 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-05-10 21:58:14 +0000 |
commit | 6e76a0b10a0449d0a423461b785b678e09912353 (patch) | |
tree | 70ca699a3c2be8195fe4f923124a7aee3c0df6ef | |
parent | 8f680854f9fb07550f81f8fc58cb9a6ccd518578 (diff) | |
download | binutils-gdb-6e76a0b10a0449d0a423461b785b678e09912353.tar.gz |
* i386-tdep.c (i386_analyze_struct_return): Correctly indent
comment.
(i386_analyze_frame_setup): Report correct bug after matching
initial `pushl %ebp'.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 23 |
2 files changed, 16 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc8a620cbb8..aa1ca3ce07d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2003-05-10 Mark Kettenis <kettenis@gnu.org> + * i386-tdep.c (i386_analyze_struct_return): Correctly indent + comment. + (i386_analyze_frame_setup): Report correct bug after matching + initial `pushl %ebp'. + * dwarf-frame.c: Add support for .eh_frame sections. Fix a few bugs. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 5fa56676291..2da228a3039 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -355,15 +355,14 @@ i386_analyze_struct_return (CORE_ADDR pc, CORE_ADDR current_pc, { /* Functions that return a structure or union start with: - popl %eax 0x58 - xchgl %eax, (%esp) 0x87 0x04 0x24 - or xchgl %eax, 0(%esp) 0x87 0x44 0x24 0x00 - - (the System V compiler puts out the second `xchg' - instruction, and the assembler doesn't try to optimize it, so - the 'sib' form gets generated). This sequence is used to get - the address of the return buffer for a function that returns - a structure. */ + popl %eax 0x58 + xchgl %eax, (%esp) 0x87 0x04 0x24 + or xchgl %eax, 0(%esp) 0x87 0x44 0x24 0x00 + + (the System V compiler puts out the second `xchg' instruction, + and the assembler doesn't try to optimize it, so the 'sib' form + gets generated). This sequence is used to get the address of the + return buffer for a function that returns a structure. */ static unsigned char proto1[3] = { 0x87, 0x04, 0x24 }; static unsigned char proto2[4] = { 0x87, 0x44, 0x24, 0x00 }; unsigned char buf[4]; @@ -473,14 +472,14 @@ i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc, { case 0x8b: if (read_memory_unsigned_integer (pc + 2, 1) != 0xec) - return pc; + return pc + 1; break; case 0x89: if (read_memory_unsigned_integer (pc + 2, 1) != 0xe5) - return pc; + return pc + 1; break; default: - return pc; + return pc + 1; } /* OK, we actually have a frame. We just don't know how large it is |