PDB: separate first chunk
This commit is contained in:
parent
537dc2b2c3
commit
a30b0258a5
@ -11697,7 +11697,7 @@ fn void pdb_playground(Thread* thread)
|
|||||||
|
|
||||||
fn void pdb_write(Thread* thread, String pdb_path)
|
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, 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,
|
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,
|
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,
|
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,
|
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,
|
||||||
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 = {};
|
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) {
|
auto fd = os_file_open(pdb_path, (OSFileOpenFlags) {
|
||||||
.write = 1,
|
.write = 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user