Project

General

Profile

Actions

Bug #11521

closed

::whereopen should be usable in a pipeline

Added by Rich Lowe about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
mdb - modular debugger
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

At present ::whereopen prints some extra data, that means it can't be used in a pipeline. It should not print the 'file' part if piped.

Actions #1

Updated by Robert Mustacchi almost 4 years ago

  • Assignee set to Robert Mustacchi
  • % Done changed from 0 to 90
Actions #2

Updated by Robert Mustacchi almost 4 years ago

To test this, I did two things. First I did a ::whereopen on the vnode corresponding to /dev/null. I did this with the old and new version of the dmod and made sure that we had identical results. Next, I manually piped it to something like:

rm@turin:/ws/rm/terminfo/usr/src/cmd/mdb/intel$ pfexec ./amd64/mdb/mdb  -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc apix scsi_vhci zfs ip hook neti sockfs arp usba xhci stmf stmf_sbd mm lofs random sd ptm nfs ]
> ::unload genunix
> ::load amd64/genunix/dmod/genunix.so> fffffe064dbba280::print vnode_t v_path
v_path = 0xfffffe064dad8778 "/devices/pseudo/mm@0:null" 
> fffffe064dbba280::whereopen | ::ps
S PID    PPID   PGID   SID    UID    FLAGS      ADDR             NAME
R 544    1      543    543    0      0x42000000 fffffe0652f63058 in.routed
R 460    1      460    460    0      0x42000000 fffffe0652053028 fmd
R 509    1      506    506    0      0x4a004000 fffffe0652055038 perl
R 468    1      468    468    0      0x42010000 fffffe0652f62050 ntpd
R 462    1      462    462    0      0x42000000 fffffe0652f61048 inetd
R 453    1      453    453    1      0x42000000 fffffe0651e80040 rpcbind
R 414    1      413    413    0      0x42010000 fffffe0652057048 sshd
R 567    414    413    413    0      0x5a004000 fffffe0651e83058 sshd
R 569    567    413    413    100    0x52010000 fffffe064e0c5018 sshd
R 559    414    413    413    0      0x5a004000 fffffe064f61f018 sshd
R 561    559    413    413    100    0x52010000 fffffe0652f60040 sshd
R 406    1      406    406    0      0x42010000 fffffe0652054030 cron
R 357    1      357    357    0      0x42000000 fffffe0652059058 utmpd
R 236    1      236    236    0      0x42000000 fffffe0651e81048 hald
R 237    236    236    236    0      0x4a004000 fffffe064f622030 hald-runner
R 553    237    236    236    0      0x4a004000 fffffe064f626050 hald-addon-stora
R 322    237    236    236    0      0x4a004000 fffffe0651e7c020 hald-addon-stora
R 290    237    236    236    0      0x4a004000 fffffe064e0c9038 hald-addon-acpi
R 277    237    236    236    0      0x4a004000 fffffe065205a060 hald-addon-cpufr
R 274    237    236    236    0      0x4a004000 fffffe0651e82050 hald-addon-netwo
R 252    1      252    252    0      0x42000000 fffffe0651e7d028 nscd
R 232    1      232    232    0      0x42000000 fffffe064f620020 picld
R 197    1      197    197    0      0x42000000 fffffe064e0ca040 dbus-daemon
R 176    1      176    176    0      0x42000000 fffffe064f621028 devfsadm
R 163    1      163    163    0      0x42000000 fffffe064e0c4010 syseventd
R 130    1      129    129    0      0x42000000 fffffe064f624040 pfexecd
R 55     1      54     54     17     0x42020000 fffffe064e0c8030 netcfgd
R 9      1      9      9      0      0x42000000 fffffe064ae22010 svc.startd
R 398    9      398    398    0      0x4a014000 fffffe064e0c7028 sac
Actions #3

Updated by Electric Monk almost 4 years ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit 1a2641f606f3bfa50cdbbe8770af78116de52563

commit  1a2641f606f3bfa50cdbbe8770af78116de52563
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2019-10-29T18:15:07.000Z

    11521 ::whereopen should be usable in a pipeline
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF