#1185 Bugfix: compile on ARM

open
nobody
None
1
2016-12-25
2016-12-25
Anonymous
No

I applied this patch, then it compiled on ARM; without it, compiler cannot use the commands _gregs[...]
The code was already there, but commented. I could not use the un-commented code in any way.

Maybe it is useful to you.

--- debughelper.cpp 2016-10-20 22:02:43.000000000 +0100
+++ debughelper.cpp 2016-10-21 12:47:39.937086819 +0100
@@ -511,16 +511,16 @@
 #define FRAME_FROM_UCONTEXT(context) (context)->uc_mcontext.gp_regs[31] //not always used
 #define RETURNTO_FROM_UCONTEXT(context) (context)->uc_mcontext.gp_regs[34]
 #elif defined(CPU_IS_ARM)
-/*
 #define PC_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_pc
 #define STACK_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_sp
 #define FRAME_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_fp
 #define RETURNTO_FROM_UCONTEXT(context) (context)->uc_mcontext.arm_lr
-*/
+/*
 #define PC_FROM_UCONTEXT(context) (context)->uc_mcontext.__gregs[_REG_R15]
 #define STACK_FROM_UCONTEXT(context) (context)->uc_mcontext.__gregs[_REG_R13]
 #define FRAME_FROM_UCONTEXT(context) (context)->uc_mcontext.__gregs[_REG_R11]
 #define RETURNTO_FROM_UCONTEXT(context) (context)->uc_mcontext.__gregs[_REG_R14]
+*/
 #elif defined(CPU_IS_IA64)
 #define PC_FROM_UCONTEXT(context) (context)->_u._mc.sc_ip
 #define STACK_FROM_UCONTEXT(context) (context)->_u._mc.sc_gr[12] //is that register 12?

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks