#define CFI_INVALID_ADDRESS ((pint_t)(-1))
+
namespace libunwind {
///
typedef typename A::sint_t sint_t;
static const char* parseCFIs(A& addressSpace, pint_t ehSectionStart, uint32_t sectionLength,
- const pint_t cuStarts[], uint32_t cuCount, bool keepDwarfWhichHasCU, bool forceDwarfConversion,
+ const pint_t cuStarts[], uint32_t cuCount,
+ bool keepDwarfWhichHasCU, bool forceDwarfConversion, bool neverConvertToCU,
CFI_Atom_Info<A>* infos, uint32_t& infosCount, void* ref, WarnFunc warn);
const Registers_arm64&, const typename CFI_Parser<A>::PrologInfo& prolog,
char warningBuffer[1024]);
+ // arm specific variants
+ static bool isReturnAddressRegister(int regNum, const Registers_arm&);
+ static pint_t getCFA(A& addressSpace, const typename CFI_Parser<A>::PrologInfo& prolog, const Registers_arm&);
+ static compact_unwind_encoding_t encodeToUseDwarf(const Registers_arm&);
+ static compact_unwind_encoding_t createCompactEncodingFromProlog(A& addressSpace, pint_t funcAddr,
+ const Registers_arm&, const typename CFI_Parser<A>::PrologInfo& prolog,
+ char warningBuffer[1024]);
+
};
template <typename A, typename R>
const char* DwarfInstructions<A,R>::parseCFIs(A& addressSpace, pint_t ehSectionStart, uint32_t sectionLength,
- const pint_t cuStarts[], uint32_t cuCount, bool keepDwarfWhichHasCU, bool forceDwarfConversion,
+ const pint_t cuStarts[], uint32_t cuCount,
+ bool keepDwarfWhichHasCU, bool forceDwarfConversion, bool neverConvertToCU,
CFI_Atom_Info<A>* infos, uint32_t& infosCount, void* ref, WarnFunc warn)
{
typename CFI_Parser<A>::CIE_Info cieInfo;
++entry;
}
else {
- if ( (cuCount != 0) && !forceDwarfConversion ) {
+ if ( neverConvertToCU || ((cuCount != 0) && !forceDwarfConversion) ) {
// Have some compact unwind, so this is a new .o file, therefore anything without
// compact unwind must be something not expressable in compact unwind.
R dummy;
return encoding;
}
+
+
+
+//
+// arm specific functions
+//
+
+template <typename A, typename R>
+compact_unwind_encoding_t DwarfInstructions<A,R>::encodeToUseDwarf(const Registers_arm&)
+{
+ return UNWIND_ARM_MODE_DWARF;
+}
+
+
+template <typename A, typename R>
+compact_unwind_encoding_t DwarfInstructions<A,R>::createCompactEncodingFromProlog(A& addressSpace, pint_t funcAddr,
+ const Registers_arm& r, const typename CFI_Parser<A>::PrologInfo& prolog,
+ char warningBuffer[1024])
+{
+ warningBuffer[0] = '\0';
+ return UNWIND_ARM_MODE_DWARF;
+}
+
+
} // namespace libunwind