From a30b0258a53d8a40021fa3f0790dce1e9f16e9aa Mon Sep 17 00:00:00 2001 From: David Gonzalez Martin Date: Tue, 15 Oct 2024 21:04:32 -0600 Subject: [PATCH] PDB: separate first chunk --- bootstrap/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bootstrap/main.c b/bootstrap/main.c index c54c76d..d9d61d7 100644 --- a/bootstrap/main.c +++ b/bootstrap/main.c @@ -11697,7 +11697,7 @@ fn void pdb_playground(Thread* thread) fn void pdb_write(Thread* thread, String pdb_path) { - u8 buffer[] = { + u8 first_chunk[] = { 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x43, 0x2f, 0x43, 0x2b, 0x2b, 0x20, 0x4d, 0x53, 0x46, 0x20, 0x37, 0x2e, 0x30, 0x30, 0xd0, 0xa0, 0x1a, 0x44, 0x53, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, @@ -11954,6 +11954,9 @@ fn void pdb_write(Thread* thread, String pdb_path) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + + u8 rest_of_chunks[] = { 0x78, 0x00, 0x00, 0xd0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -20661,7 +20664,8 @@ fn void pdb_write(Thread* thread, String pdb_path) }; VirtualBuffer(u8) pdb_file = {}; - vb_copy_array(&pdb_file, buffer); + vb_copy_array(&pdb_file, first_chunk); + vb_copy_array(&pdb_file, rest_of_chunks); auto fd = os_file_open(pdb_path, (OSFileOpenFlags) { .write = 1,