mirror of
https://github.com/corda/corda.git
synced 2025-05-22 02:07:46 +00:00
enable use-frame-pointer=true build
Also, include Continuations, Coroutines, and DynamicWind tests in test suite for continuations=true build.
This commit is contained in:
parent
b47dfdf5bd
commit
f980ceb13e
17
makefile
17
makefile
@ -151,12 +151,17 @@ rdynamic = -rdynamic
|
|||||||
warnings = -Wall -Wextra -Werror -Wunused-parameter -Winit-self \
|
warnings = -Wall -Wextra -Werror -Wunused-parameter -Winit-self \
|
||||||
-Wno-non-virtual-dtor
|
-Wno-non-virtual-dtor
|
||||||
|
|
||||||
common-cflags = $(warnings) -fno-rtti -fno-exceptions -fno-omit-frame-pointer \
|
common-cflags = $(warnings) -fno-rtti -fno-exceptions \
|
||||||
"-I$(JAVA_HOME)/include" -idirafter $(src) -I$(build) $(classpath-cflags) \
|
"-I$(JAVA_HOME)/include" -idirafter $(src) -I$(build) $(classpath-cflags) \
|
||||||
-D__STDC_LIMIT_MACROS -D_JNI_IMPLEMENTATION_ -DAVIAN_VERSION=\"$(version)\" \
|
-D__STDC_LIMIT_MACROS -D_JNI_IMPLEMENTATION_ -DAVIAN_VERSION=\"$(version)\" \
|
||||||
-DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \
|
-DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \
|
||||||
-DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\"
|
-DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\"
|
||||||
|
|
||||||
|
ifeq ($(use-frame-pointer),true)
|
||||||
|
common-cflags += -fno-omit-frame-pointer -DAVIAN_USE_FRAME_POINTER
|
||||||
|
asmflags += -DAVIAN_USE_FRAME_POINTER
|
||||||
|
endif
|
||||||
|
|
||||||
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
|
build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
|
||||||
"-I$(JAVA_HOME)/include/linux" -I$(src) -pthread
|
"-I$(JAVA_HOME)/include/linux" -I$(src) -pthread
|
||||||
|
|
||||||
@ -544,6 +549,13 @@ test-extra-classes = \
|
|||||||
$(call java-classes,$(test-extra-sources),$(test),$(test-build))
|
$(call java-classes,$(test-extra-sources),$(test),$(test-build))
|
||||||
test-extra-dep = $(test-build)-extra.dep
|
test-extra-dep = $(test-build)-extra.dep
|
||||||
|
|
||||||
|
ifeq ($(continuations),true)
|
||||||
|
continuation-tests = \
|
||||||
|
extra.Continuations \
|
||||||
|
extra.Coroutines \
|
||||||
|
extra.DynamicWind
|
||||||
|
endif
|
||||||
|
|
||||||
class-name = $(patsubst $(1)/%.class,%,$(2))
|
class-name = $(patsubst $(1)/%.class,%,$(2))
|
||||||
class-names = $(foreach x,$(2),$(call class-name,$(1),$(x)))
|
class-names = $(foreach x,$(2),$(call class-name,$(1),$(x)))
|
||||||
|
|
||||||
@ -575,7 +587,8 @@ vg: build
|
|||||||
test: build
|
test: build
|
||||||
$(library-path) /bin/sh $(test)/test.sh 2>/dev/null \
|
$(library-path) /bin/sh $(test)/test.sh 2>/dev/null \
|
||||||
$(test-executable) $(mode) "$(test-flags)" \
|
$(test-executable) $(mode) "$(test-flags)" \
|
||||||
$(call class-names,$(test-build),$(test-classes))
|
$(call class-names,$(test-build),$(test-classes)) \
|
||||||
|
$(continuation-tests)
|
||||||
|
|
||||||
.PHONY: tarball
|
.PHONY: tarball
|
||||||
tarball:
|
tarball:
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
extern "C" void NO_RETURN
|
extern "C" void NO_RETURN
|
||||||
vmJump(void* address, void* stack, void* thread, uintptr_t returnLow,
|
vmJump(void* address, void* frame, void* stack, void* thread,
|
||||||
uintptr_t returnHigh);
|
uintptr_t returnLow, uintptr_t returnHigh);
|
||||||
|
|
||||||
namespace vm {
|
namespace vm {
|
||||||
|
|
||||||
|
@ -1992,8 +1992,8 @@ releaseLock(MyThread* t, object method, void* stack)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
findUnwindTarget(MyThread* t, void** targetIp, void** targetStack,
|
findUnwindTarget(MyThread* t, void** targetIp, void** targetFrame,
|
||||||
object* targetContinuation)
|
void** targetStack, object* targetContinuation)
|
||||||
{
|
{
|
||||||
void* ip;
|
void* ip;
|
||||||
void* stack;
|
void* stack;
|
||||||
@ -2029,6 +2029,8 @@ findUnwindTarget(MyThread* t, void** targetIp, void** targetStack,
|
|||||||
void** sp = static_cast<void**>(stackForFrame(t, stack, method))
|
void** sp = static_cast<void**>(stackForFrame(t, stack, method))
|
||||||
+ t->arch->frameReturnAddressSize();
|
+ t->arch->frameReturnAddressSize();
|
||||||
|
|
||||||
|
*targetFrame = static_cast<void**>
|
||||||
|
(stack) + t->arch->framePointerOffset();
|
||||||
*targetStack = sp;
|
*targetStack = sp;
|
||||||
*targetContinuation = continuation;
|
*targetContinuation = continuation;
|
||||||
|
|
||||||
@ -2046,6 +2048,7 @@ findUnwindTarget(MyThread* t, void** targetIp, void** targetStack,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*targetIp = ip;
|
*targetIp = ip;
|
||||||
|
*targetFrame = 0;
|
||||||
*targetStack = static_cast<void**>(stack)
|
*targetStack = static_cast<void**>(stack)
|
||||||
+ t->arch->frameReturnAddressSize();
|
+ t->arch->frameReturnAddressSize();
|
||||||
*targetContinuation = continuation;
|
*targetContinuation = continuation;
|
||||||
@ -2172,13 +2175,14 @@ void NO_RETURN
|
|||||||
unwind(MyThread* t)
|
unwind(MyThread* t)
|
||||||
{
|
{
|
||||||
void* ip;
|
void* ip;
|
||||||
|
void* frame;
|
||||||
void* stack;
|
void* stack;
|
||||||
object continuation;
|
object continuation;
|
||||||
findUnwindTarget(t, &ip, &stack, &continuation);
|
findUnwindTarget(t, &ip, &frame, &stack, &continuation);
|
||||||
|
|
||||||
transition(t, ip, stack, continuation, t->trace);
|
transition(t, ip, stack, continuation, t->trace);
|
||||||
|
|
||||||
vmJump(ip, stack, t, 0, 0);
|
vmJump(ip, frame, stack, t, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyCheckpoint: public Thread::Checkpoint {
|
class MyCheckpoint: public Thread::Checkpoint {
|
||||||
@ -6774,7 +6778,8 @@ callContinuation(MyThread* t, object continuation, object result,
|
|||||||
|
|
||||||
MyThread::TraceContext c(t, ip, stack, continuation, t->trace);
|
MyThread::TraceContext c(t, ip, stack, continuation, t->trace);
|
||||||
|
|
||||||
findUnwindTarget(t, &ip, &stack, &continuation);
|
void* frame;
|
||||||
|
findUnwindTarget(t, &ip, &frame, &stack, &continuation);
|
||||||
}
|
}
|
||||||
|
|
||||||
t->trace->nativeMethod = 0;
|
t->trace->nativeMethod = 0;
|
||||||
@ -6784,7 +6789,7 @@ callContinuation(MyThread* t, object continuation, object result,
|
|||||||
|
|
||||||
transition(t, ip, stack, continuation, t->trace);
|
transition(t, ip, stack, continuation, t->trace);
|
||||||
|
|
||||||
vmJump(ip, stack, t, reinterpret_cast<uintptr_t>(result), 0);
|
vmJump(ip, 0, stack, t, reinterpret_cast<uintptr_t>(result), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t*
|
int8_t*
|
||||||
@ -6942,9 +6947,11 @@ callContinuation(MyThread* t, object continuation, object result,
|
|||||||
"(Ljava/lang/Runnable;Lavian/Callback;Ljava/lang/Object;"
|
"(Ljava/lang/Runnable;Lavian/Callback;Ljava/lang/Object;"
|
||||||
"Ljava/lang/Throwable;)V");
|
"Ljava/lang/Throwable;)V");
|
||||||
|
|
||||||
setRoot(t, RewindMethod, method);
|
PROTECT(t, method);
|
||||||
|
|
||||||
compile(t, local::codeAllocator(t), 0, method);
|
compile(t, local::codeAllocator(t), 0, method);
|
||||||
|
|
||||||
|
setRoot(t, RewindMethod, method);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
action = Call;
|
action = Call;
|
||||||
@ -6957,9 +6964,10 @@ callContinuation(MyThread* t, object continuation, object result,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void* ip;
|
void* ip;
|
||||||
|
void* frame;
|
||||||
void* stack;
|
void* stack;
|
||||||
object threadContinuation;
|
object threadContinuation;
|
||||||
findUnwindTarget(t, &ip, &stack, &threadContinuation);
|
findUnwindTarget(t, &ip, &frame, &stack, &threadContinuation);
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case Call: {
|
case Call: {
|
||||||
@ -7037,7 +7045,7 @@ dynamicWind(MyThread* t, object before, object thunk, object after)
|
|||||||
object method = resolveMethod
|
object method = resolveMethod
|
||||||
(t, root(t, Machine::BootLoader), "avian/Continuations", "wind",
|
(t, root(t, Machine::BootLoader), "avian/Continuations", "wind",
|
||||||
"(Ljava/lang/Runnable;Ljava/util/concurrent/Callable;"
|
"(Ljava/lang/Runnable;Ljava/util/concurrent/Callable;"
|
||||||
"Ljava/lang/Runnable;)Lavian/Continuations$UnwindResult;");
|
"Ljava/lang/Runnable;)Lavian/Continuations$UnwindResult;");
|
||||||
|
|
||||||
if (method) {
|
if (method) {
|
||||||
setRoot(t, WindMethod, method);
|
setRoot(t, WindMethod, method);
|
||||||
@ -7264,7 +7272,9 @@ class SignalHandler: public System::SignalHandler {
|
|||||||
SignalHandler(Machine::Type type, Machine::Root root, unsigned fixedSize):
|
SignalHandler(Machine::Type type, Machine::Root root, unsigned fixedSize):
|
||||||
m(0), type(type), root(root), fixedSize(fixedSize) { }
|
m(0), type(type), root(root), fixedSize(fixedSize) { }
|
||||||
|
|
||||||
virtual bool handleSignal(void** ip, void** stack, void** thread) {
|
virtual bool handleSignal(void** ip, void** frame, void** stack,
|
||||||
|
void** thread)
|
||||||
|
{
|
||||||
MyThread* t = static_cast<MyThread*>(m->localThread->get());
|
MyThread* t = static_cast<MyThread*>(m->localThread->get());
|
||||||
if (t and t->state == Thread::ActiveState) {
|
if (t and t->state == Thread::ActiveState) {
|
||||||
object node = methodForIp(t, *ip);
|
object node = methodForIp(t, *ip);
|
||||||
@ -7289,7 +7299,7 @@ class SignalHandler: public System::SignalHandler {
|
|||||||
// printTrace(t, t->exception);
|
// printTrace(t, t->exception);
|
||||||
|
|
||||||
object continuation;
|
object continuation;
|
||||||
findUnwindTarget(t, ip, stack, &continuation);
|
findUnwindTarget(t, ip, frame, stack, &continuation);
|
||||||
|
|
||||||
transition(t, ip, stack, continuation, t->trace);
|
transition(t, ip, stack, continuation, t->trace);
|
||||||
|
|
||||||
@ -8274,7 +8284,8 @@ fixupThunks(MyThread* t, BootImage* image, uint8_t* code)
|
|||||||
void
|
void
|
||||||
fixupVirtualThunks(MyThread* t, BootImage* image, uint8_t* code)
|
fixupVirtualThunks(MyThread* t, BootImage* image, uint8_t* code)
|
||||||
{
|
{
|
||||||
for (unsigned i = 0; i < wordArrayLength(t, root(t, VirtualThunks)); i += 2) {
|
for (unsigned i = 0; i < wordArrayLength(t, root(t, VirtualThunks)); i += 2)
|
||||||
|
{
|
||||||
if (wordArrayBody(t, root(t, VirtualThunks), i)) {
|
if (wordArrayBody(t, root(t, VirtualThunks), i)) {
|
||||||
wordArrayBody(t, root(t, VirtualThunks), i)
|
wordArrayBody(t, root(t, VirtualThunks), i)
|
||||||
= (wordArrayBody(t, root(t, VirtualThunks), i) - image->codeBase)
|
= (wordArrayBody(t, root(t, VirtualThunks), i) - image->codeBase)
|
||||||
|
@ -1472,7 +1472,7 @@ class Thread {
|
|||||||
void* stack = this->stack;
|
void* stack = this->stack;
|
||||||
this->stack = 0;
|
this->stack = 0;
|
||||||
expect(t->m->system, stack);
|
expect(t->m->system, stack);
|
||||||
vmJump(voidPointer(vmRun_returnAddress), stack, t, 0, 0);
|
vmJump(voidPointer(vmRun_returnAddress), 0, stack, t, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* stack;
|
void* stack;
|
||||||
|
@ -815,7 +815,7 @@ class MySystem: public System {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class NullSignalHandler: public SignalHandler {
|
class NullSignalHandler: public SignalHandler {
|
||||||
virtual bool handleSignal(void**, void**, void**) { return false; }
|
virtual bool handleSignal(void**, void**, void**, void**) { return false; }
|
||||||
} nullHandler;
|
} nullHandler;
|
||||||
|
|
||||||
SignalHandler* handlers[SignalCount];
|
SignalHandler* handlers[SignalCount];
|
||||||
@ -835,6 +835,11 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
|||||||
void* stack = reinterpret_cast<void*>(STACK_REGISTER(c));
|
void* stack = reinterpret_cast<void*>(STACK_REGISTER(c));
|
||||||
void* thread = reinterpret_cast<void*>(THREAD_REGISTER(c));
|
void* thread = reinterpret_cast<void*>(THREAD_REGISTER(c));
|
||||||
void* link = reinterpret_cast<void*>(LINK_REGISTER(c));
|
void* link = reinterpret_cast<void*>(LINK_REGISTER(c));
|
||||||
|
#ifdef FRAME_REGISTER
|
||||||
|
void* frame = reinterpret_cast<void*>(FRAME_REGISTER(c));
|
||||||
|
#else
|
||||||
|
void* frame = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned index;
|
unsigned index;
|
||||||
|
|
||||||
@ -871,7 +876,8 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool jump = system->handlers[index]->handleSignal(&ip, &stack, &thread);
|
bool jump = system->handlers[index]->handleSignal
|
||||||
|
(&ip, &frame, &stack, &thread);
|
||||||
|
|
||||||
if (jump) {
|
if (jump) {
|
||||||
// I'd like to use setcontext here (and get rid of the
|
// I'd like to use setcontext here (and get rid of the
|
||||||
@ -885,7 +891,7 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
|||||||
sigaddset(&set, signal);
|
sigaddset(&set, signal);
|
||||||
sigprocmask(SIG_UNBLOCK, &set, 0);
|
sigprocmask(SIG_UNBLOCK, &set, 0);
|
||||||
|
|
||||||
vmJump(ip, stack, thread, 0, 0);
|
vmJump(ip, frame, stack, thread, 0, 0);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
@ -96,7 +96,8 @@ class System {
|
|||||||
|
|
||||||
class SignalHandler {
|
class SignalHandler {
|
||||||
public:
|
public:
|
||||||
virtual bool handleSignal(void** ip, void** stack, void** thread) = 0;
|
virtual bool handleSignal(void** ip, void** frame, void** stack,
|
||||||
|
void** thread) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MonitorResource {
|
class MonitorResource {
|
||||||
|
27
src/x86.S
27
src/x86.S
@ -170,10 +170,11 @@ LOCAL(exit):
|
|||||||
|
|
||||||
.globl GLOBAL(vmJump)
|
.globl GLOBAL(vmJump)
|
||||||
GLOBAL(vmJump):
|
GLOBAL(vmJump):
|
||||||
movq %r9,%rax
|
movq %rdx,%rbp
|
||||||
movq 40(%rsp),%rdx
|
movq 40(%rsp),%rax
|
||||||
movq %rdx,%rsp
|
movq 48(%rsp),%rdx
|
||||||
movq %r8,%rbx
|
movq %r8,%rsp
|
||||||
|
movq %r9,%rbx
|
||||||
jmp *%rcx
|
jmp *%rcx
|
||||||
|
|
||||||
#define VMRUN_FRAME_SIZE 80
|
#define VMRUN_FRAME_SIZE 80
|
||||||
@ -350,10 +351,11 @@ LOCAL(exit):
|
|||||||
|
|
||||||
.globl GLOBAL(vmJump)
|
.globl GLOBAL(vmJump)
|
||||||
GLOBAL(vmJump):
|
GLOBAL(vmJump):
|
||||||
movq %rsi,%rsp
|
movq %rsi,%rbp
|
||||||
movq %rdx,%rbx
|
movq %rdx,%rsp
|
||||||
movq %rcx,%rax
|
movq %rcx,%rbx
|
||||||
movq %r8,%rdx
|
movq %r8,%rax
|
||||||
|
movq %r9,%rdx
|
||||||
jmp *%rdi
|
jmp *%rdi
|
||||||
|
|
||||||
#define VMRUN_FRAME_SIZE 64
|
#define VMRUN_FRAME_SIZE 64
|
||||||
@ -508,10 +510,11 @@ LOCAL(exit):
|
|||||||
.globl GLOBAL(vmJump)
|
.globl GLOBAL(vmJump)
|
||||||
GLOBAL(vmJump):
|
GLOBAL(vmJump):
|
||||||
movl 4(%esp),%esi
|
movl 4(%esp),%esi
|
||||||
movl 12(%esp),%ebx
|
movl 8(%esp),%ebp
|
||||||
movl 16(%esp),%eax
|
movl 16(%esp),%ebx
|
||||||
movl 20(%esp),%edx
|
movl 20(%esp),%eax
|
||||||
movl 8(%esp),%esp
|
movl 24(%esp),%edx
|
||||||
|
movl 12(%esp),%esp
|
||||||
jmp *%esi
|
jmp *%esi
|
||||||
|
|
||||||
#define VMRUN_FRAME_SIZE 32
|
#define VMRUN_FRAME_SIZE 32
|
||||||
|
@ -32,17 +32,20 @@
|
|||||||
# define STACK_REGISTER(context) (context->uc_mcontext->__ss.__esp)
|
# define STACK_REGISTER(context) (context->uc_mcontext->__ss.__esp)
|
||||||
# define THREAD_REGISTER(context) (context->uc_mcontext->__ss.__ebx)
|
# define THREAD_REGISTER(context) (context->uc_mcontext->__ss.__ebx)
|
||||||
# define LINK_REGISTER(context) (context->uc_mcontext->__ss.__ecx)
|
# define LINK_REGISTER(context) (context->uc_mcontext->__ss.__ecx)
|
||||||
|
# define FRAME_REGISTER(context) (context->uc_mcontext->__ss.__ebp)
|
||||||
# else
|
# else
|
||||||
# define IP_REGISTER(context) (context->uc_mcontext->ss.eip)
|
# define IP_REGISTER(context) (context->uc_mcontext->ss.eip)
|
||||||
# define STACK_REGISTER(context) (context->uc_mcontext->ss.esp)
|
# define STACK_REGISTER(context) (context->uc_mcontext->ss.esp)
|
||||||
# define THREAD_REGISTER(context) (context->uc_mcontext->ss.ebx)
|
# define THREAD_REGISTER(context) (context->uc_mcontext->ss.ebx)
|
||||||
# define LINK_REGISTER(context) (context->uc_mcontext->ss.ecx)
|
# define LINK_REGISTER(context) (context->uc_mcontext->ss.ecx)
|
||||||
|
# define FRAME_REGISTER(context) (context->uc_mcontext->ss.ebp)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_EIP])
|
# define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_EIP])
|
||||||
# define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_ESP])
|
# define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_ESP])
|
||||||
# define THREAD_REGISTER(context) (context->uc_mcontext.gregs[REG_EBX])
|
# define THREAD_REGISTER(context) (context->uc_mcontext.gregs[REG_EBX])
|
||||||
# define LINK_REGISTER(context) (context->uc_mcontext.gregs[REG_ECX])
|
# define LINK_REGISTER(context) (context->uc_mcontext.gregs[REG_ECX])
|
||||||
|
# define FRAME_REGISTER(context) (context->uc_mcontext.gregs[REG_EBP])
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
extern "C" uint64_t
|
extern "C" uint64_t
|
||||||
@ -68,17 +71,20 @@ dynamicCall(void* function, uintptr_t* arguments, uint8_t*,
|
|||||||
# define STACK_REGISTER(context) (context->uc_mcontext->__ss.__rsp)
|
# define STACK_REGISTER(context) (context->uc_mcontext->__ss.__rsp)
|
||||||
# define THREAD_REGISTER(context) (context->uc_mcontext->__ss.__rbx)
|
# define THREAD_REGISTER(context) (context->uc_mcontext->__ss.__rbx)
|
||||||
# define LINK_REGISTER(context) (context->uc_mcontext->__ss.__rcx)
|
# define LINK_REGISTER(context) (context->uc_mcontext->__ss.__rcx)
|
||||||
|
# define FRAME_REGISTER(context) (context->uc_mcontext->__ss.__rbp)
|
||||||
# else
|
# else
|
||||||
# define IP_REGISTER(context) (context->uc_mcontext->ss.rip)
|
# define IP_REGISTER(context) (context->uc_mcontext->ss.rip)
|
||||||
# define STACK_REGISTER(context) (context->uc_mcontext->ss.rsp)
|
# define STACK_REGISTER(context) (context->uc_mcontext->ss.rsp)
|
||||||
# define THREAD_REGISTER(context) (context->uc_mcontext->ss.rbx)
|
# define THREAD_REGISTER(context) (context->uc_mcontext->ss.rbx)
|
||||||
# define LINK_REGISTER(context) (context->uc_mcontext->ss.rcx)
|
# define LINK_REGISTER(context) (context->uc_mcontext->ss.rcx)
|
||||||
|
# define FRAME_REGISTER(context) (context->uc_mcontext->ss.rbp)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_RIP])
|
# define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_RIP])
|
||||||
# define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_RSP])
|
# define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_RSP])
|
||||||
# define THREAD_REGISTER(context) (context->uc_mcontext.gregs[REG_RBX])
|
# define THREAD_REGISTER(context) (context->uc_mcontext.gregs[REG_RBX])
|
||||||
# define LINK_REGISTER(context) (context->uc_mcontext.gregs[REG_RCX])
|
# define LINK_REGISTER(context) (context->uc_mcontext.gregs[REG_RCX])
|
||||||
|
# define FRAME_REGISTER(context) (context->uc_mcontext.gregs[REG_RBP])
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
extern "C" uint64_t
|
extern "C" uint64_t
|
||||||
|
@ -14,7 +14,7 @@ echo -n "" >${log}
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
for test in ${tests}; do
|
for test in ${tests}; do
|
||||||
printf "%16s" "${test}: "
|
printf "%24s" "${test}: "
|
||||||
|
|
||||||
case ${mode} in
|
case ${mode} in
|
||||||
debug|debug-fast|fast|small )
|
debug|debug-fast|fast|small )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user