summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArun Sharma <arun@sharma-home.net>2014-09-20 08:09:55 -0700
committerArun Sharma <arun@sharma-home.net>2014-09-20 08:09:55 -0700
commit06e608d0437fe7c33469236622457296d8bfe7a4 (patch)
tree23ae3d84ab54d3b33d46e69665af66f00027efc9 /include
parent6046c87d8e9ecc92c915fe2da3f6c457fe1b9422 (diff)
parente1804829cabb9bb1514d9537ed94f2c353a1a70d (diff)
downloadlibunwind-06e608d0437fe7c33469236622457296d8bfe7a4.tar.gz
Merge branch 'fast-stack-trace-arm' of https://github.com/fillexen/libunwind
Diffstat (limited to 'include')
-rw-r--r--include/tdep-arm/libunwind_i.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/include/tdep-arm/libunwind_i.h b/include/tdep-arm/libunwind_i.h
index 291b1018..e5ec9553 100644
--- a/include/tdep-arm/libunwind_i.h
+++ b/include/tdep-arm/libunwind_i.h
@@ -36,9 +36,25 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "dwarf.h"
#include "ex_tables.h"
+typedef enum
+ {
+ UNW_ARM_FRAME_STANDARD = -2, /* regular r7, sp +/- offset */
+ UNW_ARM_FRAME_SIGRETURN = -1, /* special sigreturn frame */
+ UNW_ARM_FRAME_OTHER = 0, /* not cacheable (special or unrecognised) */
+ UNW_ARM_FRAME_GUESSED = 1 /* guessed it was regular, but not known */
+ }
+unw_tdep_frame_type_t;
+
typedef struct
{
- /* no arm-specific fast trace */
+ uint32_t virtual_address;
+ int32_t frame_type : 2; /* unw_tdep_frame_type_t classification */
+ int32_t last_frame : 1; /* non-zero if last frame in chain */
+ int32_t cfa_reg_sp : 1; /* cfa dwarf base register is sp vs. r7 */
+ int32_t cfa_reg_offset : 30; /* cfa is at this offset from base register value */
+ int32_t r7_cfa_offset : 30; /* r7 saved at this offset from cfa (-1 = not saved) */
+ int32_t lr_cfa_offset : 30; /* lr saved at this offset from cfa (-1 = not saved) */
+ int32_t sp_cfa_offset : 30; /* sp saved at this offset from cfa (-1 = not saved) */
}
unw_tdep_frame_t;
@@ -61,6 +77,9 @@ struct unw_addr_space
struct cursor
{
struct dwarf_cursor dwarf; /* must be first */
+
+ unw_tdep_frame_t frame_info; /* quick tracing assist info */
+
enum
{
ARM_SCF_NONE, /* no signal frame */
@@ -73,6 +92,7 @@ struct cursor
unw_word_t sigcontext_addr;
unw_word_t sigcontext_sp;
unw_word_t sigcontext_pc;
+ int validate;
};
#define DWARF_GET_LOC(l) ((l).val)
@@ -242,8 +262,8 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
#define tdep_fetch_frame(c,ip,n) do {} while(0)
#define tdep_cache_frame(c,rs) do {} while(0)
#define tdep_reuse_frame(c,rs) do {} while(0)
-#define tdep_stash_frame(c,rs) do {} while(0)
-#define tdep_trace(cur,addr,n) (-UNW_ENOINFO)
+#define tdep_stash_frame UNW_OBJ(tdep_stash_frame)
+#define tdep_trace UNW_OBJ(tdep_trace)
#ifdef UNW_LOCAL_ONLY
# define tdep_find_proc_info(c,ip,n) \
@@ -283,6 +303,9 @@ extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg,
unw_word_t *valp, int write);
extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg,
unw_fpreg_t *valp, int write);
+extern int tdep_trace (unw_cursor_t *cursor, void **addresses, int *n);
+extern void tdep_stash_frame (struct dwarf_cursor *c,
+ struct dwarf_reg_state *rs);
/* unwinding method selection support */
#define UNW_ARM_METHOD_ALL 0xFF