summaryrefslogtreecommitdiff
path: root/include/libunwind_i.h
diff options
context:
space:
mode:
authorArun Sharma <asharma@fb.com>2012-03-12 18:45:08 -0700
committerArun Sharma <asharma@fb.com>2012-03-12 20:04:19 -0700
commit25ee9f81727616f3269032c52483e4421d451291 (patch)
tree730cc490880446b01036d0ac5f5100a02a2259b3 /include/libunwind_i.h
parent3d08506936d16401aade168de0c95646b3f54a94 (diff)
downloadlibunwind-25ee9f81727616f3269032c52483e4421d451291.tar.gz
Introduce struct elf_dyn_info
This is a common part of struct UPT_info and struct UCD_info (to be introduced later). Make _UPTi_find_unwind_table function operate only on this part of struct UPT_info. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'include/libunwind_i.h')
-rw-r--r--include/libunwind_i.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/libunwind_i.h b/include/libunwind_i.h
index e7110fc9..2ece7f06 100644
--- a/include/libunwind_i.h
+++ b/include/libunwind_i.h
@@ -303,6 +303,32 @@ struct elf_image
size_t size; /* (file-) size of the image */
};
+struct elf_dyn_info
+ {
+ struct elf_image ei;
+ unw_dyn_info_t di_cache;
+ unw_dyn_info_t di_debug; /* additional table info for .debug_frame */
+#if UNW_TARGET_IA64
+ unw_dyn_info_t ktab;
+#endif
+#if UNW_TARGET_ARM
+ unw_dyn_info_t di_arm; /* additional table info for .ARM.exidx */
+#endif
+ };
+
+static void inline invalidate_edi (struct elf_dyn_info *edi)
+{
+ if (edi->ei.image)
+ munmap (edi->ei.image, edi->ei.size);
+ memset (edi, 0, sizeof (*edi));
+ edi->di_cache.format = -1;
+ edi->di_debug.format = -1;
+#if UNW_TARGET_ARM
+ edi->di_arm.format = -1;
+#endif
+}
+
+
/* Provide a place holder for architecture to override for fast access
to memory when known not to need to validate and know the access
will be local to the process. A suitable override will improve