On Tue, Jan 27, 2009 at 10:31:01AM +0000, David Chisnall wrote:
> If anyone feels like doing this on an x86-64 system, I'd be interested
> to hear if it works.

Okay, I just did that and MsgSendSmallInt.bc was generated by clang
without errors. Unfortunately Smalltalk still doesn't work for me.
All the tests from the testsuite fail because edlc comes back with the
following error:

Module (null) version 8 doesn't match runtime 8

So apparently the runtime can't be convinced to go on here. I've got
this problem both with libobjc from gcc 4.3.2 and with the one that
shipped with gcc 4.3.3 (on Debian, at least). The error message is a
little misleading, because judging from the code that prints the above
message (the init_check_module_version function in libobjc's init.c)
there is some size mismatch between the size field in the module struct
(which is 16) and the value reported by sizeof(module), which is
32. Since I don't know what to make of that I have attached a backtrace
from the IntegerAdditions test for the perusal of the more knowledgable.

best regards,


Niels
#0  0x0000003ca9031ed5 in raise () from /lib/libc.so.6
No symbol table info available.
#1  0x0000003ca90333f3 in abort () from /lib/libc.so.6
No symbol table info available.
#2  0x00007f68d43bc772 in objc_verror (object=<value optimized out>, 
code=<value optimized out>, fmt=<value optimized out>, ap=<value optimized out>)
    at /build/buildd/gcc-4.3-4.3.3/src/libobjc/misc.c:68
        result = 0 '\000'
#3  0x00007f68d43bc803 in objc_error (object=0x542e, code=21550, fmt=0x6 
<Address 0x6 out of bounds>)
    at /build/buildd/gcc-4.3-4.3.3/src/libobjc/misc.c:46
        ap = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 
0x7fffddb65e20, reg_save_area = 0x7fffddb65d60}}
#4  0x00007f68d43bbe12 in __objc_exec_class (module=0x7f68d0b14030) at 
/build/buildd/gcc-4.3-4.3.3/src/libobjc/init.c:830
        symtab = (Symtab_t) 0x7f68d0b14050
        cell = <value optimized out>
        selectors = (SEL) 0x7f68d0b14080
        i = <value optimized out>
        previous_constructors = 1 '\001'
        unclaimed_categories = (struct objc_list *) 0x0
        __PRETTY_FUNCTION__ = "__objc_exec_class"
#5  0x00007f68d0b14023 in ?? ()
No symbol table info available.
#6  0x000000000210ad40 in ?? ()
No symbol table info available.
#7  0x00007f68d1cbf8c1 in llvm::JIT::runFunction ()
   from 
/usr/GNUstep/Local/Library/Frameworks/LanguageKitCodeGen.framework/Versions/Current/x86_64/linux-gnu/gnu-gnu-gnu/LanguageKitCodeGen
No locals.
#8  0x00007f68d1cb5bb9 in 
llvm::ExecutionEngine::runStaticConstructorsDestructors ()
   from 
/usr/GNUstep/Local/Library/Frameworks/LanguageKitCodeGen.framework/Versions/Current/x86_64/linux-gnu/gnu-gnu-gnu/LanguageKitCodeGen
No locals.
#9  0x00007f68d1c40ca5 in CodeGenModule::compile (this=0x20abad0) at 
CodeGenModule.cpp:401
        init = <value optimized out>
        pm = <incomplete type>
        f = <value optimized out>
#10 0x00007f68d1c33e17 in -[LLVMCodeGen endModule] (self=0x20aab90, 
_cmd=0x7f68d4f2e630) at LLVMCodeGen.m:33
No locals.
#11 0x00007f68d4d0aa75 in -[LKModule compileWith:] (self=0x1f8ad00, 
_cmd=0x604670, aGenerator=0x20aab90) at LKModule.m:171
        classenumerator = (class NSEnumerator *) 0x20b0340
        class = (class LKAST *) 0x0
        nextclassinclassenumerator = (IMP) 0x7f68d46f8bbb <-[GSArrayEnumerator 
nextObject]>
        categoryenumerator = (class NSEnumerator *) 0x2198c00
        category = (class LKAST *) 0x0
        nextcategoryincategoryenumerator = (IMP) 0x7f68d46f8bbb 
<-[GSArrayEnumerator nextObject]>
#12 0x0000000000401699 in jitScript (script=0x1ee42a0, extension=0x1ee42d0) at 
main.m:79
        ast = (class LKAST *) 0x1f8ad00
#13 0x0000000000401ee7 in main (argc=3, argv=0x7fffddb665d8) at main.m:183
        opts = (class NSDictionary *) 0x1ee3e90
        bundle = (class NSString *) 0x0
        framework = (class NSString *) 0x0
        frameworks = (class NSString *) 0x0
        transformName = (class NSString *) 0x0
        ProgramFile = (class NSString *) 0x1ee4110
        Program = (class NSString *) 0x1ee42a0
        extension = (class NSString *) 0x1ee42d0
        c1 = 50000
        className = (class NSString *) 0x602808
        tool = (struct objc_class *) 0x402212
        aTool = (struct objc_object *) 0x7fffddb664b0

[and on frame #4:]
(gdb) print *module
$10 = {version = 8, size = 16, name = 0x0, symtab = 0x7f0ace7a1050}
(gdb) print sizeof(*module)
$11 = 32
(gdb) 


_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev

Reply via email to