return 0;
}
+int is_netcoredbg_supported(void) {
+
+ FILE *fp = fopen(NETCOREDBG_LOCATION, "r");
+ if (fp) {
+ size_t len;
+ ssize_t num;
+ char *line = NULL;
+
+ while ((num = getline(&line, &len, fp)) != -1) {
+ if (strstr(line, "NETCOREDBG") != NULL) {
+ snprintf(g_capabilities.netcoredbg_support, sizeof(g_capabilities.netcoredbg_support),
+ "%s", ENABLED);
+ free(line);
+ return 1;
+ }
+ free(line);
+ line = NULL;
+ }
+ fclose(fp);
+ }
+ return 0;
+}
+
int is_container_enabled(void) {
bool value;
int ret;
"%s", ENABLED);
}
+ // netcore debugger support
+ ret = is_netcoredbg_supported();
+ snprintf(g_capabilities.netcoredbg_support, sizeof(g_capabilities.netcoredbg_support),
+ "%s", ret == 1 ? ENABLED : DISABLED);
+
// Capability version
snprintf(g_capabilities.sdbd_cap_version, sizeof(g_capabilities.sdbd_cap_version),
"%d.%d", SDBD_CAP_VERSION_MAJOR, SDBD_CAP_VERSION_MINOR);
#define ENABLED "enabled"
#define DISABLED "disabled"
+#define NETCOREDBG_LOCATION "/usr/share/aul/dotnet.debugger"
#define CAPBUF_SIZE 4096
#define CAPBUF_ITEMSIZE 32
#define CAPBUF_L_ITEMSIZE 256
char sdk_toolpath[CAPBUF_L_ITEMSIZE]; // sdk tool path
char can_launch[CAPBUF_L_ITEMSIZE]; // target name
char device_name[CAPBUF_ITEMSIZE]; // device name
+ char netcoredbg_support[CAPBUF_ITEMSIZE]; // enabled or disabled
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
+ offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
+ "netcoredbg_support", g_capabilities.netcoredbg_support);
+
offset++; // for '\0' character
writex(fd, &offset, sizeof(uint16_t));