Add removing GOT patcher probes on stop 07/101307/5
authorAnatolii Nikulin <nikulin.a@samsung.com>
Wed, 30 Nov 2016 15:04:26 +0000 (18:04 +0300)
committerAnatolii Nikulin <nikulin.a@samsung.com>
Wed, 30 Nov 2016 19:20:45 +0000 (22:20 +0300)
Change-Id: Ib49e36020d2ead7ffaf68cd3df9c11566c8f34e8
Signed-off-by: Anatolii Nikulin <nikulin.a@samsung.com>
daemon/da_inst.c
daemon/da_inst.h
daemon/da_protocol.c

index 77917d6..c0a238c 100644 (file)
@@ -968,6 +968,11 @@ static int write_bins_to_gtp(struct user_space_inst_t *us_inst)
        return ret;
 }
 
+int got_patcher_stop(void)
+{
+       return clean_bins_gtp();
+}
+
 void send_type_and_info_to(struct target *t)
 {
        lock_lib_maps_message();
index e61bb24..7525ba8 100644 (file)
@@ -79,6 +79,7 @@ extern int msg_swap_inst_add(struct msg_buf_t *data, struct user_space_inst_t *u
                             struct msg_t **msg, enum ErrorCode *err);
 extern int msg_start(struct msg_buf_t *data, struct user_space_inst_t *us_inst,
                     struct msg_t **msg, enum ErrorCode *err);
+int got_patcher_stop(void);
 
 struct probe_list_t *new_probe(void);
 struct lib_list_t *new_lib(void);
index 1dc74e0..5551b7f 100644 (file)
@@ -744,6 +744,9 @@ enum ErrorCode stop_all(void)
 
        stop_web_apps();
 
+       if (got_patcher_stop())
+               LOGE("failed to stop GOT patcher\n");
+
        pthread_mutex_lock(&stop_all_mutex);
        error_code = stop_all_no_lock();
        pthread_mutex_unlock(&stop_all_mutex);