9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Alexander Kapshuk <alexander.kapshuk@gmail.com>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] mk results in rc: suicide:
Date: Sat, 13 Jul 2024 11:14:49 +0300	[thread overview]
Message-ID: <CAJ1xhMVeP0Wr_xHWHMHo88ipJfApW4iLPXYunPcUvLrTPyQgHA@mail.gmail.com> (raw)
In-Reply-To: <497935C7-D055-421E-9FB5-F492727D1C91@germteig.com>

On Sat, Jul 13, 2024 at 10:13 AM Marco Feichtinger <marco@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	other threads:[~2024-07-13  8:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04 13:43 Marco Feichtinger
2024-07-04 14:27 ` Alexander Kapshuk
2024-07-04 15:19   ` wb.kloke
2024-07-04 18:44     ` Marco Feichtinger
2024-07-04 19:54       ` Dave Eckhardt
2024-07-04 19:57         ` Charles Forsyth
2024-07-05  1:32           ` ibrahim via 9fans
2024-07-05  1:47           ` ibrahim via 9fans
2024-07-07 14:15             ` Marco Feichtinger
2024-07-07 14:23               ` ori
2024-07-07 15:36                 ` Marco Feichtinger
2024-07-09 16:19                   ` Ori Bernstein
2024-07-13  7:11                     ` Marco Feichtinger
2024-07-13  8:14                       ` Alexander Kapshuk [this message]
2024-07-13 16:41                         ` Marco Feichtinger
2024-07-14  1:06                       ` ori
2024-07-14  2:40                         ` dlm-9fans
2024-07-16 17:12                         ` Marco Feichtinger
2024-07-07 16:22               ` Dave Eckhardt
2024-07-07 17:24                 ` wb.kloke
2024-07-07 18:23                   ` Marco Feichtinger
2024-07-09  9:09                     ` wb.kloke
2024-07-09 11:30                       ` Charles Forsyth
2024-07-07 18:23                 ` Marco Feichtinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ1xhMVeP0Wr_xHWHMHo88ipJfApW4iLPXYunPcUvLrTPyQgHA@mail.gmail.com \
    --to=alexander.kapshuk@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).