Print this page
11689 ::refstr would be useful
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Jason King <jason.king@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/common/modules/genunix/genunix.c
          +++ new/usr/src/cmd/mdb/common/modules/genunix/genunix.c
↓ open down ↓ 4074 lines elided ↑ open up ↑
4075 4075              "::time will return the timestamp at which we dropped into, \n"
4076 4076              "if called from, kmdb(1); the core dump's high resolution \n"
4077 4077              "time if inspecting one; or the running hires time if we're \n"
4078 4078              "looking at a live system.\n\n"
4079 4079              "Switches:\n"
4080 4080              "  -d   report times in decimal\n"
4081 4081              "  -l   prints the number of clock ticks since system boot\n"
4082 4082              "  -x   report times in hexadecimal\n");
4083 4083  }
4084 4084  
     4085 +extern int cmd_refstr(uintptr_t, uint_t, int, const mdb_arg_t *);
     4086 +
4085 4087  static const mdb_dcmd_t dcmds[] = {
4086 4088  
4087 4089          /* from genunix.c */
4088 4090          { "as2proc", ":", "convert as to proc_t address", as2proc },
4089 4091          { "binding_hash_entry", ":", "print driver names hash table entry",
4090 4092                  binding_hash_entry },
4091 4093          { "callout", "?[-r|n] [-s|l] [-xhB] [-t | -ab nsec [-dkD]]"
4092 4094              " [-C addr | -S seqid] [-f name|addr] [-p name| addr] [-T|L [-E]]"
4093 4095              " [-FivVA]",
4094 4096              "display callouts", callout, callout_help },
↓ open down ↓ 10 lines elided ↑ open up ↑
4105 4107          { "ndi_event_hdl", "?", "print ndi_event_hdl", ndi_event_hdl },
4106 4108          { "panicinfo", NULL, "print panic information", panicinfo },
4107 4109          { "pid2proc", "?", "convert PID to proc_t address", pid2proc },
4108 4110          { "project", NULL, "display kernel project(s)", project },
4109 4111          { "ps", "[-fltzTP]", "list processes (and associated thr,lwp)", ps,
4110 4112              ps_help },
4111 4113          { "pflags", NULL, "display various proc_t flags", pflags },
4112 4114          { "pgrep", "[-x] [-n | -o] pattern",
4113 4115                  "pattern match against all processes", pgrep },
4114 4116          { "ptree", NULL, "print process tree", ptree },
     4117 +        { "refstr", NULL, "print string from a refstr_t", cmd_refstr, NULL },
4115 4118          { "sysevent", "?[-sv]", "print sysevent pending or sent queue",
4116 4119                  sysevent},
4117 4120          { "sysevent_channel", "?", "print sysevent channel database",
4118 4121                  sysevent_channel},
4119 4122          { "sysevent_class_list", ":", "print sysevent class list",
4120 4123                  sysevent_class_list},
4121 4124          { "sysevent_subclass_list", ":",
4122 4125                  "print sysevent subclass list", sysevent_subclass_list},
4123 4126          { "system", NULL, "print contents of /etc/system file", sysfile },
4124 4127          { "task", NULL, "display kernel task(s)", task },
↓ open down ↓ 757 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX