9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Nick Owens <mischief@9.offblast.org>
To: 9fans@9fans.net
Subject: [9fans] 8l -e
Date: Tue, 27 May 2014 13:10:16 -0700	[thread overview]
Message-ID: <20140527201016.GP3763@iota.offblast.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]

i was trying to use 8l's '-e' flag today, when i found some
interesting problems.

first, -e doesn't do what it says unless you pass -p, which goes
unmentioned in the manual page. (luckily i read the source).

second, and more importantly, the calls to _tracein/_traceout are
skipped, as in the following disassembly, but i can't determine why. is
there some tool (besides noping with acid) meant to be used to 'turn on'
the tracing calls?

third, when you use -e with -p, prof.$pid files are generated as with
-p, but the prof files are empty. this seems unintentional.

this example is using rc.

; 8l -p -e -o 8.out code.8 exec.8 getflags.8 glob.8 here.8 io.8 lex.8
pcmd.8 pfnc.8 simple.8 subr.8 trap.8 tree.8 var.8 havefork.8 plan9.8
y.tab.8
; acid 8.out
8.out:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: asm(setvar)
setvar 0x0000adbb   JMP	setvar+0x7(SB)
setvar+0x2 0x0000adbd	CALL	_tracein(SB)
setvar+0x7 0x0000adc2	SUBL	$0x10,SP
setvar+0xa 0x0000adc5	MOVL	name+0x0(FP),CX
setvar+0xe 0x0000adc9	MOVL	CX,0x0(SP)
setvar+0x11 0x0000adcc	CALL	vlook(SB)
setvar+0x16 0x0000add1	MOVL	AX,v+0xc(SP)
setvar+0x1a 0x0000add5	MOVL	0x4(AX),AX
setvar+0x1d 0x0000add8	MOVL	AX,0x0(SP)
setvar+0x20 0x0000addb	CALL	freewords(SB)
setvar+0x25 0x0000ade0	MOVL	v+0xc(SP),DX
setvar+0x29 0x0000ade4	MOVL	val+0x4(FP),CX
setvar+0x2d 0x0000ade8	MOVL	CX,0x4(DX)
setvar+0x30 0x0000adeb	MOVL	$0x1,0x8(DX)
setvar+0x37 0x0000adf2	ADDL	$0x10,SP
setvar+0x3a 0x0000adf5	RET
setvar+0x3b 0x0000adf6	CALL	_traceout(SB)
setvar+0x40 0x0000adfb	RET
Xasync 0x0000adfc   JMP	Xasync+0x7(SB)
acid: 

you can see there is a JMP over _tracein and a RET before _traceout.
what gives?


[-- Attachment #2: Type: application/pgp-signature, Size: 851 bytes --]

             reply	other threads:[~2014-05-27 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 20:10 Nick Owens [this message]
2014-05-27 20:16 ` erik quanstrom
2014-05-27 21:30   ` Nick Owens
2014-05-27 21:33     ` erik quanstrom
2015-07-08  2:43       ` michaelian ennis
2015-07-08  2:44         ` michaelian ennis

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=20140527201016.GP3763@iota.offblast.org \
    --to=mischief@9.offblast.org \
    --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).