#define DEBUGGER_INFO_PATH "/usr/share/aul"
-static int debug_initialized;
-static GList *debugger_info_list;
-static debugger_info_h debugger_info;
-static GList *debug_argv_list;
-static GList *extra_argv_list;
+static int __debug_initialized;
+static GList *__debugger_info_list;
+static debugger_info_h __debugger_info;
+static GList *__debug_argv_list;
+static GList *__extra_argv_list;
int _debug_create_extra_argv(int *argc, char ***argv)
{
return -1;
}
- if (debugger_info == NULL)
+ if (__debugger_info == NULL)
return 0;
- new_argc = g_list_length(extra_argv_list);
+ new_argc = g_list_length(__extra_argv_list);
if (new_argc == 0)
return 0;
}
i = LOADER_ARG_PATH;
- iter = g_list_first(extra_argv_list);
+ iter = g_list_first(__extra_argv_list);
while (iter) {
extra_argv = (const char *)iter->data;
if (extra_argv)
return -1;
}
- if (debugger_info == NULL)
+ if (__debugger_info == NULL)
return 0;
- exe = _debugger_info_get_exe(debugger_info);
+ exe = _debugger_info_get_exe(__debugger_info);
if (exe == NULL)
return 0;
- attach_str = _debugger_info_get_attach(debugger_info);
+ attach_str = _debugger_info_get_attach(__debugger_info);
if (attach_str && strcasecmp(attach_str, "true") == 0) {
*attach = true;
new_argc++;
}
- list = _debugger_info_get_default_opt_list(debugger_info);
- new_argc += g_list_length(debug_argv_list) + g_list_length(list) + 1;
+ list = _debugger_info_get_default_opt_list(__debugger_info);
+ new_argc += g_list_length(__debug_argv_list) + g_list_length(list) + 1;
new_argv = (char **)calloc(new_argc, sizeof(char *));
if (new_argv == NULL) {
_E("out of memory");
iter = g_list_next(iter);
}
- iter = g_list_first(debug_argv_list);
+ iter = g_list_first(__debug_argv_list);
while (iter) {
debug_argv = (const char *)iter->data;
if (debug_argv)
if (str_arr[i] == NULL)
break;
- extra_argv_list = g_list_append(extra_argv_list,
+ __extra_argv_list = g_list_append(__extra_argv_list,
strdup(str_arr[i]));
}
if (str_arr[i] == NULL)
break;
- debug_argv_list = g_list_append(debug_argv_list,
+ __debug_argv_list = g_list_append(__debug_argv_list,
strdup(str_arr[i]));
}
_E("[DEBUG] Failed to redirect standard fds");
_D("[DEBUG] debugger: %s", debugger);
- debugger_info = _debugger_info_find(debugger_info_list, debugger);
- if (debugger_info == NULL)
+ __debugger_info = _debugger_info_find(__debugger_info_list, debugger);
+ if (__debugger_info == NULL)
return;
- list = _debugger_info_get_unlink_list(debugger_info);
+ list = _debugger_info_get_unlink_list(__debugger_info);
g_list_foreach(list, __remove_file, NULL);
- list = _debugger_info_get_extra_env_list(debugger_info);
+ list = _debugger_info_get_extra_env_list(__debugger_info);
g_list_foreach(list, __set_debug_env, kb);
- list = _debugger_info_get_extra_key_list(debugger_info);
+ list = _debugger_info_get_extra_key_list(__debugger_info);
g_list_foreach(list, __add_debug_argv, kb);
- list = _debugger_info_get_last_extra_key_list(debugger_info);
+ list = _debugger_info_get_last_extra_key_list(__debugger_info);
g_list_foreach(list, __add_extra_argv, kb);
}
int _debug_init(void)
{
- if (debug_initialized)
+ if (__debug_initialized)
return 0;
- debugger_info_list = _debugger_info_load(DEBUGGER_INFO_PATH);
- if (debugger_info_list == NULL)
+ __debugger_info_list = _debugger_info_load(DEBUGGER_INFO_PATH);
+ if (__debugger_info_list == NULL)
return -1;
- debug_initialized = 1;
+ __debug_initialized = 1;
return 0;
}
void _debug_fini(void)
{
- if (!debug_initialized)
+ if (!__debug_initialized)
return;
- _debugger_info_unload(debugger_info_list);
+ _debugger_info_unload(__debugger_info_list);
}