Kernel Debugger Packet Commands

The following table lists the kernel debugger packet commands:

┌────────────────────┬────────┬──────────────────────────────┬────────┬────────┐
│Command             │Code    │Description                   │CVK_    │CVK_    │
│                    │        │                              │CMDSIZE_│RETSIZE_│
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_RMEM        │ 1      │Read memory                   │18      │20      │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_RREG        │ 3      │Read registers                │18      │24 +    │
│                    │        │                              │        │sizeof( │
│                    │        │                              │        │RegSa_  │
│                    │        │                              │        │struc)  │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_WMEM        │ 4      │Write memory                  │20      │6       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_WREG        │ 6      │Write registers               │20 +    │2       │
│                    │        │                              │sizeof( │        │
│                    │        │                              │RegSa_  │        │
│                    │        │                              │struc)  │        │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_RUN         │ 7      │Resume execution              │6       │0       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_KILL        │ 8      │Reboot victim machine         │2       │0       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_STEP        │ 9      │Single step                   │2       │0       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_NUMTOBASE   │13      │Get object/segment information│14      │14      │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_LIBNAME     │16      │Get module information        │6       │6       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_RAW         │20      │Perform kernel debugger       │6       │        │
│                    │        │command                       │        │        │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_DBIT        │22      │Get selector information      │20      │        │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_RSTEP       │23      │Range step                    │10      │0       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_SCANMTE     │24      │Scan module table             │2       │6       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_SCANTCB     │25      │Scan thread control blocks    │6       │10      │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_SEL2LIN     │26      │Convert selector:offset to    │18      │6       │
│                    │        │linear address.               │        │        │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_LIN2SEL     │27      │Convert linear address to     │18      │12      │
│                    │        │selector:offset.              │        │        │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_OBJCOUNT    │28      │Get number of objects/segments│6       │6       │
│                    │        │in module                     │        │        │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_SCANOBJ     │29      │Scan object/segment table     │14      │10      │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_SELINFO     │30      │Get selector information      │18      │20      │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_RNPX        │31      │Read NPX state                │18      │128     │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_WNPX        │32      │Write NPX state               │128     │60      │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_ENA         │33      │Enable optional features      │6       │2       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_DIS         │34      │Disable optional features     │6       │2       │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_PIREG       │35      │Register for PAGEIN           │14      │2       │
│                    │        │notification                  │        │        │
├────────────────────┼────────┼──────────────────────────────┼────────┼────────┤
│CVK_CMD_PIDRG       │36      │Deregister for PAGEIN         │14      │2       │
│                    │        │notification                  │        │        │
└────────────────────┴────────┴──────────────────────────────┴────────┴────────┘

Each command is described below, along with the input parameters and the output values. Parameters are usually passed in a cvkcmd_s If a given field in the cvkcmd_s structure is not listed, its value is not used.

There are constants called CVK_CMDSIZE_xxx and CVK_RETSIZE_xxx which provide the size of the command and the size of the response from each command, where xxx is substituted with the last part of the command name. For CVK_CMD_PIDRG, the constants would be called CVK_CMDSIZE_PIDRG and CVK_RETSIZE_PIDRG. The values for these constants are provided in the last two rows of the table above.


[Back: CVK_RET_PAGEIN Events]
[Next: Read Memory (CVK_CMD_RMEM)]