return 0;
}
+const char* get_platfrom_architecture(void) {
+ void* void_pointer;
+ D("void pointer size: %zu", sizeof(void_pointer));
+ // in 32 bit sizeof void* is 4 and in 64 bit its 8
+ if((int)(sizeof(void_pointer)) == 4)
+ return BIT32;
+ if((int)(sizeof(void_pointer)) == 8)
+ return BIT64;
+ return UNKNOWN;
+}
+
int is_container_enabled(void) {
bool value;
int ret;
snprintf(g_capabilities.netcoredbg_support, sizeof(g_capabilities.netcoredbg_support),
"%s", ret == 1 ? ENABLED : DISABLED);
+ // architecture support
+ snprintf(g_capabilities.architecture, sizeof(g_capabilities.architecture),
+ "%s", get_platfrom_architecture());
+
// Capability version
snprintf(g_capabilities.sdbd_cap_version, sizeof(g_capabilities.sdbd_cap_version),
"%d.%d", SDBD_CAP_VERSION_MAJOR, SDBD_CAP_VERSION_MINOR);
return 0;
}
return -1;
-}
\ No newline at end of file
+}
adisconnect disconnect;
};
+#define BIT32 "32"
+#define BIT64 "64"
#define UNKNOWN "unknown"
#define INFOBUF_MAXLEN 64
#define INFO_VERSION "2.2.0"
char can_launch[CAPBUF_L_ITEMSIZE]; // target name
char device_name[CAPBUF_ITEMSIZE]; // device name
char netcoredbg_support[CAPBUF_ITEMSIZE]; // enabled or disabled
+ char architecture[CAPBUF_ITEMSIZE]; // 32 or 64
char platform_version[CAPBUF_ITEMSIZE]; // platform version (ex. 2.3.0)
char product_version[CAPBUF_ITEMSIZE]; // product version (ex. 1.0)
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
"pkgcmd_debugmode", g_capabilities.pkgcmd_debugmode);
- // pkgcmd debug mode support
+ // netcore bebugger support
offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
"netcoredbg_support", g_capabilities.netcoredbg_support);
+ // netcore bebugger support
+ offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
+ "architecture", g_capabilities.architecture);
offset++; // for '\0' character
writex(fd, &offset, sizeof(uint16_t));