Handles and kernel objects in zxdb

List all handles and VMOs (some of these “Virtual Memory Objects” can be mapped but won’t have open handles) with the handles command.

```none {:.devsite-disable-click-to-copy} [zxdb] handles Handle Type Koid ZX_OBJ_TYPE_VMO 30040 4166674259 ZX_OBJ_TYPE_TIMER 30158 4167722515 ZX_OBJ_TYPE_PORT 30157 4169819767 ZX_OBJ_TYPE_CHANNEL 30222

  1. You can look up more detailed information by handle value:
  2. ```none {:.devsite-disable-click-to-copy}
  3. [zxdb] handle 4166674259
  4. Handle 4166674259
  5. Type ZX_OBJ_TYPE_TIMER
  6. Koid 30158
  7. Rights ZX_RIGHT_SIGNAL
  8. ZX_RIGHT_WAIT
  9. ZX_RIGHT_INSPECT

Or you can look up an object by koid. Koid lookup will only search the objects in the debugged process and won’t match arbitrary kernel objects owned by other processes. Koid lookup is the only way to show detailed information for mapped VMOs that have no open handles.

```none {:.devsite-disable-click-to-copy} [zxdb] handle -k 30108 Handle Type ZX_OBJ_TYPE_VMO Koid 30108 Rights ZX_RIGHT_NONE Name data0:blob-60 VMO size in bytes 4096 Parent koid 30105

  1. # children 0
  2. # mappings 1
  3. Share count 1
  4. Flags ZX_INFO_VMO_TYPE_PAGED
  5. ZX_INFO_VMO_VIA_MAPPING
  6. Committed bytes 4096
  7. Cache policy ZX_CACHE_POLICY_CACHED
  8. Metadata bytes 176

Committed change events 0 ```