From: Barry F. <bar...@at...> - 2003-10-02 17:42:23
|
Sam Steingold <sd...@gn...> writes: >> * Barry Fishman <one...@ng...g> [2003-10-01 12:09:41 -0400]: >> >> Sam Steingold <sd...@gn...> writes: >> >> >> * Barry Fishman <one...@ng...g> [2003-09-29 09:23:00 -0400]: >> >> The data is correct, just 4 bytes off from where TheSvector seems to >> >> think it is. I don't know enough about CLISP internal structures to >> >> know what is happening. > > this is not what I observe: I followed your build and debug procedure, but got different results: =========== BEGIN DEBUG LOG ============= GNU gdb 5.2.1 Copyright 2002 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 "i586-suse-linux". Breakpoint 1 at 0x806867a: file eval.d, line 4834. Breakpoint 2 at 0x8065f3a: file eval.d, line 3921. Breakpoint 3 at 0x8062674: file eval.d, line 2805. Breakpoint 4 at 0x804ff12: file spvw_garcol.d, line 2617. Breakpoint 5 at 0x80524f2: file spvw.d, line 627. Breakpoint 6 at 0x804c826: file spvw.d, line 483. Breakpoint 7 at 0x804c8b6: file spvw.d, line 494. Hardware watchpoint 8: back_trace Num Type Disp Enb Address What 1 breakpoint keep n 0x0806867a in funcall at eval.d:4834 zout fun 2 breakpoint keep n 0x08065f3a in apply at eval.d:3921 zout fun 3 breakpoint keep n 0x08062674 in eval at eval.d:2805 zout form 4 breakpoint keep n 0x0804ff12 in gar_col at spvw_garcol.d:2617 5 breakpoint keep y 0x080524f2 in fehler_notreached at spvw.d:627 6 breakpoint keep y 0x0804c826 in SP_ueber at spvw.d:483 7 breakpoint keep y 0x0804c8b6 in STACK_ueber at spvw.d:494 8 hw watchpoint keep n back_trace zbacktrace continue .gdbinit:133: Error in sourced command file: Function "sigsegv_handler_failed" not defined. (gdb) full Breakpoint 1 at 0x808f846: file eval.d, line 4834. Breakpoint 2 at 0x808d106: file eval.d, line 3921. Breakpoint 3 at 0x8089840: file eval.d, line 2805. Breakpoint 4 at 0x80770de: file spvw_garcol.d, line 2617. Breakpoint 5 at 0x80796be: file spvw.d, line 627. Breakpoint 6 at 0x80739f2: file spvw.d, line 483. Breakpoint 7 at 0x8073a82: file spvw.d, line 494. Breakpoint 9 at 0x804d482: file clx.f, line 481. Breakpoint 10 at 0x804d4fe: file clx.f, line 488. (gdb) set language c (gdb) break dump_image Breakpoint 11 at 0x805e07a: file clx.f, line 4968. (gdb) run -B . -M full/lispinit.mem -q -norc badcase.lisp Starting program: /home/barry/src/gen/clisp/full/lisp.run -B . -M full/lispinit.mem -q -norc badcase.lisp STACK depth: 16363 #S(IMAGE-X :WIDTH 40 :HEIGHT 44 :DEPTH 1 :PLIST (NAME M-GRELB) :FORMAT Z-PIXMAP :BYTES-PER-LINE 8 :BITS-PER-PIXEL 1 :BIT-LSB-FIRST-P T :BYTE-LSB-FIRST-P T :DATA #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 31 0 240 3 0 0 0 64 48 0 24 4 0 0 0 0 32 255 9 0 0 0 0 0 224 255 15 0 0 0 0 0 248 255 63 0 0 0 0 0 254 255 255 0 0 0 0 0 255 255 255 1 0 0 0 128 255 255 255 3 0 0 0 128 255 255 255 3 0 0 0 192 31 255 241 7 0 0 0 192 15 254 224 7 0 0 0 192 15 254 224 7 0 0 0 192 31 255 241 7 0 0 0 192 255 255 255 7 0 0 0 128 255 255 255 3 0 0 0 128 255 255 255 3 0 0 0 0 255 255 255 1 0 0 0 0 254 255 255 0 0 0 0 0 248 255 63 0 0 0 0 0 224 255 15 0 0 0 0 0 0 255 1 0 0 0 0 0 0 199 1 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 254 131 255 0 0 0 0 0 255 199 255 1 0 0 0 0 254 131 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) :UNIT 32 :PAD 32 :LEFT-PAD 0) Breakpoint 11, dump_image (image=0xbfffb6d0) at clx.f:4968 4968 skipSTACK(1); Warning: the current language does not match this frame. (gdb) up #1 0x0805e740 in C_subr_xlib_put_image () at clx.f:5063 5063 /* Q: Should we raise a x-error-sonstwas condition here? */ (gdb) zout mv_space[0] #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 31 0 240 3 0 0 0 64 48 0 24 4 0 0 0 0 32 255 9 0 0 0 0 0 224 255 15 0 0 0 0 0 248 255 63 0 0 0 0 0 254 255 255 0 0 0 0 0 255 255 255 1 0 0 0 128 255 255 255 3 0 0 0 128 255 255 255 3 0 0 0 192 31 255 241 7 0 0 0 192 15 254 224 7 0 0 0 192 15 254 224 7 0 0 0 192 31 255 241 7 0 0 0 192 255 255 255 7 0 0 0 128 255 255 255 3 0 0 0 128 255 255 255 3 0 0 0 0 255 255 255 1 0 0 0 0 254 255 255 0 0 0 0 0 248 255 63 0 0 0 0 0 224 255 15 0 0 0 0 0 0 255 1 0 0 0 0 0 0 199 1 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 254 131 255 0 0 0 0 0 255 199 255 1 0 0 0 0 254 131 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) {one_o = 540662617} (gdb) zout STACK[-8] #S(XLIB:IMAGE-X :WIDTH 40 :HEIGHT 44 :DEPTH 1 :PLIST (:NAME :M-GRELB) :FORMAT :Z-PIXMAP :BYTES-PER-LINE 8 :BITS-PER-PIXEL 1 :BIT-LSB-FIRST-P T :BYTE-LSB-FIRST-P T :DATA #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 31 0 240 3 0 0 0 64 48 0 24 4 0 0 0 0 32 255 9 0 0 0 0 0 224 255 15 0 0 0 0 0 248 255 63 0 0 0 0 0 254 255 255 0 0 0 0 0 255 255 255 1 0 0 0 128 255 255 255 3 0 0 0 128 255 255 255 3 0 0 0 192 31 255 241 7 0 0 0 192 15 254 224 7 0 0 0 192 15 254 224 7 0 0 0 192 31 255 241 7 0 0 0 192 255 255 255 7 0 0 0 128 255 255 255 3 0 0 0 128 255 255 255 3 0 0 0 0 255 255 255 1 0 0 0 0 254 255 255 0 0 0 0 0 248 255 63 0 0 0 0 0 224 255 15 0 0 0 0 0 0 255 1 0 0 0 0 0 0 199 1 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 198 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 130 0 0 0 0 0 0 254 131 255 0 0 0 0 0 255 199 255 1 0 0 0 0 254 131 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) :UNIT 32 :PAD 32 :LEFT-PAD 0) {one_o = 540662977} (gdb) cont Continuing. ;; Image (bitmap) 40x44x1, bpl= 8, pad= 32: ;| | ;| | ;| | ;| | ;| *| ;|** * | ;| * | ;| | ;| | ;| | ;| | ;|* *| ;|** *| ;|** **| ;|*** **| ;|*** **| ;|*** **| ;|*** **| ;|*** *| ;|** *| ;|** | ;|* | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;| | ;|* | ;| | ;| | ;| | ;| | ;| | ;| * **| Program exited normally. =================== END DEBUG LOG ==================== All of the debug information seems correct when I do it, although the bitmap I display is still wrong. I am unsure of why your gremblin data is so different than mine! If I offset the data using my kludge: im.data = (char*) &TheSbvector (value1)->data[-4]; The debug log is identical, except: *** unpatched.log 2003-10-02 12:30:12.000000000 -0400 --- patched.log 2003-10-02 12:43:20.000000000 -0400 *************** *** 109,153 **** ;| | ;| | ;| | - ;| *| - ;|** * | - ;| * | ;| | ;| | ;| | ;| | - ;|* *| - ;|** *| - ;|** **| - ;|*** **| - ;|*** **| - ;|*** **| - ;|*** **| - ;|*** *| - ;|** *| - ;|** | - ;|* | ;| | ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| | - ;|* | - ;| | - ;| | - ;| | - ;| | - ;| | - ;| * **| Program exited normally. --- 109,153 ---- ;| | ;| | ;| | ;| | + ;| ****** ****** | + ;| * ** ** * | + ;| * ********* * | + ;| *************** | + ;| ******************* | + ;| *********************** | + ;| ************************* | + ;| *************************** | + ;| *************************** | + ;| ******* ********* ******* | + ;| ****** ******* ****** | + ;| ****** ******* ****** | + ;| ******* ********* ******* | + ;| ***************************** | + ;| *************************** | + ;| *************************** | + ;| ************************* | + ;| *********************** | + ;| ******************* | + ;| *************** | + ;| ********* | + ;| *** *** | + ;| ** ** | + ;| ** ** | + ;| ** ** | + ;| ** ** | + ;| * * | + ;| * * | + ;| * * | + ;| * * | + ;| * * | + ;| ********* ********* | + ;| *********** *********** | + ;| ********* ********* | ;| | ;| | ;| | ;| | ;| | Program exited normally. > this means that the DATA slot of the IMAGE-X structure gets corrupted > somewhere, probably in C. The C raw data pointer is wrong by 4 bytes (in my test), but the data bits themselves seem to be OK. I don't think the DATA slot of the IMAGE-X structure is corrupted, since it still appears correct (from lisp) after the program is run. The only thing (confirmed) wrong is the data pointer computed internal to the put-image function. > note also the different :PLIST lists! Are we looking at symbol names rather than the symbols themselves in the debug log? > [OTOH, I am an awful bit-pusher, and I am likely to be missing the > point here, please bear with me] I appreciate the time you have spent on this. Initially, I thought that it was something simple, that more experienced eyes would have seen right away. I am going to continue to work on the problem, but first I am going to spend some time better acquainting myself with the CLISP FFI. -- Barry Fishman |