Page tree
Skip to end of metadata
Go to start of metadata

API/Protocol

The protocol is token-based, with the following tokens:

#define CVMDEBUGGER_FIELD_BYTE_INTEGER             'i'
#define CVMDEBUGGER_FIELD_BYTE_STRING              's'
#define CVMDEBUGGER_FIELD_BYTE_ENDOFMESSAGE        'e'
//-----------------------------------------------------------------------------
#define CVMDEBUGGER_MAJOR_BYTE_FROM_INTERFACE      'D'
#define CVMDEBUGGER_MAJOR_BYTE_TO_INTERFACE        'G'
//-----------------------------------------------------------------------------
#define CVMDEBUGGER_MINOR_BYTE_FULL_WINDOW           '0'
#define CVMDEBUGGER_COMMAND_FROM_INTERFACE_SHUTDOWN           'X'
//-----------------------------------------------------------------------------
#define CVMDEBUGGER_MINOR_BYTE_CODE_WINDOW           '1'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_CLEAR_SCRIPT         'C'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_LINE_OF_SCRIPT       'L'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_DEBUGGER_FOCUS       'D'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_KEYWORD_TO_HIGHLIGHT 'K'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_NO_REDRAW            'N'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_RESUME_REDRAW        'U'
//-----------------------------------------------------------------------------
#define CVMDEBUGGER_MINOR_BYTE_CALLSTACK_WINDOW      '2'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_CLEAR_CALL_STACK        'C'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_LINE_OF_CALL_STACK      'L'
#define CVMDEBUGGER_COMMAND_FROM_INTERFACE_FOCUS_LINE_CALL_STACK 'F'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_CAPTION_CALL_STACK      'T'
//-----------------------------------------------------------------------------
#define CVMDEBUGGER_MINOR_BYTE_WATCH_WINDOW          '3'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_CLEAR_WATCH_WINDOW         'C'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_LINE_WATCH_WINDOW          'L'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_FOCUS_LINE_WATCH_WINDOW    'S'
#define CVMDEBUGGER_COMMAND_FROM_INTERFACE_TOGGLE_LINE_WATCH_WINDOW 'F'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_CAPTION_WATCH_WINDOW       'T'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_CAPTION_OBJECTS            'O'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_CAPTION_VALUES             'V'
//-----------------------------------------------------------------------------
#define CVMDEBUGGER_MINOR_BYTE_BUTTON_PANEL          '4'
#define CVMDEBUGGER_COMMAND_FROM_INTERFACE_BUTTON_EXIT         '1'
#define CVMDEBUGGER_COMMAND_FROM_INTERFACE_BUTTON_STEP_INTO    '2'
#define CVMDEBUGGER_COMMAND_FROM_INTERFACE_BUTTON_STEP_OVER    '3'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_BUTTON_EXIT_TEXT      'E'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_BUTTON_STEP_INTO_TEXT 'I'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_BUTTON_STEP_OVER_TEXT 'O'
#define CVMDEBUGGER_COMMAND_TO_INTERFACE_BUTTON_GO_TO_BREAK    'G'


Integers are always 32bit in network order.

Strings are 32bit-network order size prefixed.  (\x02\x00\x00\x00hi)

Example commands as sent by the debugger UI to the game:

D2Li\x05\x00\x00\x00e → Display the current display location at callstack entry/line 5. (The hex encoding needs to be sent as binary on the wire).

  • No labels