From: Pascal B. <pj...@in...> - 2005-08-31 05:21:09
|
I don't know if it's supposed to work or not on MacOSX 10.3.9 with a ppc750 processor, but it doesn't (therefore FFI isn't built into clisp-2.35 on MacOSX). $ hostinfo Mach kernel version: Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Kernel configured for a single processor only. 1 processor is physically available. Processor type: ppc750 (PowerPC 750) Processor active: 0 Primary memory available: 640.00 megabytes. Default processor set: 51 tasks, 121 threads, 1 processors Load average: 0.11, Mach factor: 0.88 [pjb@triton trampoline_r]$ gdb test1 GNU gdb 5.3-20030128 (Apple version gdb-309) (Thu Dec 4 15:41:30 GMT 2003) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin". Reading symbols for shared libraries .. done (gdb) run Starting program: /private/tmp/clisp-2.35-build/callback/trampoline_r/test1 Reading symbols for shared libraries . done Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand. 0x00100144 in ?? () (gdb) x/20i $pc-16 0x100134: .long 0x0 0x100138: .long 0x0 0x10013c: .long 0x0 0x100140: .long 0x100140 0x100144: lis r11,16 0x100148: ori r11,r11,348 0x10014c: lis r0,0 0x100150: ori r0,r0,10692 0x100154: mtctr r0 0x100158: bctr 0x10015c: stbu r13,-20670(r25) 0x100160: ori r10,r10,5065 0x100164: .long 0x0 0x100168: .long 0x0 0x10016c: .long 0x0 0x100170: .long 0x0 0x100174: .long 0x0 0x100178: .long 0x0 0x10017c: .long 0x0 0x100180: .long 0x0 (gdb) print cf No symbol "cf" in current context. (gdb) up #1 0x00002a2c in main () at /local/src/clisp/clisp-2.35/ffcall/callback/trampoline_r/test1.c:94 94 if ((*cf)(MAGIC4) == MAGIC1+MAGIC2+MAGIC3+MAGIC4) (gdb) print cf $1 = 0x100144 (gdb) down #0 0x00100144 in ?? () (gdb) info reg r0 0x2a14 10772 r1 0xbfffec70 3221220464 r2 0x100164 1048932 r3 0xa2f9d045 2734280773 r4 0x0 0 r5 0x7 7 r6 0x7 7 r7 0x5 5 r8 0x202006 2105350 r9 0x7c0903a6 2080965542 r10 0x0 0 r11 0x90161b44 2417367876 r12 0x100144 1048900 r13 0x0 0 r14 0x0 0 r15 0x0 0 r16 0x0 0 r17 0x0 0 r18 0x0 0 r19 0x0 0 r20 0x0 0 r21 0x0 0 r22 0x0 0 r23 0x0 0 r24 0x0 0 r25 0x0 0 r26 0xbfffed7c 3221220732 r27 0x8 8 r28 0x1 1 r29 0xbfffed80 3221220736 r30 0x100144 1048900 r31 0x29e8 10728 pc 0x100144 1048900 ps 0x8f030 585776 cr 0x22000242 570425922 lr 0x2a2c 10796 ctr 0x100144 1048900 xer 0xc 12 mq 0x0 0 fpscr 0x82024000 2181185536 vscr 0x0 0 vrsave 0x0 0 (gdb) list 89 90 int main () 91 { 92 function cf = alloc_trampoline_r((function)&f, (void*)MAGIC1, (void*)MAGIC2); 93 #ifdef __GNUC__ 94 if ((*cf)(MAGIC4) == MAGIC1+MAGIC2+MAGIC3+MAGIC4) 95 #else 96 if ((*cf)(MAGIC4) == MAGIC3+MAGIC4) 97 #endif 98 { free_trampoline_r(cf); printf("Works, test1 passed.\n"); exit(0); } (gdb) quit -- __Pascal Bourguignon__ http://www.informatimago.com/ This is a signature virus. Add me to your signature and help me to live |