2015-11-01 01:38:51 -08:00
|
|
|
#ifndef EFL_BETA_API_SUPPORT
|
|
|
|
#define EFL_BETA_API_SUPPORT
|
|
|
|
#endif
|
|
|
|
#ifndef EFL_EO_API_SUPPORT
|
|
|
|
#define EFL_EO_API_SUPPORT
|
|
|
|
#endif
|
|
|
|
#ifndef ELM_INTERNAL_API_ARGESFSDFEFC
|
|
|
|
#define ELM_INTERNAL_API_ARGESFSDFEFC
|
|
|
|
#endif
|
|
|
|
#include <Elementary.h>
|
|
|
|
#include <Evas.h>
|
|
|
|
#include "gui.h"
|
|
|
|
|
|
|
|
# ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
# endif
|
|
|
|
|
|
|
|
#define EXTRACT(_buf, pval, sz) \
|
|
|
|
{ \
|
|
|
|
memcpy(pval, _buf, sz); \
|
|
|
|
_buf += sz; \
|
|
|
|
}
|
|
|
|
|
|
|
|
static uint32_t _cl_stat_reg_opcode = EINA_DEBUG_OPCODE_INVALID;
|
|
|
|
static uint32_t _cid_from_pid_opcode = EINA_DEBUG_OPCODE_INVALID;
|
|
|
|
static uint32_t _poll_on_opcode = EINA_DEBUG_OPCODE_INVALID;
|
|
|
|
static uint32_t _poll_off_opcode = EINA_DEBUG_OPCODE_INVALID;
|
|
|
|
static uint32_t _evlog_on_opcode = EINA_DEBUG_OPCODE_INVALID;
|
|
|
|
static uint32_t _evlog_off_opcode = EINA_DEBUG_OPCODE_INVALID;
|
|
|
|
static uint32_t _eo_list_opcode = EINA_DEBUG_OPCODE_INVALID;
|
2015-11-02 04:12:08 -08:00
|
|
|
static uint32_t _elm_list_opcode = EINA_DEBUG_OPCODE_INVALID;
|
|
|
|
|
2015-11-01 01:38:51 -08:00
|
|
|
static Gui_Widgets *pub_widgets = NULL;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint32_t *opcode; /* address to the opcode */
|
|
|
|
void *buffer;
|
|
|
|
int size;
|
|
|
|
} _pending_request;
|
|
|
|
|
2015-11-03 04:25:20 -08:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
Obj_Info *info;
|
|
|
|
Eina_List *children;
|
|
|
|
} _Obj_info_node;
|
|
|
|
|
2015-11-01 01:38:51 -08:00
|
|
|
static Eina_List *_pending = NULL;
|
|
|
|
static Eina_Debug_Session *_session = NULL;
|
|
|
|
|
|
|
|
static uint32_t _cid = 0;
|
|
|
|
|
|
|
|
static int my_argc = 0;
|
|
|
|
static char **my_argv = NULL;
|
2015-11-03 04:25:20 -08:00
|
|
|
static int _selected_app = -1;
|
|
|
|
static Elm_Genlist_Item_Class *_objs_itc = NULL;
|
|
|
|
static Eina_List *_objs_info_tree = NULL;
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_objs_expand_request_cb(void *data EINA_UNUSED,
|
|
|
|
Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
|
|
|
|
void *event_info)
|
|
|
|
{
|
|
|
|
Elm_Object_Item *glit = event_info;
|
|
|
|
elm_genlist_item_expanded_set(glit, EINA_TRUE);
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_objs_contract_request_cb(void *data EINA_UNUSED,
|
|
|
|
Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
|
|
|
|
void *event_info)
|
|
|
|
{
|
|
|
|
Elm_Object_Item *glit = event_info;
|
|
|
|
elm_genlist_item_expanded_set(glit, EINA_FALSE);
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_objs_expanded_cb(void *data EINA_UNUSED,
|
|
|
|
Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
|
|
|
|
void *event_info)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Elm_Object_Item *glit = event_info;
|
|
|
|
_Obj_info_node *info_node = elm_object_item_data_get(glit), *it_data;
|
|
|
|
Evas_Object *list = elm_object_item_widget_get(glit);
|
|
|
|
EINA_LIST_FOREACH(info_node->children, l, it_data)
|
|
|
|
{
|
|
|
|
Elm_Object_Item *nitem;
|
|
|
|
Elm_Genlist_Item_Type type = ELM_GENLIST_ITEM_NONE;
|
|
|
|
|
|
|
|
if (it_data->children)
|
|
|
|
{
|
|
|
|
type = ELM_GENLIST_ITEM_TREE;
|
|
|
|
}
|
|
|
|
|
|
|
|
nitem = elm_genlist_item_append(list, _objs_itc, it_data, glit,
|
|
|
|
type, NULL, NULL);
|
|
|
|
elm_genlist_item_expanded_set(nitem, EINA_FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_objs_contracted_cb(void *data EINA_UNUSED,
|
|
|
|
Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
|
|
|
|
void *event_info)
|
|
|
|
{
|
|
|
|
Elm_Object_Item *glit = event_info;
|
|
|
|
elm_genlist_item_subitems_clear(glit);
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
2015-11-02 06:43:23 -08:00
|
|
|
|
|
|
|
static char *
|
2015-11-03 04:25:20 -08:00
|
|
|
_objs_item_label_get(void *data, Evas_Object *obj EINA_UNUSED,
|
|
|
|
const char *part EINA_UNUSED)
|
|
|
|
{
|
|
|
|
_Obj_info_node *info_node = data;
|
|
|
|
return (char *)(long)strdup(info_node->info->kl_name);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_objs_nodes_free(Eina_List *parents)
|
2015-11-02 06:43:23 -08:00
|
|
|
{
|
2015-11-03 04:25:20 -08:00
|
|
|
_Obj_info_node *info_node;
|
|
|
|
|
|
|
|
EINA_LIST_FREE(parents, info_node)
|
|
|
|
{
|
|
|
|
free(info_node->info);
|
|
|
|
_objs_nodes_free(info_node->children);
|
|
|
|
free(info_node);
|
|
|
|
}
|
2015-11-02 06:43:23 -08:00
|
|
|
}
|
2015-11-02 04:44:33 -08:00
|
|
|
|
|
|
|
static void
|
|
|
|
_hoversel_selected_app(void *data, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
|
|
|
Elm_Object_Item *hoversel_it = event_info;
|
2015-11-03 04:25:20 -08:00
|
|
|
_selected_app = (int)(long)elm_object_item_data_get(hoversel_it);
|
|
|
|
printf("selected app %d\n", _selected_app);
|
2015-11-02 06:43:23 -08:00
|
|
|
|
2015-11-03 04:25:20 -08:00
|
|
|
if(_objs_info_tree)
|
2015-11-02 06:43:23 -08:00
|
|
|
{
|
2015-11-03 04:25:20 -08:00
|
|
|
_objs_nodes_free(_objs_info_tree);
|
|
|
|
_objs_info_tree = NULL;
|
2015-11-02 06:43:23 -08:00
|
|
|
elm_genlist_clear(pub_widgets->elm_win1->elm_genlist1);
|
|
|
|
}
|
|
|
|
|
2015-11-03 04:25:20 -08:00
|
|
|
Eina_Debug_Client *cl = eina_debug_client_new(_session, _selected_app);
|
2015-11-02 06:43:23 -08:00
|
|
|
eina_debug_session_send(cl, _elm_list_opcode, NULL, 0);
|
|
|
|
eina_debug_client_free(cl);
|
2015-11-02 04:44:33 -08:00
|
|
|
}
|
2015-11-01 01:38:51 -08:00
|
|
|
|
|
|
|
static void
|
|
|
|
_consume()
|
|
|
|
{
|
|
|
|
if (!_pending)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
_pending_request *req = eina_list_data_get(_pending);
|
|
|
|
_pending = eina_list_remove(_pending, req);
|
|
|
|
|
|
|
|
Eina_Debug_Client *cl = eina_debug_client_new(_session, _cid);
|
|
|
|
eina_debug_session_send(cl, *(req->opcode), req->buffer, req->size);
|
|
|
|
eina_debug_client_free(cl);
|
|
|
|
|
|
|
|
free(req->buffer);
|
|
|
|
free(req);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_pending_add(uint32_t *opcode, void *buffer, int size)
|
|
|
|
{
|
|
|
|
_pending_request *req = malloc(sizeof(*req));
|
|
|
|
req->opcode = opcode;
|
|
|
|
req->buffer = buffer;
|
|
|
|
req->size = size;
|
|
|
|
_pending = eina_list_append(_pending, req);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_cid_get_cb(Eina_Debug_Client *src EINA_UNUSED, void *buffer, int size EINA_UNUSED)
|
|
|
|
{
|
|
|
|
_cid = *(uint32_t *)buffer;
|
|
|
|
_consume();
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_clients_info_cb(Eina_Debug_Client *src EINA_UNUSED, void *buffer, int size)
|
|
|
|
{
|
|
|
|
char *buf = buffer;
|
|
|
|
while(size)
|
|
|
|
{
|
|
|
|
int cid, pid, len;
|
|
|
|
EXTRACT(buf, &cid, sizeof(uint32_t));
|
|
|
|
EXTRACT(buf, &pid, sizeof(uint32_t));
|
|
|
|
if(pid != getpid())
|
|
|
|
{
|
|
|
|
printf("CID: %d - PID: %d - Name: %s\n", cid, pid, buf);
|
|
|
|
char option[100];
|
|
|
|
snprintf(option, 90, "CID: %d - PID: %d - Name: %s", cid, pid, buf);
|
|
|
|
printf("%s\n", option);
|
2015-11-02 04:44:33 -08:00
|
|
|
elm_hoversel_item_add(pub_widgets->elm_win1->elm_hoversel1, option, "home", ELM_ICON_STANDARD, _hoversel_selected_app,
|
2015-11-01 01:38:51 -08:00
|
|
|
(const void *)(long)cid);
|
|
|
|
}
|
|
|
|
len = strlen(buf) + 1;
|
|
|
|
buf += len;
|
|
|
|
size -= (2 * sizeof(uint32_t) + len);
|
|
|
|
}
|
|
|
|
_consume();
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_clients_info_deleted_cb(Eina_Debug_Client *src EINA_UNUSED, void *buffer, int size)
|
|
|
|
{
|
|
|
|
char *buf = buffer;
|
|
|
|
if(size >= (int)sizeof(uint32_t))
|
|
|
|
{
|
|
|
|
int cid;
|
|
|
|
EXTRACT(buf, &cid, sizeof(uint32_t));
|
|
|
|
printf("CID: %d deleted\n", cid);
|
|
|
|
|
|
|
|
const Eina_List *items = elm_hoversel_items_get(pub_widgets->elm_win1->elm_hoversel1);
|
|
|
|
const Eina_List *l;
|
|
|
|
Elm_Object_Item *hoversel_it;
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(items, l, hoversel_it)
|
|
|
|
if((int)(long)elm_object_item_data_get(hoversel_it) == cid)
|
|
|
|
{
|
|
|
|
elm_object_item_del(hoversel_it);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_consume();
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_objects_list_cb(Eina_Debug_Client *src EINA_UNUSED, void *buffer, int size)
|
|
|
|
{
|
|
|
|
Eina_List *objs = eo_debug_list_response_decode(buffer, size), *itr;
|
|
|
|
Obj_Info *info;
|
|
|
|
EINA_LIST_FOREACH(objs, itr, info)
|
|
|
|
{
|
|
|
|
printf("%p: %s\n", info->ptr, info->kl_name);
|
|
|
|
}
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
2015-11-02 04:12:08 -08:00
|
|
|
static Eina_Bool
|
|
|
|
_elm_objects_list_cb(Eina_Debug_Client *src EINA_UNUSED, void *buffer, int size)
|
|
|
|
{
|
2015-11-03 04:25:20 -08:00
|
|
|
Eina_List *objs = eo_debug_list_response_decode(buffer, size);
|
2015-11-02 04:12:08 -08:00
|
|
|
Obj_Info *info;
|
2015-11-03 04:25:20 -08:00
|
|
|
|
|
|
|
Eina_Hash *objects_hash = NULL;
|
|
|
|
Eina_List *l = NULL;
|
|
|
|
objects_hash = eina_hash_pointer_new(NULL);
|
|
|
|
_Obj_info_node *info_node;
|
|
|
|
|
|
|
|
/* Add all objects to hash table */
|
|
|
|
EINA_LIST_FOREACH(objs, l, info)
|
2015-11-02 04:12:08 -08:00
|
|
|
{
|
2015-11-03 04:25:20 -08:00
|
|
|
info_node = calloc(1, sizeof(_Obj_info_node));
|
|
|
|
info_node->info = info;
|
|
|
|
info_node->children = NULL;
|
|
|
|
eina_hash_add(objects_hash, &(info_node->info->ptr),
|
|
|
|
info_node);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Fill children lists */
|
|
|
|
EINA_LIST_FOREACH(objs, l, info)
|
|
|
|
{
|
|
|
|
_Obj_info_node *info_parent = eina_hash_find(objects_hash, &(info->parent));
|
|
|
|
_Obj_info_node *info_node = eina_hash_find(objects_hash, &(info->ptr));
|
|
|
|
|
|
|
|
if(info_parent)
|
|
|
|
info_parent->children = eina_list_append(info_parent->children, info_node);
|
|
|
|
else
|
|
|
|
_objs_info_tree = eina_list_append(_objs_info_tree, info_node);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Add to Genlist */
|
|
|
|
EINA_LIST_FOREACH(_objs_info_tree, l, info_node)
|
|
|
|
{
|
|
|
|
Elm_Genlist_Item_Type type = ELM_GENLIST_ITEM_NONE;
|
2015-11-02 06:43:23 -08:00
|
|
|
|
2015-11-03 04:25:20 -08:00
|
|
|
if (info_node->children)
|
|
|
|
{
|
|
|
|
type = ELM_GENLIST_ITEM_TREE;
|
|
|
|
}
|
|
|
|
Elm_Object_Item *glg = elm_genlist_item_append(
|
|
|
|
pub_widgets->elm_win1->elm_genlist1, _objs_itc,
|
|
|
|
(void *)info_node, NULL,
|
|
|
|
type,
|
2015-11-02 06:43:23 -08:00
|
|
|
NULL, NULL);
|
2015-11-03 04:25:20 -08:00
|
|
|
if (info_node->children)
|
|
|
|
elm_genlist_item_expanded_set(glg, EINA_FALSE);
|
2015-11-02 04:12:08 -08:00
|
|
|
}
|
2015-11-02 06:43:23 -08:00
|
|
|
|
2015-11-03 04:25:20 -08:00
|
|
|
/* Free allocated memory */
|
|
|
|
eina_hash_free(objects_hash);
|
|
|
|
eina_list_free(objs);
|
|
|
|
|
2015-11-02 06:43:23 -08:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_thread_dispatcher(void *data)
|
|
|
|
{
|
|
|
|
eina_debug_dispatch(_session, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
Eina_Bool
|
|
|
|
_disp_cb(Eina_Debug_Session *session, void *buffer)
|
|
|
|
{
|
|
|
|
ecore_main_loop_thread_safe_call_async(_ecore_thread_dispatcher, buffer);
|
2015-11-02 04:12:08 -08:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
2015-11-01 01:38:51 -08:00
|
|
|
static void
|
|
|
|
_args_handle(Eina_Bool flag)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
if(!flag) return;
|
2015-11-02 06:43:23 -08:00
|
|
|
eina_debug_session_dispatch_override(_session, _disp_cb);
|
2015-11-01 01:38:51 -08:00
|
|
|
Eina_Debug_Client *cl = eina_debug_client_new(_session, 0);
|
|
|
|
eina_debug_session_send(cl, _cl_stat_reg_opcode, NULL, 0);
|
|
|
|
|
|
|
|
for (i = 1; i < my_argc;)
|
|
|
|
{
|
|
|
|
if (i < my_argc - 1)
|
|
|
|
{
|
|
|
|
const char *op_str = my_argv[i++];
|
|
|
|
uint32_t pid = atoi(my_argv[i++]);
|
|
|
|
char *buf = NULL;
|
|
|
|
eina_debug_session_send(cl, _cid_from_pid_opcode, &pid, sizeof(uint32_t));
|
|
|
|
printf("got %s %d\n", op_str, pid);
|
|
|
|
if ((!strcmp(op_str, "pon")) && (i < (my_argc - 2)))
|
|
|
|
{
|
|
|
|
uint32_t freq = atoi(my_argv[i++]);
|
|
|
|
buf = malloc(sizeof(uint32_t));
|
|
|
|
memcpy(buf, &freq, sizeof(uint32_t));
|
|
|
|
_pending_add(&_poll_on_opcode, buf, sizeof(uint32_t));
|
|
|
|
}
|
|
|
|
else if (!strcmp(op_str, "poff"))
|
|
|
|
_pending_add(&_poll_off_opcode, NULL, 0);
|
|
|
|
else if (!strcmp(op_str, "evlogon"))
|
|
|
|
_pending_add(&_evlog_on_opcode, NULL, 0);
|
|
|
|
else if (!strcmp(op_str, "evlogoff"))
|
|
|
|
_pending_add(&_evlog_off_opcode, NULL, 0);
|
|
|
|
else if (!strcmp(op_str, "eo_list"))
|
2015-11-02 04:12:08 -08:00
|
|
|
{
|
|
|
|
if (i <= my_argc - 1) buf = strdup(my_argv[i++]);
|
|
|
|
_pending_add(&_eo_list_opcode, buf, buf ? strlen(buf) + 1 : 0);
|
|
|
|
}
|
|
|
|
else if (!strcmp(op_str, "elm_list"))
|
|
|
|
{
|
|
|
|
if (i <= my_argc - 1) buf = strdup(my_argv[i++]);
|
|
|
|
_pending_add(&_elm_list_opcode, buf, buf ? strlen(buf) + 1 : 0);
|
|
|
|
}
|
2015-11-01 01:38:51 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
eina_debug_client_free(cl);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const Eina_Debug_Opcode ops[] =
|
|
|
|
{
|
|
|
|
{"daemon/client_status_register", &_cl_stat_reg_opcode, _clients_info_cb},
|
|
|
|
{"daemon/client_added", NULL, _clients_info_cb},
|
|
|
|
{"daemon/client_deleted", NULL, _clients_info_deleted_cb},
|
|
|
|
{"daemon/cid_from_pid", &_cid_from_pid_opcode, &_cid_get_cb},
|
|
|
|
{"poll/on", &_poll_on_opcode, NULL},
|
|
|
|
{"poll/off", &_poll_off_opcode, NULL},
|
|
|
|
{"evlog/on", &_evlog_on_opcode, NULL},
|
|
|
|
{"evlog/off", &_evlog_off_opcode, NULL},
|
|
|
|
{"Eo/list", &_eo_list_opcode, &_objects_list_cb},
|
2015-11-02 04:12:08 -08:00
|
|
|
{"Elementary/objects_list", &_elm_list_opcode, &_elm_objects_list_cb},
|
2015-11-01 01:38:51 -08:00
|
|
|
{NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
EAPI_MAIN int
|
|
|
|
elm_main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
|
|
|
pub_widgets = gui_gui_get();
|
|
|
|
|
2015-11-03 04:25:20 -08:00
|
|
|
//Init objects Genlist
|
|
|
|
Evas_Object *genlist = pub_widgets->elm_win1->elm_genlist1;
|
|
|
|
if (!_objs_itc)
|
2015-11-02 06:43:23 -08:00
|
|
|
{
|
2015-11-03 04:25:20 -08:00
|
|
|
_objs_itc = elm_genlist_item_class_new();
|
|
|
|
_objs_itc->item_style = "default";
|
|
|
|
_objs_itc->func.text_get = _objs_item_label_get;
|
|
|
|
_objs_itc->func.content_get = NULL;
|
|
|
|
_objs_itc->func.state_get = NULL;
|
|
|
|
_objs_itc->func.del = NULL;
|
2015-11-02 06:43:23 -08:00
|
|
|
}
|
2015-11-03 04:25:20 -08:00
|
|
|
eo_do(genlist,
|
|
|
|
eo_event_callback_add(
|
|
|
|
ELM_GENLIST_EVENT_EXPAND_REQUEST, _objs_expand_request_cb, genlist),
|
|
|
|
eo_event_callback_add(
|
|
|
|
ELM_GENLIST_EVENT_CONTRACT_REQUEST, _objs_contract_request_cb, genlist),
|
|
|
|
eo_event_callback_add(
|
|
|
|
ELM_GENLIST_EVENT_EXPANDED, _objs_expanded_cb, genlist),
|
|
|
|
eo_event_callback_add(
|
|
|
|
ELM_GENLIST_EVENT_CONTRACTED, _objs_contracted_cb, genlist)
|
|
|
|
);
|
|
|
|
|
|
|
|
evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
|
|
|
|
evas_object_show(genlist);
|
2015-11-01 01:38:51 -08:00
|
|
|
evas_object_show(pub_widgets->elm_win1->elm_win1);
|
|
|
|
|
|
|
|
eina_init();
|
|
|
|
|
|
|
|
_session = eina_debug_session_new();
|
2015-11-02 06:43:23 -08:00
|
|
|
|
2015-11-01 01:38:51 -08:00
|
|
|
if (!eina_debug_local_connect(_session))
|
|
|
|
{
|
|
|
|
fprintf(stderr, "ERROR: Cannot connect to debug daemon.\n");
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
my_argc = argc;
|
|
|
|
my_argv = argv;
|
|
|
|
|
|
|
|
eina_debug_opcodes_register(_session, ops, _args_handle);
|
|
|
|
|
|
|
|
elm_run();
|
|
|
|
|
|
|
|
error:
|
|
|
|
eina_debug_session_free(_session);
|
|
|
|
eina_shutdown();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
ELM_MAIN()
|