X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/f4122e6e085938b6d216a9ec724b974a603f6992..983fe7c4ac262f56d38a143b1efab1e4afb77a52:/l4/pkg/valgrind/src/valgrind-3.6.0-svn/coregrind/m_debuginfo/priv_storage.h diff --git a/l4/pkg/valgrind/src/valgrind-3.6.0-svn/coregrind/m_debuginfo/priv_storage.h b/l4/pkg/valgrind/src/valgrind-3.6.0-svn/coregrind/m_debuginfo/priv_storage.h index b26982516..9abff6d3b 100644 --- a/l4/pkg/valgrind/src/valgrind-3.6.0-svn/coregrind/m_debuginfo/priv_storage.h +++ b/l4/pkg/valgrind/src/valgrind-3.6.0-svn/coregrind/m_debuginfo/priv_storage.h @@ -130,15 +130,32 @@ typedef CFIC_R13REL -> r13 + cfa_off CFIC_R12REL -> r12 + cfa_off CFIC_R11REL -> r11 + cfa_off + CFIC_R7REL -> r7 + cfa_off CFIR_EXPR -> expr whose index is in cfa_off - old_r14/r13/r12/r11/ra - = case r14/r13/r12/r11/ra_how of + old_r14/r13/r12/r11/r7/ra + = case r14/r13/r12/r11/r7/ra_how of CFIR_UNKNOWN -> we don't know, sorry - CFIR_SAME -> same as it was before (r14/r13/r12/r11 only) - CFIR_CFAREL -> cfa + r14/r13/r12/r11/ra_off - CFIR_MEMCFAREL -> *( cfa + r14/r13/r12/r11/ra_off ) - CFIR_EXPR -> expr whose index is in r14/r13/r12/r11/ra_off + CFIR_SAME -> same as it was before (r14/r13/r12/r11/r7 only) + CFIR_CFAREL -> cfa + r14/r13/r12/r11/r7/ra_off + CFIR_MEMCFAREL -> *( cfa + r14/r13/r12/r11/r7/ra_off ) + CFIR_EXPR -> expr whose index is in r14/r13/r12/r11/r7/ra_off + + On s390x we have a similar logic as x86 or amd64. We need the stack pointer + (r15), the frame pointer r11 (like BP) and together with the instruction + address in the PSW we can calculate the previous values: + cfa = case cfa_how of + CFIC_IA_SPREL -> r15 + cfa_off + CFIC_IA_BPREL -> r11 + cfa_off + CFIR_IA_EXPR -> expr whose index is in cfa_off + + old_sp/fp/ra + = case sp/fp/ra_how of + CFIR_UNKNOWN -> we don't know, sorry + CFIR_SAME -> same as it was before (sp/fp only) + CFIR_CFAREL -> cfa + sp/fp/ra_off + CFIR_MEMCFAREL -> *( cfa + sp/fp/ra_off ) + CFIR_EXPR -> expr whose index is in sp/fp/ra_off */ #define CFIC_IA_SPREL ((UChar)1) @@ -147,7 +164,8 @@ typedef #define CFIC_ARM_R13REL ((UChar)4) #define CFIC_ARM_R12REL ((UChar)5) #define CFIC_ARM_R11REL ((UChar)6) -#define CFIC_EXPR ((UChar)7) /* all targets */ +#define CFIC_ARM_R7REL ((UChar)7) +#define CFIC_EXPR ((UChar)8) /* all targets */ #define CFIR_UNKNOWN ((UChar)64) #define CFIR_SAME ((UChar)65) @@ -181,12 +199,14 @@ typedef UChar r13_how; /* a CFIR_ value */ UChar r12_how; /* a CFIR_ value */ UChar r11_how; /* a CFIR_ value */ + UChar r7_how; /* a CFIR_ value */ Int cfa_off; Int ra_off; Int r14_off; Int r13_off; Int r12_off; Int r11_off; + Int r7_off; } DiCfSI; #elif defined(VGA_ppc32) || defined(VGA_ppc64) @@ -204,6 +224,21 @@ typedef Int ra_off; } DiCfSI; +#elif defined(VGA_s390x) +typedef + struct { + Addr base; + UInt len; + UChar cfa_how; /* a CFIC_ value */ + UChar sp_how; /* a CFIR_ value */ + UChar ra_how; /* a CFIR_ value */ + UChar fp_how; /* a CFIR_ value */ + Int cfa_off; + Int sp_off; + Int ra_off; + Int fp_off; + } + DiCfSI; #else # error "Unknown arch" #endif @@ -226,7 +261,8 @@ typedef Creg_ARM_R13, Creg_ARM_R12, Creg_ARM_R15, - Creg_ARM_R14 + Creg_ARM_R14, + Creg_S390_R14 } CfiReg;