Fixing stack traces, making lr BC... to diff from stack scribble BE...
This commit is contained in:
parent
5e5eb47789
commit
ad72c193a6
|
@ -259,7 +259,7 @@ void X64CodeCache::InitializeUnwindEntry(uint8_t* unwind_entry_address,
|
|||
unwind_info->Version = 1;
|
||||
unwind_info->Flags = 0;
|
||||
unwind_info->SizeOfProlog = prolog_size;
|
||||
unwind_info->CountOfCodes = 3;
|
||||
unwind_info->CountOfCodes = 2;
|
||||
unwind_info->FrameRegister = 0;
|
||||
unwind_info->FrameOffset = 0;
|
||||
|
||||
|
|
|
@ -235,13 +235,13 @@ bool X64Emitter::Emit(HIRBuilder* builder, size_t& out_stack_size) {
|
|||
add(rsp, (uint32_t)stack_size);
|
||||
ret();
|
||||
|
||||
#if XE_DEBUG
|
||||
nop();
|
||||
nop();
|
||||
nop();
|
||||
nop();
|
||||
nop();
|
||||
#endif // XE_DEBUG
|
||||
if (FLAGS_debug) {
|
||||
nop();
|
||||
nop();
|
||||
nop();
|
||||
nop();
|
||||
nop();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -253,13 +253,13 @@ void X64Emitter::MarkSourceOffset(const Instr* i) {
|
|||
entry->code_offset = static_cast<uint32_t>(getSize());
|
||||
source_map_count_++;
|
||||
|
||||
#if XE_DEBUG
|
||||
nop();
|
||||
nop();
|
||||
mov(eax, entry->source_offset);
|
||||
nop();
|
||||
nop();
|
||||
#endif // XE_DEBUG
|
||||
if (FLAGS_debug) {
|
||||
nop();
|
||||
nop();
|
||||
mov(eax, entry->source_offset);
|
||||
nop();
|
||||
nop();
|
||||
}
|
||||
|
||||
if (debug_info_flags_ & DebugInfoFlags::kDebugInfoTraceFunctionCoverage) {
|
||||
auto trace_data = debug_info_->trace_data();
|
||||
|
|
|
@ -220,7 +220,7 @@ class TestRunner {
|
|||
}
|
||||
|
||||
auto ctx = thread_state->context();
|
||||
ctx->lr = 0xBEBEBEBE;
|
||||
ctx->lr = 0xBCBCBCBC;
|
||||
fn->Call(thread_state.get(), uint32_t(ctx->lr));
|
||||
|
||||
// Assert test state expectations.
|
||||
|
|
|
@ -338,7 +338,7 @@ bool Processor::Execute(ThreadState* thread_state, uint32_t address) {
|
|||
// This could be set to anything to give us a unique identifier to track
|
||||
// re-entrancy/etc.
|
||||
uint64_t previous_lr = context->lr;
|
||||
context->lr = 0xBEBEBEBE;
|
||||
context->lr = 0xBCBCBCBC;
|
||||
|
||||
// Execute the function.
|
||||
auto result = fn->Call(thread_state, uint32_t(context->lr));
|
||||
|
|
|
@ -74,7 +74,7 @@ class TestFunction {
|
|||
processor.get(), 0x100, ThreadStackType::kUserStack, stack_address,
|
||||
stack_size, thread_state_address);
|
||||
auto ctx = thread_state->context();
|
||||
ctx->lr = 0xBEBEBEBE;
|
||||
ctx->lr = 0xBCBCBCBC;
|
||||
|
||||
pre_call(ctx);
|
||||
|
||||
|
|
Loading…
Reference in New Issue