Fiddling with function data.
This commit is contained in:
parent
d482885378
commit
070d34cd02
|
@ -179,7 +179,7 @@ class Win32ChunkedMappedMemoryWriter : public ChunkedMappedMemoryWriter {
|
|||
|
||||
bool Open(const std::wstring& path, bool low_address_space) {
|
||||
DWORD file_access = GENERIC_READ | GENERIC_WRITE;
|
||||
DWORD file_share = 0;
|
||||
DWORD file_share = FILE_SHARE_READ;
|
||||
DWORD create_mode = CREATE_ALWAYS;
|
||||
DWORD mapping_protect = PAGE_READWRITE;
|
||||
DWORD view_access = FILE_MAP_READ | FILE_MAP_WRITE;
|
||||
|
|
|
@ -83,20 +83,18 @@ bool X64Assembler::Assemble(FunctionInfo* symbol_info, HIRBuilder* builder,
|
|||
}
|
||||
|
||||
// Dump debug data.
|
||||
//auto fn_data = backend_->processor()->debugger()->
|
||||
if (FLAGS_disassemble_functions) {
|
||||
if (debug_info_flags & DebugInfoFlags::kDebugInfoDisasmSource) {
|
||||
//
|
||||
// auto fn_data = backend_->processor()->debugger()->AllocateFunctionData(
|
||||
// xe::debug::FunctionDisasmData::SizeOfHeader());
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
X64Function* fn = new X64Function(symbol_info);
|
||||
fn->set_debug_info(std::move(debug_info));
|
||||
fn->Setup(machine_code, code_size);
|
||||
X64Function* fn = new X64Function(symbol_info);
|
||||
fn->set_debug_info(std::move(debug_info));
|
||||
fn->Setup(machine_code, code_size);
|
||||
|
||||
*out_function = fn;
|
||||
}
|
||||
*out_function = fn;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,27 @@
|
|||
namespace xe {
|
||||
namespace debug {
|
||||
|
||||
class FunctionDisasmData {
|
||||
public:
|
||||
struct Header {
|
||||
// Format is used by tooling, changes must be made across all targets.
|
||||
// + 0 4b (data size)
|
||||
// + 4 4b start_address
|
||||
// + 8 4b end_address
|
||||
// +12 4b type (user, external, etc)
|
||||
// +16 4b offset of source disasm
|
||||
// +20 4b length of source disasm
|
||||
// +24 4b offset of raw hir disasm
|
||||
// +28 4b length of raw hir disasm
|
||||
// +32 4b offset of opt hir disasm
|
||||
// +36 4b length of opt hir disasm
|
||||
// +40 4b offset of machine code disasm
|
||||
// +44 4b length of machine code disasm
|
||||
};
|
||||
|
||||
static size_t SizeOfHeader() { return sizeof(Header); }
|
||||
};
|
||||
|
||||
class FunctionTraceData {
|
||||
public:
|
||||
static const int kFunctionCallerHistoryCount = 4;
|
||||
|
|
Loading…
Reference in New Issue