[cmucl-help] 19c alpha [Was Re: CMUCL 18c building on tru64 5.1]

Fausto Saporito fausto.saporito at gmail.com
Tue Sep 9 21:07:57 UTC 2014


Hello all,

so we have targeted the right process :-) I got always a sigsegv...
but it's different....
debug_print is working... is there a way to have those messages
printed on the screen ? At the moment I can see them only in dbx :)

Yes... I have to go back to rebuild kernel.core after generated
lisp.nm, but it seems not all the functions are present in lisp.nm
The most obvious are missing! Like sin, cos, tan, killpg, etc ... and
they are defined in undefineds.h

now... the debug has some meaning... in a1 there's call_into_lisp_end
function! and there's no sigsegv anymore... at least in that line :-)

dbx version 5.1
Type 'help' for help.

main: 405  char *core = NULL;
(dbx) stop in funcall0
[2] stop in funcall0
(dbx) run -core kernel.core
[2] stopped at   [funcall0:354 ,0x1201b224]     lispobj *args =
current_control_stack_pointer;
(dbx) n
  [funcall0:356 ,0x1201b230]    return call_into_lisp(function, args, 0);
(dbx) stepi
>*[funcall0:356, 0x1201b234]    ldq     a1, 16(sp)
(dbx) s
  [call_into_lisp:54 ,0x1201b448]       stl
zero,foreign_function_call_active
(dbx) s
  [call_into_lisp:25 ,0x1201b44c]       lda     sp,-framesize(sp)
(dbx) s
  [call_into_lisp:28 ,0x1201b450]       stq     s1, framesize-8*6(sp)
(dbx) s
  [call_into_lisp:61 ,0x1201b454]       mov     a1,reg_CFP
(dbx) s
  [call_into_lisp:29 ,0x1201b458]       stq     s2, framesize-8*5(sp)
(dbx) s
  [call_into_lisp:42 ,0x1201b45c]       ldil    reg_OCFP,0
(dbx) s
  [call_into_lisp:30 ,0x1201b460]       stq     s3, framesize-8*4(sp)
(dbx) s
  [call_into_lisp:45 ,0x1201b464]       ldil    reg_L1,0
(dbx) s
  [call_into_lisp:31 ,0x1201b468]       stq     s4, framesize-8*3(sp)
(dbx) s
  [call_into_lisp:40 ,0x1201b46c]       mov     a0,reg_LEXENV
(dbx) s
  [call_into_lisp:32 ,0x1201b470]       stq     s5, framesize-8*2(sp)
(dbx) s
  [call_into_lisp:38 ,0x1201b474]       ldil    reg_CODE,0
(dbx) s
  [call_into_lisp:33 ,0x1201b478]       stq     s6, framesize-8*1(sp)
(dbx) s
  [call_into_lisp:49 ,0x1201b47c]       ldil    reg_NULL,NIL
(dbx) s
  [call_into_lisp:27 ,0x1201b480]       stq     s0, framesize-8*7(sp)
(dbx) s
  [call_into_lisp:84 ,0x1201b4ec]       jsr     reg_ZERO,(reg_LIP)
(dbx) stepi
>*[., 0x30294860]       lda     s5, -305(v0)
(dbx) stepi
>*[., 0x30294864]       lda     s0, 96(s1)
(dbx) stepi
>*[., 0x30294868]       bne     t7, 0x30295708
(dbx) stepi
>*[., 0x3029486c]       stl     s2, 0(s1)
(dbx) stepi
>*[., 0x30294870]       stl     ra, 4(s1)
(dbx) stepi
>*[., 0x30294874]       ldl     t9, 13(s5)
(dbx) stepi
>*[., 0x30294878]       bis     zero, t9, a0
(dbx) stepi
>*[., 0x3029487c]       lda     t10, 0(zero)
(dbx) stepi
>*[., 0x30294880]       ldah    t10, 0(t10)
(dbx) stepi
>*[., 0x30294884]       sll     t10, 0x20, t10
(dbx) stepi
>*[., 0x30294888]       lda     t10, 21228(t10)
(dbx) stepi
>*[., 0x3029488c]       ldah    t10, 4609(t10)
(dbx) printx $t10
0x52ec
(dbx) stepi
>*[., 0x30294890]       lda     a1, 0(zero)
(dbx) printx $a1
0x50000000
(dbx) stepi
>*[., 0x30294894]       ldah    a1, 0(a1)
(dbx) stepi
>*[., 0x30294898]       sll     a1, 0x20, a1
(dbx) stepi
>*[., 0x3029489c]       lda     a1, -19120(a1)
(dbx) stepi
>*[., 0x302948a0]       ldah    a1, 4610(a1)
(dbx) printx $a1
0xffffffffffffb550
(dbx) stepi
>*[., 0x302948a4]       lda     sp, -16(sp)
(dbx) printx $a1
0x1201b550
(dbx) stepi
>*[., 0x302948a8]       jsr     v0, (a1), 0x302948ac
(dbx) stepi
>*[call_into_c:141, 0x1201b550]         bis     s1, s1, s2
(dbx) s
  [call_into_c:142 ,0x1201b554]         mov     reg_CSP, reg_CFP
(dbx) s
  [call_into_c:143 ,0x1201b558]         addq    reg_CFP, 32, reg_CSP
(dbx) s
  [call_into_c:144 ,0x1201b55c]         stl     reg_OCFP, 0(reg_CFP)
(dbx) s
  [call_into_c:145 ,0x1201b560]         subl    reg_LIP, reg_CODE, reg_L1
(dbx) s
  [call_into_c:146 ,0x1201b564]         addl    reg_L1,
type_OtherPointer, reg_L1
(dbx) s
  [call_into_c:147 ,0x1201b568]         stl     reg_L1, 4(reg_CFP)
(dbx) s
  [call_into_c:148 ,0x1201b56c]         stl     reg_CODE, 8(reg_CFP)
(dbx) s
  [call_into_c:149 ,0x1201b570]         stl     reg_NULL, 12(reg_CFP)
(dbx) s
  [call_into_c:152 ,0x1201b574]         addq    reg_ALLOC,1,reg_ALLOC
(dbx) s
  [call_into_c:155 ,0x1201b578]         ldq     reg_NL4,0(reg_NSP)
(dbx) s
  [call_into_c:156 ,0x1201b57c]         ldq     reg_NL5,8(reg_NSP)
(dbx) s
  [call_into_c:157 ,0x1201b580]         addq    reg_NSP,16,reg_NSP
(dbx) s
  [call_into_c:160 ,0x1201b584]         subq    reg_ALLOC,1,reg_L1
(dbx) s
  [call_into_c:161 ,0x1201b588]         stl     reg_L1,
current_dynamic_space_free_pointer
(dbx) s
  [call_into_c:162 ,0x1201b590]         stl     reg_BSP,
current_binding_stack_pointer
(dbx) s
  [call_into_c:163 ,0x1201b598]         stl     reg_CSP,
current_control_stack_pointer
(dbx) s
  [call_into_c:164 ,0x1201b5a0]         stl     reg_CFP,
current_control_frame_pointer
(dbx) s
  [call_into_c:167 ,0x1201b5a8]         stl     reg_CSP,
foreign_function_call_active
(dbx) s
  [call_into_c:170 ,0x1201b5b0]         subq    reg_ALLOC,1,reg_ALLOC
(dbx) s
  [call_into_c:171 ,0x1201b5b4]         stl     reg_ZERO,0(reg_ALLOC)
(dbx) s
  [call_into_c:174 ,0x1201b5b8]         mov     reg_CFUNC, reg_L1
/* ### This line is a mystery */
(dbx) s
  [call_into_c:175 ,0x1201b5bc]         jsr     ra, (reg_CFUNC)
(dbx) printx $ra
0x10007
(dbx) stepi
>*[debug_print:164, 0x120152ec]         ldah    gp, 0(t12)
(dbx) s
  [debug_print:165 ,0x12015304]         {
(dbx) s
  [debug_print:166 ,0x12015308]         printf("%s\n", (char *)
(((struct vector *) PTR(string))->data));
(dbx) s
In initial-function, and running.
  [debug_print:167 ,0x1201532c]         fflush(stdout);
(dbx) s
  [debug_print:169 ,0x12015344]         return NIL;
(dbx) s
  [debug_print:170 ,0x1201534c]         }
(dbx) s
  [call_into_c:176 ,0x1201b5c0]         ldgp    $29,0(ra)
(dbx) s
  [call_into_c:179 ,0x1201b5c8]         subq    reg_NSP,16,reg_NSP
(dbx) s
  [call_into_c:182 ,0x1201b5cc]         mov     reg_ZERO, reg_NARGS
(dbx) s
  [call_into_c:183 ,0x1201b5d0]         mov     reg_ZERO, reg_A0
(dbx) s
  [call_into_c:184 ,0x1201b5d4]         mov     reg_ZERO, reg_A1
(dbx) s
  [call_into_c:185 ,0x1201b5d8]         mov     reg_ZERO, reg_A2
(dbx) s
  [call_into_c:186 ,0x1201b5dc]         mov     reg_ZERO, reg_A3
(dbx) s
  [call_into_c:187 ,0x1201b5e0]         mov     reg_ZERO, reg_A4
(dbx) s
  [call_into_c:188 ,0x1201b5e4]         mov     reg_ZERO, reg_A5
(dbx) s
  [call_into_c:189 ,0x1201b5e8]         mov     reg_ZERO, reg_L0
(dbx) s
  [call_into_c:191 ,0x1201b5ec]         mov     reg_ZERO, reg_L2
(dbx) s
  [call_into_c:195 ,0x1201b5f0]         lda     reg_ALLOC,1(reg_ZERO)
(dbx) s
  [call_into_c:198 ,0x1201b5f4]         stl     reg_ZERO,
foreign_function_call_active
(dbx) s
  [call_into_c:201 ,0x1201b5fc]         ldl
reg_NL0,current_dynamic_space_free_pointer
(dbx) s
  [call_into_c:202 ,0x1201b604]         addq    reg_ALLOC,reg_NL0,reg_ALLOC
(dbx) s
  [call_into_c:205 ,0x1201b608]         subq    reg_ALLOC,1,reg_ALLOC
(dbx) s
  [call_into_c:206 ,0x1201b60c]         stl     reg_ZERO,0(reg_ALLOC)
(dbx) s
  [call_into_c:208 ,0x1201b610]         ldl     reg_NULL, 12(reg_CFP)
(dbx) s
  [call_into_c:211 ,0x1201b614]         ldl     reg_CODE, 8(reg_CFP)
(dbx) s
  [call_into_c:212 ,0x1201b618]         ldl     reg_NL0, 4(reg_CFP)
(dbx) s
  [call_into_c:213 ,0x1201b61c]         subq    reg_NL0,
type_OtherPointer, reg_NL0
(dbx) s
  [call_into_c:214 ,0x1201b620]         addq    reg_CODE, reg_NL0, reg_NL0
(dbx) s
  [call_into_c:216 ,0x1201b624]         mov     reg_CFP, reg_CSP
(dbx) s
  [call_into_c:217 ,0x1201b628]         mov     reg_OCFP, reg_CFP
(dbx) s
  [call_into_c:219 ,0x1201b62c]         ret     zero, (reg_NL0), 1
(dbx) s
  [call_into_c:141 ,0x1201b550]         mov     reg_CFP, reg_OCFP
(dbx) s
  [call_into_c:142 ,0x1201b554]         mov     reg_CSP, reg_CFP
(dbx) s
  [call_into_c:143 ,0x1201b558]         addq    reg_CFP, 32, reg_CSP
(dbx) s
  [call_into_c:144 ,0x1201b55c]         stl     reg_OCFP, 0(reg_CFP)
(dbx) s
  [call_into_c:145 ,0x1201b560]         subl    reg_LIP, reg_CODE, reg_L1
(dbx) s
  [call_into_c:146 ,0x1201b564]         addl    reg_L1,
type_OtherPointer, reg_L1
(dbx) s
  [call_into_c:147 ,0x1201b568]         stl     reg_L1, 4(reg_CFP)
(dbx) s
  [call_into_c:148 ,0x1201b56c]         stl     reg_CODE, 8(reg_CFP)
(dbx) s
  [call_into_c:149 ,0x1201b570]         stl     reg_NULL, 12(reg_CFP)
(dbx) s
  [call_into_c:152 ,0x1201b574]         addq    reg_ALLOC,1,reg_ALLOC
(dbx) s
  [call_into_c:155 ,0x1201b578]         ldq     reg_NL4,0(reg_NSP)
(dbx) s
  [call_into_c:156 ,0x1201b57c]         ldq     reg_NL5,8(reg_NSP)
(dbx) s
  [call_into_c:157 ,0x1201b580]         addq    reg_NSP,16,reg_NSP
(dbx) s
  [call_into_c:160 ,0x1201b584]         subq    reg_ALLOC,1,reg_L1
(dbx) s
  [call_into_c:161 ,0x1201b588]         stl     reg_L1,
current_dynamic_space_free_pointer
(dbx) s
  [call_into_c:162 ,0x1201b590]         stl     reg_BSP,
current_binding_stack_pointer
(dbx) s
  [call_into_c:163 ,0x1201b598]         stl     reg_CSP,
current_control_stack_pointer
(dbx) s
  [call_into_c:164 ,0x1201b5a0]         stl     reg_CFP,
current_control_frame_pointer
(dbx) s
  [call_into_c:167 ,0x1201b5a8]         stl     reg_CSP,
foreign_function_call_active
(dbx) s
  [call_into_c:170 ,0x1201b5b0]         subq    reg_ALLOC,1,reg_ALLOC
(dbx) s
  [call_into_c:171 ,0x1201b5b4]         stl     reg_ZERO,0(reg_ALLOC)
(dbx) s
  [call_into_c:174 ,0x1201b5b8]         mov     reg_CFUNC, reg_L1
/* ### This line is a mystery */
(dbx) s
  [call_into_c:175 ,0x1201b5bc]         jsr     ra, (reg_CFUNC)
(dbx) printx $ra
0x1201b5c0
(dbx) stepi
>*[debug_print:164, 0x120152ec]         ldah    gp, 0(t12)
(dbx) stepi
>*[debug_print:164, 0x120152f0]         lda     gp, -18428(gp)
(dbx) stepi
>*[debug_print:164, 0x120152f4]         lda     sp, -16(sp)
(dbx) stepi
>*[debug_print:164, 0x120152f8]         stq     ra, 0(sp)
(dbx) stepi
>*[debug_print:164, 0x120152fc]         stq     s0, 8(sp)
(dbx) s
  [debug_print:165 ,0x12015304]         {
(dbx) s
  [debug_print:166 ,0x12015308]         printf("%s\n", (char *)
(((struct vector *) PTR(string))->data));
(dbx) s
GLOBALDB-INIT
  [debug_print:167 ,0x1201532c]         fflush(stdout);
(dbx) s
  [debug_print:169 ,0x12015344]         return NIL;
(dbx) s
  [debug_print:170 ,0x1201534c]         }
(dbx) s
  [call_into_c:176 ,0x1201b5c0]         ldgp    $29,0(ra)
(dbx) s
  [call_into_c:179 ,0x1201b5c8]         subq    reg_NSP,16,reg_NSP
(dbx) s
  [call_into_c:182 ,0x1201b5cc]         mov     reg_ZERO, reg_NARGS
(dbx) s
  [call_into_c:183 ,0x1201b5d0]         mov     reg_ZERO, reg_A0
(dbx) s
  [call_into_c:184 ,0x1201b5d4]         mov     reg_ZERO, reg_A1
(dbx) s
  [call_into_c:185 ,0x1201b5d8]         mov     reg_ZERO, reg_A2
(dbx) s
  [call_into_c:186 ,0x1201b5dc]         mov     reg_ZERO, reg_A3
(dbx) s
  [call_into_c:187 ,0x1201b5e0]         mov     reg_ZERO, reg_A4
(dbx) s
  [call_into_c:188 ,0x1201b5e4]         mov     reg_ZERO, reg_A5
(dbx) s
  [call_into_c:189 ,0x1201b5e8]         mov     reg_ZERO, reg_L0
(dbx) s
  [call_into_c:191 ,0x1201b5ec]         mov     reg_ZERO, reg_L2
(dbx) s
  [call_into_c:195 ,0x1201b5f0]         lda     reg_ALLOC,1(reg_ZERO)
(dbx) s
  [call_into_c:198 ,0x1201b5f4]         stl     reg_ZERO,
foreign_function_call_active
(dbx) s
  [call_into_c:201 ,0x1201b5fc]         ldl
reg_NL0,current_dynamic_space_free_pointer
(dbx) s
  [call_into_c:202 ,0x1201b604]         addq    reg_ALLOC,reg_NL0,reg_ALLOC
(dbx) s
  [call_into_c:205 ,0x1201b608]         subq    reg_ALLOC,1,reg_ALLOC
(dbx) s
  [call_into_c:206 ,0x1201b60c]         stl     reg_ZERO,0(reg_ALLOC)
(dbx) s
  [call_into_c:208 ,0x1201b610]         ldl     reg_NULL, 12(reg_CFP)
(dbx) s
  [call_into_c:211 ,0x1201b614]         ldl     reg_CODE, 8(reg_CFP)
(dbx) s
  [call_into_c:212 ,0x1201b618]         ldl     reg_NL0, 4(reg_CFP)
(dbx) s
  [call_into_c:213 ,0x1201b61c]         subq    reg_NL0,
type_OtherPointer, reg_NL0
(dbx) s
  [call_into_c:214 ,0x1201b620]         addq    reg_CODE, reg_NL0, reg_NL0
(dbx) s
  [call_into_c:216 ,0x1201b624]         mov     reg_CFP, reg_CSP
(dbx) s
  [call_into_c:217 ,0x1201b628]         mov     reg_OCFP, reg_CFP
(dbx) s
  [call_into_c:219 ,0x1201b62c]         ret     zero, (reg_NL0), 1
(dbx) s
FDEFN-INIT
signal Trace/BPT trap at >*[., 0x10144]         call_pal mtpr_at
(dbx) s
signal Illegal instruction at >*[., 0x10148]    blbs    t6, 0xfffffffffff95d5c
(dbx) s
signal Bus error at >*[., 0x10158]      addl    t6, 0x17, v0
(dbx) s

warning: breakpoint location cannot be written
signal Segmentation fault at
warning: PC value 0xb2814 not valid, trying RA
> [., 0x3018e787]       bgt     t10, 0x302964a7


2014-09-09 20:49 GMT+02:00 Raymond Toy <toy.raymond at gmail.com>:
>
>
> On Tue, Sep 9, 2014 at 11:28 AM, Fausto Saporito <fausto.saporito at gmail.com>
> wrote:
>>
>> 2014-09-09 20:01 GMT+02:00 Raymond Toy <toy.raymond at gmail.com>:
>> >
>> >
>>
>> >>
>> >> So I should update undefineds.h with all those functions present in
>> >> the warnings, if I understood correctly...
>> >
>> >
>> > Ugh. This might be tricky.  Your 19c linux binary supports the
>> > :linkage-table *feature*. But alpha doesn't. I'm not sure how well
>> > cross-compiling from linux to alpha will work in this case. And I don't
>> > remember what a cross-compile without :linkage-tables looks like
>> > anymore,
>> > and all of the current working ports use :linkage-tables.
>> >
>> > So, these undefined symbols might be ok, but they do have to get
>> > resolved in
>> > some way.  call_into_c ought to exist in your lisp.nm file. Perhaps
>> > genesis
>> > is not parsing that file correctly?
>> >
>> > (See load-foreign-symbol-table in compiler/new-genesis.lisp.)
>> >>
>> >>
>>
>> Sorry, but I'm a bit lost.
>> Just to recap.
>>
>> On Linux machine:
>>
>> 1) in alpha-target directory I have lisp.map and lisp.nm Lisp.nm is
>> empty just a line saying "Map file for lisp version 0".
>> Lisp.map is full of informations. I noticed lisp.nm is populated later
>> on the ALPHA machine.
>>
>> Is this correct ?
>>
>> When the load-foreign-symbol-table should read that file ? If it tries
>> on the Linux server the file is empty... and I don't think it reads
>> the file on the ALPHA machine, because the first step I do is
>> rebuild-lisp.sh (so only the C code).
>>
>> On the ALPHA machine:
>>
>> 1) after the rebuild-lisp.sh, I have a lisp.nm with all the infos
>> needed. Maybe I should put back that file on the linux server and
>> generate a new core ?
>
>
> I think this is right, but as I said, it's been ages since I've done this
> without linkage-tables. And when I did, everything was shared via NFS, so I
> didn't have to move things around.
>
> However, I do remember that if the C code was recompiled and caused things
> to move, I had to do a new genesis to get the addresses corrected.
>
> I think cross-build-world.sh without -c should be enough so you don't have
> to recompile everything. You just need to run genesis again.
>>
>>
>> regards,
>> Fausto
>
>
>
>
> --
> Ray


More information about the cmucl-help mailing list