[IMPROVE] Preload: Breakpoint probe msg saving 36/42536/3
authorAlexander Aksenov <a.aksenov@samsung.com>
Fri, 27 Feb 2015 12:44:06 +0000 (15:44 +0300)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Thu, 2 Jul 2015 10:00:26 +0000 (03:00 -0700)
Change-Id: Ifcc1cb1fc73b4e19b498c76b3cefe010a0213bf8
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
daemon/da_protocol_inst.c

index ec8a6f9..5eff3f3 100644 (file)
@@ -560,7 +560,10 @@ static int create_preload_probe_func(struct probe_list_t **probe,
 int add_preload_probes(struct lib_list_t **lib_list)
 {
        struct lib_list_t *preload_lib;
-       struct probe_list_t *get_caller_probe, *get_call_type_probe;
+       struct probe_list_t
+           *get_caller_probe,
+           *get_call_type_probe,
+           *write_msg_probe;
        int ret = 0;
        struct us_func_inst_plane_t *func = NULL;
 
@@ -573,14 +576,15 @@ int add_preload_probes(struct lib_list_t **lib_list)
 
        get_caller_probe = new_probe();
        get_call_type_probe = new_probe();
-       if (get_caller_probe == NULL || get_call_type_probe == NULL) {
+       write_msg_probe = new_probe();
+       if (get_caller_probe == NULL || get_call_type_probe == NULL || write_msg_probe == NULL) {
                LOGE("probe alloc error\n");
                ret = 0;
                goto free_caller_probe;
        }
 
        preload_lib->lib->bin_path = probe_lib;
-       preload_lib->func_num = 2;
+       preload_lib->func_num = 3;
 
        /* Add get_caller probe */
        ret = create_preload_probe_func(&get_caller_probe, get_caller_addr, 4);
@@ -596,7 +600,13 @@ int add_preload_probes(struct lib_list_t **lib_list)
 
        probe_list_append(preload_lib, get_call_type_probe);
 
-       preload_lib->func_num = 2;
+       /* Add write_msg probe */
+       ret = create_preload_probe_func(&write_msg_probe, write_msg_addr, 6);
+       if (ret != 0)
+               return ret;
+       probe_list_append(preload_lib, write_msg_probe);
+
+       preload_lib->func_num = 3;
        preload_lib->size += strlen(preload_lib->lib->bin_path) + 1 + sizeof(preload_lib->func_num);
        preload_lib->hash = calc_lib_hash(preload_lib->lib);