Imported Upstream version 1.3.1
[platform/upstream/libunwind.git] / include / libunwind-common.h.in
index fa753ba..8d96ddc 100644 (file)
@@ -86,6 +86,12 @@ typedef enum
   }
 unw_caching_policy_t;
 
+typedef enum
+  {
+    UNW_INIT_SIGNAL_FRAME = 1,          /* We know this is a signal frame */
+  }
+unw_init_local2_flags_t;
+
 typedef int unw_regnum_t;
 
 /* The unwind cursor starts at the youngest (most deeply nested) frame
@@ -126,6 +132,9 @@ typedef struct unw_proc_info
   {
     unw_word_t start_ip;       /* first IP covered by this procedure */
     unw_word_t end_ip;         /* first IP NOT covered by this procedure */
+#if defined(NEED_LAST_IP)
+    unw_word_t last_ip;                /* first IP that could begin another procedure */
+#endif
     unw_word_t lsda;           /* address of lang.-spec. data area (if any) */
     unw_word_t handler;                /* optional personality routine */
     unw_word_t gp;             /* global-pointer value for this procedure */
@@ -138,6 +147,11 @@ typedef struct unw_proc_info
   }
 unw_proc_info_t;
 
+typedef int (*unw_reg_states_callback)(void *token,
+                                      void *reg_states_data,
+                                      size_t reg_states_data_size,
+                                      unw_word_t start_ip, unw_word_t end_ip);
+
 /* These are backend callback routines that provide access to the
    state of a "remote" process.  This can be used, for example, to
    unwind another process through the ptrace() interface.  */
@@ -210,12 +224,16 @@ unw_save_loc_t;
 #define unw_create_addr_space  UNW_OBJ(create_addr_space)
 #define unw_destroy_addr_space UNW_OBJ(destroy_addr_space)
 #define unw_get_accessors      UNW_ARCH_OBJ(get_accessors)
+#define unw_get_accessors_int  UNW_ARCH_OBJ(get_accessors_int)
 #define unw_init_local         UNW_OBJ(init_local)
+#define unw_init_local2                UNW_OBJ(init_local2)
 #define unw_init_remote                UNW_OBJ(init_remote)
 #define unw_step               UNW_OBJ(step)
 #define unw_resume             UNW_OBJ(resume)
 #define unw_get_proc_info      UNW_OBJ(get_proc_info)
 #define unw_get_proc_info_by_ip        UNW_OBJ(get_proc_info_by_ip)
+#define unw_reg_states_iterate  UNW_OBJ(reg_states_iterate)
+#define unw_apply_reg_state     UNW_OBJ(apply_reg_state)
 #define unw_get_reg            UNW_OBJ(get_reg)
 #define unw_set_reg            UNW_OBJ(set_reg)
 #define unw_get_fpreg          UNW_OBJ(get_fpreg)
@@ -225,6 +243,7 @@ unw_save_loc_t;
 #define unw_handle_signal_frame        UNW_OBJ(handle_signal_frame)
 #define unw_get_proc_name      UNW_OBJ(get_proc_name)
 #define unw_set_caching_policy UNW_OBJ(set_caching_policy)
+#define unw_set_cache_size     UNW_OBJ(set_cache_size)
 #define unw_regname            UNW_ARCH_OBJ(regname)
 #define unw_flush_cache                UNW_ARCH_OBJ(flush_cache)
 #define unw_strerror           UNW_ARCH_OBJ(strerror)
@@ -232,17 +251,22 @@ unw_save_loc_t;
 extern unw_addr_space_t unw_create_addr_space (unw_accessors_t *, int);
 extern void unw_destroy_addr_space (unw_addr_space_t);
 extern unw_accessors_t *unw_get_accessors (unw_addr_space_t);
+extern unw_accessors_t *unw_get_accessors_int (unw_addr_space_t);
 extern void unw_flush_cache (unw_addr_space_t, unw_word_t, unw_word_t);
 extern int unw_set_caching_policy (unw_addr_space_t, unw_caching_policy_t);
+extern int unw_set_cache_size (unw_addr_space_t, size_t, int);
 extern const char *unw_regname (unw_regnum_t);
 
 extern int unw_init_local (unw_cursor_t *, unw_context_t *);
+extern int unw_init_local2 (unw_cursor_t *, unw_context_t *, int);
 extern int unw_init_remote (unw_cursor_t *, unw_addr_space_t, void *);
 extern int unw_step (unw_cursor_t *);
 extern int unw_resume (unw_cursor_t *);
 extern int unw_get_proc_info (unw_cursor_t *, unw_proc_info_t *);
 extern int unw_get_proc_info_by_ip (unw_addr_space_t, unw_word_t,
                                    unw_proc_info_t *, void *);
+extern int unw_reg_states_iterate (unw_cursor_t *, unw_reg_states_callback, void *);
+extern int unw_apply_reg_state (unw_cursor_t *, void *);
 extern int unw_get_reg (unw_cursor_t *, int, unw_word_t *);
 extern int unw_set_reg (unw_cursor_t *, int, unw_word_t);
 extern int unw_get_fpreg (unw_cursor_t *, int, unw_fpreg_t *);