diff options
author | rmathew <rmathew@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-19 15:35:11 +0000 |
---|---|---|
committer | rmathew <rmathew@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-19 15:35:11 +0000 |
commit | d6fcf85c999145405018758d4ff039b63844cb19 (patch) | |
tree | 52f2ce6b1ebaf98f737ac9e240293bcf305b5470 /libjava/sysdep | |
parent | 7c34a2e6cb58ed8b7d1a8892efc71f5d7e212e8c (diff) | |
download | gcc-d6fcf85c999145405018758d4ff039b63844cb19.tar.gz |
* sysdep/i386/backtrace.h (fallback_backtrace): Add "0x55 0x8B 0xEC"
as another sequence that can indicate a "pushl %ebp; movl %esp, %ebp"
function prologue.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116258 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/sysdep')
-rw-r--r-- | libjava/sysdep/i386/backtrace.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libjava/sysdep/i386/backtrace.h b/libjava/sysdep/i386/backtrace.h index 9fe12b118a9..63b32746137 100644 --- a/libjava/sysdep/i386/backtrace.h +++ b/libjava/sysdep/i386/backtrace.h @@ -71,8 +71,9 @@ fallback_backtrace (_Unwind_Trace_Fn trace_fn, _Jv_UnwindState *state) /* Try to locate a "pushl %ebp; movl %esp, %ebp" function prologue by scanning backwards at even addresses below the return address. - This instruction sequence is encoded as 0x55 0x89 0xE5. We give up - if we do not find this sequence even after scanning 1024K of memory. + This instruction sequence is encoded either as 0x55 0x89 0xE5 or as + 0x55 0x8B 0xEC. We give up if we do not find this sequence even + after scanning 1024K of memory. FIXME: This is not robust and will probably give us false positives, but this is about the best we can do if we do not have DWARF-2 unwind information based exception handling. */ @@ -83,8 +84,9 @@ fallback_backtrace (_Unwind_Trace_Fn trace_fn, _Jv_UnwindState *state) for ( ; scan_addr >= limit_addr; scan_addr -= 2) { unsigned char *scan_bytes = (unsigned char *)scan_addr; - if (scan_bytes[0] == 0x55 && scan_bytes[1] == 0x89 - && scan_bytes[2] == 0xE5) + if (scan_bytes[0] == 0x55 + && ((scan_bytes[1] == 0x89 && scan_bytes[2] == 0xE5) + || (scan_bytes[1] == 0x8B && scan_bytes[2] == 0xEC))) { ctx.meth_addr = scan_addr; break; |