oxidecomputer / helios

Helios: Or, a Vision in a Dream. A Fragment.
Mozilla Public License 2.0
371 stars 10 forks source link

mdb punishes Helios users specifically #166

Open jclulow opened 4 months ago

jclulow commented 4 months ago

For some strange reason, ::help doesn't seem to do as much as one might reasonably expect on a Helios system...

This is what it looks like on an OmniOS r151046ac system:

 $ LANG=C LC_ALL=C mdb -e '::help dis'

NAME
  dis - disassemble near addr

SYNOPSIS
  [ addr ] ::dis [-abfw] [-n cnt] [addr]

DESCRIPTION
  Disassembles instructions starting at the final argument or the current
  value of dot. If the address is the start of a function, the entire
  function is disassembled, or else a window of instructions before and after
  the disassembled address are displayed.

OPTIONS
    -a         Print instruction addresses as numeric values instead of
               symbolic values.
    -b         Print instruction addresses as both numeric and symbolic values.
    -f         Read instructions from the target's object file instead of the
               target's virtual address space.
    -n instr   Display 'instr' instructions before and after the given address.
    -w         Force window behavior, even at the start of a function.

EXAMPLES
    ::dis
    clock::dis
    ::dis gethrtime
    set_freemem+0x16::dis -n 4

ATTRIBUTES

  Target: proc
  Module: mdb
  Interface Stability: Evolving

And on a Helios 2.0 system:

 $ LANG=C LC_ALL=C mdb -e '::help dis'

NAME
  dis - disassemble near addr

SYNOPSIS
  [ addr ] ::dis [-abfw] [-n cnt] [addr]

ATTRIBUTES

  Target: proc
  Module: mdb
  Interface Stability: Evolving
rmustacc commented 4 months ago

This is specific to the command. In particular, this isn't happening with ::typedef and the normal illumos source has no help message for ::dis. This is because illumos-omnios pulled in:

commit 6ae988a66abd6e53f1d2a0029e7022e49aeb23ea
Author: Jason King <jason.king@joyent.com>
Date:   Sun Jan 20 02:22:39 2019 +0000

    OS-7903 Document mdb(1) ::dis flags
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: John Levon <john.levon@joyent.com>

Which was not upstreamed to illumos.

pfmooney commented 4 months ago

Opened illumos#16681 for this.