mirror of git://gcc.gnu.org/git/gcc.git
backtrace.h (fallback_backtrace): Add "0x55 0x8B 0xEC" as another sequence that can indicate a "pushl %ebp...
* sysdep/i386/backtrace.h (fallback_backtrace): Add "0x55 0x8B 0xEC" as another sequence that can indicate a "pushl %ebp; movl %esp, %ebp" function prologue. From-SVN: r116258
This commit is contained in:
parent
4f8e2b0e6e
commit
d58b0443ec
|
|
@ -1,3 +1,9 @@
|
||||||
|
2006-08-19 Ranjit Mathew <rmathew@gcc.gnu.org>
|
||||||
|
|
||||||
|
* sysdep/i386/backtrace.h (fallback_backtrace): Add "0x55 0x8B 0xEC"
|
||||||
|
as another sequence that can indicate a "pushl %ebp; movl %esp, %ebp"
|
||||||
|
function prologue.
|
||||||
|
|
||||||
2006-08-17 H.J. Lu <hongjiu.lu@intel.com>
|
2006-08-17 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* Makefile.am (install-exec-hook): Support $(DESTDIR).
|
* Makefile.am (install-exec-hook): Support $(DESTDIR).
|
||||||
|
|
|
||||||
|
|
@ -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
|
/* Try to locate a "pushl %ebp; movl %esp, %ebp" function prologue
|
||||||
by scanning backwards at even addresses below the return address.
|
by scanning backwards at even addresses below the return address.
|
||||||
This instruction sequence is encoded as 0x55 0x89 0xE5. We give up
|
This instruction sequence is encoded either as 0x55 0x89 0xE5 or as
|
||||||
if we do not find this sequence even after scanning 1024K of memory.
|
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,
|
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
|
but this is about the best we can do if we do not have DWARF-2 unwind
|
||||||
information based exception handling. */
|
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)
|
for ( ; scan_addr >= limit_addr; scan_addr -= 2)
|
||||||
{
|
{
|
||||||
unsigned char *scan_bytes = (unsigned char *)scan_addr;
|
unsigned char *scan_bytes = (unsigned char *)scan_addr;
|
||||||
if (scan_bytes[0] == 0x55 && scan_bytes[1] == 0x89
|
if (scan_bytes[0] == 0x55
|
||||||
&& scan_bytes[2] == 0xE5)
|
&& ((scan_bytes[1] == 0x89 && scan_bytes[2] == 0xE5)
|
||||||
|
|| (scan_bytes[1] == 0x8B && scan_bytes[2] == 0xEC)))
|
||||||
{
|
{
|
||||||
ctx.meth_addr = scan_addr;
|
ctx.meth_addr = scan_addr;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue