Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
#include <mono/utils/mono-threads.h>
#include <mono/utils/mono-proclib.h>
#include <mono/utils/w32api.h>
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-logger-internals.h>
#include <mono/utils/mono-proclib.h>

Expand Down Expand Up @@ -7614,6 +7615,26 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
}
break;
}
case CMD_VM_GET_SYSTEM_INFORMATION: {
int processor_architecture = CYCORDEBUG_PROCESSOR_ARCHITECTURE_UNKNOWN;
int page_size = mono_pagesize ();

#if defined(TARGET_AMD64)
processor_architecture = CYCORDEBUG_PROCESSOR_ARCHITECTURE_AMD64;
#elif defined(TARGET_X86)
processor_architecture = CYCORDEBUG_PROCESSOR_ARCHITECTURE_INTEL;
#elif defined(TARGET_ARM64)
processor_architecture = CYCORDEBUG_PROCESSOR_ARCHITECTURE_ARM64;
#elif defined(TARGET_ARM)
processor_architecture = CYCORDEBUG_PROCESSOR_ARCHITECTURE_ARM;
#elif defined(TARGET_WASM)
processor_architecture = CYCORDEBUG_PROCESSOR_ARCHITECTURE_AMD64;
Comment thread
thaystg marked this conversation as resolved.
#endif

buffer_add_int (buf, processor_architecture);
buffer_add_int (buf, page_size);
break;
}
case MDBGPROT_CMD_GET_ASSEMBLY_BYTES: { //only used by wasm
#ifdef HOST_WASM
char* assembly_name = m_dbgprot_decode_string (p, &p, end);
Expand Down
1 change: 1 addition & 0 deletions src/mono/mono/component/debugger-engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define CMD_VM_GET_TYPES MDBGPROT_CMD_VM_GET_TYPES
#define CMD_VM_START_BUFFERING MDBGPROT_CMD_VM_START_BUFFERING
#define CMD_VM_STOP_BUFFERING MDBGPROT_CMD_VM_STOP_BUFFERING
#define CMD_VM_GET_SYSTEM_INFORMATION MDBGPROT_CMD_VM_GET_SYSTEM_INFORMATION

#define CMD_APPDOMAIN_GET_ROOT_DOMAIN MDBGPROT_CMD_APPDOMAIN_GET_ROOT_DOMAIN
#define CMD_APPDOMAIN_GET_FRIENDLY_NAME MDBGPROT_CMD_APPDOMAIN_GET_FRIENDLY_NAME
Expand Down
15 changes: 13 additions & 2 deletions src/mono/mono/component/debugger-protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@
*/

#define MAJOR_VERSION 2
#define MINOR_VERSION 67
#define MINOR_VERSION 68

/*
* Processor architecture constants for GetSystemInformation command.
* These values must match PROCESSOR_ARCHITECTURE_* from winnt.h — do not change them.
*/
#define CYCORDEBUG_PROCESSOR_ARCHITECTURE_INTEL 0
#define CYCORDEBUG_PROCESSOR_ARCHITECTURE_ARM 5
#define CYCORDEBUG_PROCESSOR_ARCHITECTURE_AMD64 9
#define CYCORDEBUG_PROCESSOR_ARCHITECTURE_ARM64 12
#define CYCORDEBUG_PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF

typedef enum {
MDBGPROT_CMD_COMPOSITE = 100
Expand Down Expand Up @@ -40,7 +50,8 @@ typedef enum {
MDBGPROT_CMD_GET_ASSEMBLY_BYTES = 20, //wasm specific
MDBGPROT_CMD_GET_ENC_CAPABILITIES = 21,
MDBGPROT_CMD_VM_GET_OBJECT_ID_BY_ADDRESS = 22,
MDBGPROT_CMD_GET_INTERNAL_TYPE_CLASS = 23
MDBGPROT_CMD_GET_INTERNAL_TYPE_CLASS = 23,
Comment thread
thaystg marked this conversation as resolved.
MDBGPROT_CMD_VM_GET_SYSTEM_INFORMATION = 26
} MdbgProtCmdVM;

typedef enum {
Expand Down
Loading