stub out demon/fontprovider so we can build debugger

This commit is contained in:
Ryan Fleury
2025-05-10 14:27:55 -07:00
parent b52e3be5ae
commit 3fd1f9d255
10 changed files with 86 additions and 15 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ fi
# --- Build Everything (@build_targets) ---------------------------------------
cd build
if [ -v raddbg ]; then didbuild=1 && $compile ../src/raddbg/raddbg_main.c $compile_link $link_os_gfx $out raddbg; fi
if [ -v raddbg ]; then didbuild=1 && $compile ../src/raddbg/raddbg_main.c $compile_link $link_os_gfx $link_render $out raddbg; fi
if [ -v radlink ]; then didbuild=1 && $compile ../src/linker/lnk.c $compile_link $out radlink; fi
if [ -v rdi_from_pdb ]; then didbuild=1 && $compile ../src/rdi_from_pdb/rdi_from_pdb_main.c $compile_link $out rdi_from_pdb; fi
if [ -v rdi_from_dwarf ]; then didbuild=1 && $compile ../src/rdi_from_dwarf/rdi_from_dwarf.c $compile_link $out rdi_from_dwarf; fi
+2 -2
View File
@@ -55,12 +55,12 @@ commands =
// .f1 = { .win = "raddbg_stable --ipc kill_all && build no_meta tester", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
//- rjf: [ryan_scratch]
.f1 = { .win = "raddbg_stable --ipc kill_all && wsl ./build.sh ryan_scratch", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
.f1 = { .win = "raddbg_stable --ipc kill_all && wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
//- rjf: running target
// .f3 = { .win = "raddbg_stable --ipc run", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
// .f3 = { .win = "C:/devel/raddebugger/build/raddbg.exe --capture --user:C:/devel/raddebugger/build/local_dev.raddbg_user --project:C:/devel/raddebugger/build/local_dev.raddbg_project", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
.f3 = { .win = "wsl_launch /mnt/c/devel/raddebugger/build/ryan_scratch", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
.f3 = { .win = "wsl_launch /mnt/c/devel/raddebugger/build/raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
//- rjf: local target builds
.build_raddbg = { .win = "build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
+3 -3
View File
@@ -49,12 +49,12 @@ internal void log_select(Log *log);
internal void log_msg(LogMsgKind kind, String8 string);
internal void log_msgf(LogMsgKind kind, char *fmt, ...);
#define log_info(s) log_msg(LogMsgKind_Info, (s))
#define log_infof(fmt, ...) log_msgf(LogMsgKind_Info, (fmt), __VA_ARGS__)
#define log_infof(...) log_msgf(LogMsgKind_Info, __VA_ARGS__)
#define log_user_error(s) log_msg(LogMsgKind_UserError, (s))
#define log_user_errorf(fmt, ...) log_msgf(LogMsgKind_UserError, (fmt), __VA_ARGS__)
#define log_user_errorf(...) log_msgf(LogMsgKind_UserError, __VA_ARGS__)
#define LogInfoNamedBlock(s) DeferLoop(log_infof("%S:\n{\n", (s)), log_infof("}\n"))
#define LogInfoNamedBlockF(fmt, ...) DeferLoop((log_infof(fmt, __VA_ARGS__), log_infof(":\n{\n")), log_infof("}\n"))
#define LogInfoNamedBlockF(...) DeferLoop((log_infof(__VA_ARGS__), log_infof(":\n{\n")), log_infof("}\n"))
////////////////////////////////
//~ rjf: Log Scopes
+1 -1
View File
@@ -3928,7 +3928,7 @@ ctrl_thread__module_open(CTRL_Handle process, CTRL_Handle module, Rng1U64 vaddr_
dmn_process_read(process.dmn_handle, r1u64(vaddr_range.min + sec_array_off, vaddr_range.min + sec_array_off + sec_count*sizeof(COFF_SectionHeader)), sec);
for EachIndex(idx, sec_count)
{
String8 section_name = str8_cstring(sec[idx].name);
String8 section_name = str8_cstring((char *)sec[idx].name);
if(str8_match(section_name, str8_lit(".raddbg"), 0))
{
raddbg_section_voff_range.min = sec[idx].voff;
+21
View File
@@ -15,6 +15,8 @@ dmn_init(void)
internal DMN_CtrlCtx *
dmn_ctrl_begin(void)
{
DMN_CtrlCtx *ctx = (DMN_CtrlCtx *)1;
return ctx;
}
internal void
@@ -30,26 +32,32 @@ dmn_ctrl_exclusive_access_end(void)
internal U32
dmn_ctrl_launch(DMN_CtrlCtx *ctx, OS_ProcessLaunchParams *params)
{
return 0;
}
internal B32
dmn_ctrl_attach(DMN_CtrlCtx *ctx, U32 pid)
{
return 0;
}
internal B32
dmn_ctrl_kill(DMN_CtrlCtx *ctx, DMN_Handle process, U32 exit_code)
{
return 0;
}
internal B32
dmn_ctrl_detach(DMN_CtrlCtx *ctx, DMN_Handle process)
{
return 0;
}
internal DMN_EventList
dmn_ctrl_run(Arena *arena, DMN_CtrlCtx *ctx, DMN_RunCtrls *ctrls)
{
DMN_EventList evts = {0};
return evts;
}
////////////////////////////////
@@ -68,16 +76,19 @@ dmn_halt(U64 code, U64 user_data)
internal U64
dmn_run_gen(void)
{
return 0;
}
internal U64
dmn_mem_gen(void)
{
return 0;
}
internal U64
dmn_reg_gen(void)
{
return 0;
}
//- rjf: non-blocking-control-thread access barriers
@@ -85,6 +96,7 @@ dmn_reg_gen(void)
internal B32
dmn_access_open(void)
{
return 0;
}
internal void
@@ -97,6 +109,7 @@ dmn_access_close(void)
internal U64
dmn_process_memory_reserve(DMN_Handle process, U64 vaddr, U64 size)
{
return 0;
}
internal void
@@ -122,11 +135,13 @@ dmn_process_memory_protect(DMN_Handle process, U64 vaddr, U64 size, OS_AccessFla
internal U64
dmn_process_read(DMN_Handle process, Rng1U64 range, void *dst)
{
return 0;
}
internal B32
dmn_process_write(DMN_Handle process, Rng1U64 range, void *src)
{
return 0;
}
//- rjf: threads
@@ -134,26 +149,31 @@ dmn_process_write(DMN_Handle process, Rng1U64 range, void *src)
internal Arch
dmn_arch_from_thread(DMN_Handle handle)
{
return Arch_Null;
}
internal U64
dmn_stack_base_vaddr_from_thread(DMN_Handle handle)
{
return 0;
}
internal U64
dmn_tls_root_vaddr_from_thread(DMN_Handle handle)
{
return 0;
}
internal B32
dmn_thread_read_reg_block(DMN_Handle handle, void *reg_block)
{
return 0;
}
internal B32
dmn_thread_write_reg_block(DMN_Handle handle, void *reg_block)
{
return 0;
}
//- rjf: system process listing
@@ -166,6 +186,7 @@ dmn_process_iter_begin(DMN_ProcessIter *iter)
internal B32
dmn_process_iter_next(Arena *arena, DMN_ProcessIter *iter, DMN_ProcessInfo *info_out)
{
return 0;
}
internal void
+2
View File
@@ -5,6 +5,8 @@
#if FP_BACKEND == FP_BACKEND_DWRITE
# include "dwrite/font_provider_dwrite.c"
#elif FP_BACKEND == FP_BACKEND_FREETYPE
# include "freetype/font_provider_freetype.c"
#else
# error Font provider backend not specified.
#endif
@@ -1,2 +1,44 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
////////////////////////////////
//~ rjf: Backend Implementations
fp_hook void
fp_init(void)
{
}
fp_hook FP_Handle
fp_font_open(String8 path)
{
FP_Handle f = {0};
return f;
}
fp_hook FP_Handle
fp_font_open_from_static_data_string(String8 *data_ptr)
{
FP_Handle f = {0};
return f;
}
fp_hook void
fp_font_close(FP_Handle handle)
{
}
fp_hook FP_Metrics
fp_metrics_from_font(FP_Handle font)
{
FP_Metrics m = {0};
return m;
}
fp_hook NO_ASAN FP_RasterResult
fp_raster(Arena *arena, FP_Handle font, F32 size, FP_RasterFlags flags, String8 string)
{
FP_RasterResult r = {0};
return r;
}
+1 -1
View File
@@ -277,7 +277,7 @@ os_client_rect_from_window(OS_Handle handle)
OS_LNX_Window *w = (OS_LNX_Window *)handle.u64[0];
XWindowAttributes atts = {0};
Status s = XGetWindowAttributes(os_lnx_gfx_state->display, w->window, &atts);
Rng2F32 result = r2f32p((F32)atts.x, (F32)atts.y, (F32)atts.x + (F32)atts.width, (F32)atts.y + (F32)atts.height);
Rng2F32 result = r2f32p(0, 0, (F32)atts.width, (F32)atts.height);
return result;
}
+7 -7
View File
@@ -2243,13 +2243,13 @@ rd_commit_eval_value_string(E_Eval dst_eval, String8 string)
// new value string as textual data
if(!got_commit_data &&
((type_kind == E_TypeKind_Ptr || type_kind == E_TypeKind_Array) &&
direct_type_kind == E_TypeKind_Char8 ||
direct_type_kind == E_TypeKind_Char16 ||
direct_type_kind == E_TypeKind_Char32 ||
direct_type_kind == E_TypeKind_UChar8 ||
direct_type_kind == E_TypeKind_UChar16 ||
direct_type_kind == E_TypeKind_UChar32 ||
e_type_kind_is_integer(direct_type_kind)))
(direct_type_kind == E_TypeKind_Char8 ||
direct_type_kind == E_TypeKind_Char16 ||
direct_type_kind == E_TypeKind_Char32 ||
direct_type_kind == E_TypeKind_UChar8 ||
direct_type_kind == E_TypeKind_UChar16 ||
direct_type_kind == E_TypeKind_UChar32 ||
e_type_kind_is_integer(direct_type_kind))))
{
got_commit_data = 1;
B32 is_quoted = 0;
+6
View File
@@ -14,11 +14,17 @@
#include "base/base_inc.h"
#include "os/os_inc.h"
#include "render/render_inc.h"
#include "font_provider/font_provider_inc.h"
#include "font_cache/font_cache.h"
#include "draw/draw.h"
//- rjf: [c]
#include "base/base_inc.c"
#include "os/os_inc.c"
#include "render/render_inc.c"
#include "font_provider/font_provider_inc.c"
#include "font_cache/font_cache.c"
#include "draw/draw.c"
////////////////////////////////
//~ rjf: Globals