9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 8l -e
@ 2014-05-27 20:10 Nick Owens
  2014-05-27 20:16 ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Owens @ 2014-05-27 20:10 UTC (permalink / raw)
  To: 9fans

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-08  2:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-27 20:10 [9fans] 8l -e Nick Owens
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

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).