[commit: ghc] master: Libdw: Fix initial register collection on i386 (70ee638)

git at git.haskell.org git at git.haskell.org
Mon Nov 23 14:21:39 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/70ee6389ca6be37f369395f100e609e9f16a7200/ghc

>---------------------------------------------------------------

commit 70ee6389ca6be37f369395f100e609e9f16a7200
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon Nov 23 12:45:47 2015 +0100

    Libdw: Fix initial register collection on i386
    
    RIP-relative addressing isn't available on i386.


>---------------------------------------------------------------

70ee6389ca6be37f369395f100e609e9f16a7200
 rts/Libdw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rts/Libdw.c b/rts/Libdw.c
index 1415fe6..61fefbd 100644
--- a/rts/Libdw.c
+++ b/rts/Libdw.c
@@ -312,7 +312,8 @@ static bool set_initial_registers(Dwfl_Thread *thread,
              "movl %%ebp, 0x14(%0)\n\t"
              "movl %%esp, 0x18(%0)\n\t"
              "movl %%edi, 0x1c(%0)\n\t"
-             "lea 0(%%eip), %%eax\n\t"
+             "here:\n\t"
+             "movl here,  %%eax\n\t"
              "movl %%eax, 0x20(%0)\n\t"
              :                            /* no output */
              :"r" (&regs[0])              /* input */



More information about the ghc-commits mailing list