]> granicus.if.org Git - strace/commitdiff
unwind: remove unused field from mmap_cache_t
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 13 Jun 2014 14:20:08 +0000 (18:20 +0400)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 13 Jun 2014 14:20:08 +0000 (18:20 +0400)
* unwind.c (mmap_cache_t): Remove "deleted" field.
(build_mmap_cache): Remove initialization of "deleted" field.

unwind.c

index c4a262cd7679b4534aa9bd8f5ea2beb4d85eeeb2..85ba8fbe51117be0a06cffcca2bcfab73eee6cc8 100644 (file)
--- a/unwind.c
+++ b/unwind.c
@@ -58,7 +58,6 @@ struct mmap_cache_t {
        unsigned long end_addr;
        unsigned long mmap_offset;
        char *binary_filename;
-       bool deleted;
 };
 
 /*
@@ -146,10 +145,6 @@ build_mmap_cache(struct tcb* tcp)
        struct mmap_cache_t *cache_head;
        FILE *fp;
 
-       const char *deleted = " (deleted)";
-       size_t blen;
-       size_t dlen;
-
        unw_flush_cache (libunwind_as, 0, 0);
 
        sprintf(filename, "/proc/%d/maps", tcp->pid);
@@ -188,13 +183,6 @@ build_mmap_cache(struct tcb* tcp)
                cur_entry->mmap_offset = mmap_offset;
                cur_entry->binary_filename = strdup(binary_path);
 
-               dlen = strlen(deleted);
-               blen = strlen(binary_path);
-               if (blen >= dlen && strcmp(binary_path + blen - dlen, deleted) == 0)
-                       cur_entry->deleted = true;
-               else
-                       cur_entry->deleted = false;
-
                /*
                 * sanity check to make sure that we're storing
                 * non-overlapping regions in ascending order