Project

General

Profile

Bug #1745

::nm fails after ::context switch to process

Added by Yakov Zaytsev almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2011-11-07
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

::nm is expected to resolve symbol table entries of the process after ::context

Instead the following happens (see below)

# mdb -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc apix scsi_vhci zfs sata sd ip hook neti sockfs arp usba stmf stmf_sbd fctl lofs random idm sppp smbsrv nfs ipc cpc fcip ufs logindmux ptm ]
> ::pgrep smbd
S    PID   PPID   PGID    SID    UID      FLAGS             ADDR NAME
R 100995      1 100995 100995      0 0x42000000 ffffff03038020d8 smbd
> ffffff03038020d8::print proc_t !grep door
   p_door_list = 0xffffff02f2e44110
> 0xffffff02f2e44110::list door_node_t
Usage: [address]::list type member [variable]
> 0xffffff02f2e44110::list door_node_t door_list
ffffff02f2e44110
ffffff02f2d5d1a8
ffffff02f2d634c8
> 0xffffff02f2e44110::list door_node_t door_list | ::print door_node_t door_pc
door_pc = 0x805b244
door_pc = 0x805ad14
door_pc = 0x80570d8
> 0x805b244::nm
Value              Size               Type  Bind  Other Shndx    Name
mdb: 805b244: no symbol corresponds to address
> ffffff03038020d8::context
debugger context set to proc ffffff03038020d8
> 0x805b244::nm
Value              Size               Type  Bind  Other Shndx    Name
mdb: 805b244: no symbol corresponds to address
>


On the other hand..
# mdb -p `pgrep smbd`
Loading modules: [ ld.so.1 libumem.so.1 libc.so.1 libuutil.so.1 libcmdutils.so.1 libnvpair.so.1 libavl.so.1 libtopo.so.1 ]
> 0x805b244::nm
Value      Size       Type  Bind  Other Shndx    Name
0x0805b244|0x000003b4|FUNC |LOCL |0x0  |14      |smbd_share_dispatch
>


PS
There are might be other gotchas lurking in here, see Re: [developer] ::nm fails after ::context switch to process?

Also available in: Atom PDF