fix built exes to refer to their pdbs relatively, so that relocated builds can still locate pdbs relatively; eliminate old unused targets; simplify project.4coder

This commit is contained in:
Ryan Fleury
2024-07-29 11:38:15 -07:00
parent 6bef60b306
commit 3a61a0363b
7 changed files with 46 additions and 248 deletions
+1 -1
View File
@@ -13589,7 +13589,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds)
//- rjf: exiting
case DF_CoreCmdKind_Exit:
{
{
// rjf: save
{
DF_CmdParams params = df_cmd_params_zero();
+1
View File
@@ -9100,6 +9100,7 @@ DF_VIEW_UI_FUNCTION_DEF(Settings)
DF_Palette(ws, DF_PaletteCode_NegativePopButton)
UI_CornerRadius(ui_top_font_size()*0.5f)
UI_FontSize(ui_top_font_size()*0.9f)
UI_TextAlignment(UI_TextAlign_Center)
ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DrawBackground, "Click Again To Apply");
}
}
+5 -4
View File
@@ -9,9 +9,6 @@
// C:/devel/bar, etc.
//
// [ ] auto-scroll output window
// [ ] inline breakpoint hit_count
// [ ] to count hit counts, resolve all bps to addresses, check addresses
// against stopper thread's
// [ ] theme lister -> fonts & font sizes
// [ ] "Browse..." buttons should adopt a more relevant starting search path,
// if possible
@@ -52,7 +49,6 @@
////////////////////////////////
//~ rjf: Hot, High Priority Tasks (Complete Unusability, Crashes, Fire-Worthy)
//
// [ ] PDB files distributed with the build are not found by DbgHelp!!!
// [ ] Jai compiler debugging crash
////////////////////////////////
@@ -420,6 +416,11 @@
// add what's under the MOUSE cursor instead of the keyboard cursor. Can
// we get a command for that so I can bind ALT-W to that instead?
// [x] editing multiple bindings for commands
// [x] inline breakpoint hit_count
// [x] to count hit counts, resolve all bps to addresses, check addresses
// against stopper thread's
//
// [x] PDB files distributed with the build are not found by DbgHelp!!!
#ifndef RADDBG_H
#define RADDBG_H
-60
View File
@@ -1,60 +0,0 @@
static int Static = 5;
namespace NS
{
static int staticDataInNS = 99;
struct A
{
static int staticData;
int a = 20;
int b = 30;
void Foo()
{
Static += 1;
staticDataInNS += 1;
staticData++;
a++;
b++;
}
};
int A::staticData = 123;
}
struct Resource
{
int resourceType;
};
struct Stack
{
Resource *resource;
};
struct StackNode
{
StackNode *next;
Stack v;
};
struct Context
{
StackNode *entry_stack_first;
};
int main(void)
{
Resource r_ = {0};
Resource *r = &r_;
Stack s = {r};
StackNode n_ = {0, s};
StackNode *n = &n_;
Context c_ = {n};
Context *context = &c_;
// evaluate `context.entry_stack_first.v.resource.resourceType == 0xd8`
int x = 0;
NS::A a = {0};
a.Foo();
return 0;
}
-59
View File
@@ -1,59 +0,0 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
// build with:
// cl /Zi /nologo look_at_raddbg.c
#include <windows.h>
#include <stdint.h>
#include "rdi_format/rdi_format.h"
#include "rdi_format/rdi_format_parse.h"
#include "rdi_format/rdi_format.c"
#include "rdi_format/rdi_format_parse.c"
int main(int argument_count, char **arguments)
{
// map raddbg file into address space
HANDLE file = CreateFileA("UnrealEditorFortnite.raddbg", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
DWORD size_hi32 = 0;
DWORD size_lo32 = GetFileSize(file, &size_hi32);
HANDLE map = CreateFileMappingA(file, 0, PAGE_READONLY, 0, 0, 0);
uint64_t data_size = (size_lo32 | ((uint64_t)size_hi32 << 32));
uint8_t *data = (uint8_t *)MapViewOfFile(map, FILE_MAP_READ, 0, 0, data_size);
// parse raw data as raddbg
RDI_Parsed rdi = {0};
RDI_ParseStatus parse_status = rdi_parse(data, data_size, &rdi);
// usage example: print out all procedure symbol names
#if 1
for(uint64_t procedure_idx = 0; procedure_idx < rdi.procedure_count; procedure_idx += 1)
{
RDI_Procedure *procedure = &rdi.procedures[procedure_idx];
uint64_t name_size = 0;
uint8_t *name = rdi_string_from_idx(&rdi, procedure->name_string_idx, &name_size);
printf("[%I64u] %.*s\n", procedure_idx, (int)name_size, name);
}
#endif
// usage example: print out all user-defined-type names
#if 0
for(uint64_t udt_idx = 0; udt_idx < rdi.udt_count; udt_idx += 1)
{
RDI_UDT *udt = &rdi.udts[udt_idx];
RDI_TypeNode *type = &rdi.type_nodes[udt->self_type_idx];
uint64_t name_size = 0;
uint8_t *name = rdi_string_from_idx(&rdi, type->user_defined.name_string_idx, &name_size);
printf("[%I64u] %.*s\n", udt_idx, (int)name_size, name);
}
#endif
// for getting more info, look at the `RDI_Parsed` structure. all data is
// represented as a bunch of flat plain-old-data tables. data which must
// reference other data uses indices into that other data's table. for
// example, given a `type_idx`, I will index into `rdi.type_nodes`. given a
// `udt_idx`, I will index into `rdi.udts`. given a `scope_idx`, I will
// index into `rdi.scopes`. and so on.
return 0;
}