CBIntrospector
CBIntrospector copied to clipboard
ARM64: unknown register name 'eax' in asm
DCIntrospect.m:621:4: error: unknown register name 'eax' in asm DEBUGGER; ^ DCIntrospect-ARC/DCIntrospect.m:56:225: note: expanded from macro 'DEBUGGER'
define DEBUGGER do { int trapSignal = AmIBeingDebugged () ? SIGINT : SIGSTOP; asm volatile ("pushl %0\npushl %1\npush $0\nmovl %2, %%eax\nint $0x80\nadd $12, %%esp" : : "g" (trapSignal), "g" (getpid ()), "n" (37) : "eax", "cc"); } while (false);
^
1 error generated.
Not sure how to fix it or what this code actually does.
There are solutions:
if TARGET_CPU_ARM
define DEBUGSTOP(signal) asm volatile ("mov r0, %0\nmov r1, %1\nmov r12, %2\nswi 128\n" : : "r"(getpid ()), "r"(signal), "r"(37) : "r12", "r0", "r1", "cc");
define DEBUGGER do { int trapSignal = AmIBeingDebugged () ? SIGINT : SIGSTOP; DEBUGSTOP(trapSignal); if (trapSignal == SIGSTOP) { DEBUGSTOP (SIGINT); } } while (false);
elif TARGET_CPU_ARM64
define DEBUGGER // Breaking into debugger on arm64 is not currently supported
else
define DEBUGGER do { int trapSignal = AmIBeingDebugged () ? SIGINT : SIGSTOP; asm volatile ("pushl %0\npushl %1\npush $0\nmovl %2, %%eax\nint $0x80\nadd $12, %%esp" : : "g" (trapSignal), "g" (getpid ()), "n" (37) : "eax", "cc"); } while (false);
@p709723778 you should check the DCIntrospect-ARC project which looks like to have this issue fixed.