Building on android - compiled program segfaults

Nathan Hüsken nathan.huesken at posteo.de
Sun Jan 13 16:31:51 CET 2013


Mmh, that does not seem to work.

(gdb) strace
warning: Couldn't determine the static tracepoint marker to probe
Static tracepoint 1 at 0x3f0588

On 01/13/2013 12:56 PM, Conrad Parker wrote:
> On 11 January 2013 19:36, Nathan Hüsken <nathan.huesken at posteo.de> wrote:
>> Hi,
>>
>> I was succesfull in building ghc (pulled from git) to compile for
>> arm-linux-androideabi!
>>
>> Now using "inplace/bin/ghc-stage1 -dcore-lint -debug" I compiler this
>> Main.hs:
>>
>> main = putStrLn "Hello, World"
>>
>> I get an executable, which I can run on my android device. Unfortantly
>> it segfaults.
>>
>> Running it with ./Main +RTS -DS gives:
>>
>> cap 0: initialised
>>
>> Now I am trying to debug this in gdb. When I try to display the stack
>> (which should be in r13 on arm of I understand correctly, I get);
>>
>> (gdb) p8 $r13
>> 0xbef00a74:     0x0
>> 0xbef00a70:     0x0
>> 0xbef00a6c:     0x3c2e74
>> 0xbef00a68:     0x530350
>> 0xbef00a64:     0x0
>> 0xbef00a60:     0x0
>> 0xbef00a5c:     0x0
>> 0xbef00a58:     0x0
>>
>> And now I am clueless. So I tried the good old printf debugging in the
>> rts. Using this, I see that it gets before the call to
>> scheduleWaitThread in the function rts_evalLazyIO (in RtsAPI.c).
>>
>> But when I put a printf in the beginning of scheduleWaitThread (in
>> Schedule.c) it is not shown.
>>
>> What else can I do to find out more?
> 
> can you strace it?
> 
> Conrad.
> 




More information about the Glasgow-haskell-users mailing list