Project

General

Profile

Actions

Feature #13576

closed

Add mdb ::linkerset command

Added by Jason King 9 months ago. Updated 9 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

With the addition of linker sets in #10851 (and their use in bhyve and likely other parts of the system), it would be useful to have an MDB dcmd to make examining them more ergonomic.

Currently, iterating the items in a linker set requires something similar to (from Joshua M. Clulow):

> __start_set_sysinit_set::array "struct sysinit" 0t19 | ::eval "*.::print struct sysinit" 
{
    func = vmm_stat_register
    data = VCPU_TOTAL_RUNTIME
}
{
    func = vmm_stat_register
    data = VCPU_NMI_COUNT
}
...

It would be far nicer for a dcmd that worked along the lines of:

 > ::linkerset
NAME               ITEMSIZE   ITEMCOUNT
sysinit_set        0x10       20
> ::linkerset sysinit_set
0xffffffffc018d0c0
0xffffffffc018d140
0xffffffffc018d1c0
0xffffffffc018fcc0
0xffffffffc018fd40
...
> ::linkerset sysinit_set | ::print struct sysinit
{
    func = vmm_stat_register
    data = VCPU_TOTAL_RUNTIME
}
{
    func = vmm_stat_register
    data = VCPU_NMI_COUNT
}
...

Files

test.tar (4.5 KB) test.tar Jason King, 2021-03-10 03:16 AM

Related issues

Related to illumos gate - Bug #13615: mdb has issues resolving some symbols in shared librariesNew

Actions
Actions

Also available in: Atom PDF