On Sat, Jul 13, 2024 at 10:13 AM Marco Feichtinger <ma...@germteig.com> wrote:
> 
> This is what acid prints out:
>         rc 505: suicide: sys: trap: fault read addr=0x965708 pc=0x0000b5d9
>         mk: 8c -FTVw -I. ../port/devcons.c  : exit status=rc 505: sys: trap: 
> fault read addr=0x965708 pc=0x0000b5d9
>         term%
>         term% acid 505
>         /proc/505/text:386 plan 9 executable
>         /sys/lib/acid/port
>         /sys/lib/acid/386
>         acid: lstk()
>         <stdin>:2: (error) no stack frame: './acid' file does not exist
>         acid: asm(Readdir)
>         Readdir 0x0000b5ac SUBL $0xc,SP
>         Readdir+0x3 0x0000b5af  MOVL    f+0x0(FP),BX
>         Readdir+0x7 0x0000b5b3  CMPL    BX,$0x0
>         Readdir+0xa 0x0000b5b6  JLT     Readdir+0x160(SB)
>         Readdir+0x10 0x0000b5bc CMPL    BX,$0x32
>         Readdir+0x13 0x0000b5bf JGE     Readdir+0x160(SB)
>         Readdir+0x19 0x0000b5c5 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0x1c 0x0000b5c8 SHLL    $0x2,CX
>         Readdir+0x1f 0x0000b5cb MOVL    dir+0x4(SB)(CX*1),AX
>         Readdir+0x26 0x0000b5d2 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0x29 0x0000b5d5 SHLL    $0x2,CX
>         Readdir+0x2c 0x0000b5d8 CMPL    dir+0x8(SB)(CX*1),AX
>         Readdir+0x33 0x0000b5df JNE     Readdir+0xd8(SB)
>         Readdir+0x39 0x0000b5e5 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0x3c 0x0000b5e8 SHLL    $0x2,CX
>         Readdir+0x3f 0x0000b5eb MOVL    dir(SB)(CX*1),AX
>         Readdir+0x46 0x0000b5f2 MOVL    AX,0x0(SP)
>         Readdir+0x49 0x0000b5f5 CALL    free(SB)
>         Readdir+0x4e 0x0000b5fa MOVL    f+0x0(FP),BX
>         Readdir+0x52 0x0000b5fe LEAL    0x0(BX)(BX*2),AX
>         Readdir+0x55 0x0000b601 SHLL    $0x2,AX
>         Readdir+0x58 0x0000b604 MOVL    $0x0,dir(SB)(AX*1)
>         Readdir+0x63 0x0000b60f MOVL    BX,0x0(SP)
>         Readdir+0x66 0x0000b612 LEAL    0x0(BX)(BX*2),DX
>         Readdir+0x69 0x0000b615 SHLL    $0x2,DX
>         Readdir+0x6c 0x0000b618 LEAL    dir(SB)(DX*1),CX
>         Readdir+0x73 0x0000b61f MOVL    CX,0x4(SP)
>         Readdir+0x77 0x0000b623 CALL    dirread(SB)
>         Readdir+0x7c 0x0000b628 MOVL    f+0x0(FP),BX
>         Readdir+0x80 0x0000b62c MOVL    AX,BP
>         acid: casm()
>         Readdir+0x82 0x0000b62e CMPL    AX,$0x0
>         Readdir+0x85 0x0000b631 JLE     Readdir+0x14a(SB)
>         Readdir+0x8b 0x0000b637 CMPL    onlydirs+0x8(FP),$0x0
>         Readdir+0x90 0x0000b63c JEQ     Readdir+0xba(SB)
>         Readdir+0x92 0x0000b63e LEAL    0x0(BX)(BX*2),DX
>         Readdir+0x95 0x0000b641 SHLL    $0x2,DX
>         Readdir+0x98 0x0000b644 MOVL    dir(SB)(DX*1),CX
>         Readdir+0x9f 0x0000b64b MOVL    CX,0x0(SP)
>         Readdir+0xa2 0x0000b64e MOVL    BP,0x4(SP)
>         Readdir+0xa6 0x0000b652 CALL    trimdirs(SB)
>         Readdir+0xab 0x0000b657 MOVL    f+0x0(FP),BX
>         Readdir+0xaf 0x0000b65b MOVL    AX,BP
>         Readdir+0xb1 0x0000b65d CMPL    AX,$0x0
>         Readdir+0xb4 0x0000b660 JEQ     Readdir+0x19(SB)
>         Readdir+0xba 0x0000b666 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0xbd 0x0000b669 SHLL    $0x2,CX
>         Readdir+0xc0 0x0000b66c MOVL    BP,dir+0x8(SB)(CX*1)
>         Readdir+0xc7 0x0000b673 LEAL    0x0(BX)(BX*2),AX
>         Readdir+0xca 0x0000b676 SHLL    $0x2,AX
>         Readdir+0xcd 0x0000b679 MOVL    $0x0,dir+0x4(SB)(AX*1)
>         Readdir+0xd8 0x0000b684 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0xdb 0x0000b687 SHLL    $0x2,CX
>         Readdir+0xde 0x0000b68a MOVL    dir+0x4(SB)(CX*1),AX
>         Readdir+0xe5 0x0000b691 LEAL    0x0(BX)(BX*2),CX
>         Readdir+0xe8 0x0000b694 SHLL    $0x2,CX
>         Readdir+0xeb 0x0000b697 CMPL    dir+0x8(SB)(CX*1),AX
>         Readdir+0xf2 0x0000b69e JNE     Readdir+0xfa(SB)
>         Readdir+0xf4 0x0000b6a0 XORL    AX,AX
>         Readdir+0xf6 0x0000b6a2 ADDL    $0xc,SP
>         Readdir+0xf9 0x0000b6a5 RET
>         acid:
> 
> I am lost here.
> I read the acid manual, but I still don't know what this output is about.
> 
> -marco
> 

The error message lstk() emits is about an acid file which is supposed
to contain symbolic debugging information so values of local variable
may be displayed being missing:
>         acid: lstk()
>         <stdin>:2: (error) no stack frame: './acid' file does not exist

If I'm reading the following section of https://9p.io/sys/doc/comp.pdf right:
To make things simple, the default rules in the system mkfiles include
entries to make foo.acid from foo.c, so one may use mk to automate the
production of acid definitions for a given C source file.

You could descend into the directory that houses the source file that
fails to compile, e.g.:
../port/devcons.c

And see if there's a devcons.acid file there. It's supposed to be
generated by the following mkfile rule:
https://github.com/plan9foundation/plan9/blob/9db62717612a49f78a83b26ff5a176971c6cdd18/sys/src/9/port/portmkfile#L21C1-L22C48
%.acid: ../port/%.c
$CC $CFLAGS -a -I. ../port/$stem.c >$stem.acid

If there is, you could launch acid like you did above and run
include("sourcedirectory/devcons.acid");, so lstk() would print
something useful.

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T68f44cf88ca61ff3-Ma094ad5b7e862a4405a9547f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to