From c1309e29484a84e2692e66849c4fe108222962b0 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 26 Aug 2026 14:56:24 -0700 Subject: [PATCH] rdi_from_dwarf: readjust struct hashing, avoid following member ptrs for now --- CHANGELOG.md | 13 +++++++++++++ project.4coder | 2 +- src/mule/mule_main.cpp | 2 -- src/raddbg/raddbg_main.c | 2 +- src/rdi_from_dwarf/rdi_from_dwarf.c | 15 +++++++++------ 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a0f45a7..6c69c219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +# v0.9.29-alpha + +## Debugger Changes +- Reintroduced `Browse` buttons for cells that edit file paths, which spawn a + file picker, to more conveniently choose paths. +- The debugger now tags watch expressions with the selected project, which + means they'll be loaded and unloaded along with projects, similar to targets + and breakpoints. +- Empty spaces in the leftmost margin (where the selected thread position is + visualized) in source and disassembly views is now clickable, as a fastpath + for `Run To Line`. +- The position of the destination of a `Run To Line` command is now visualized. + # v0.9.28-alpha ## Debugger Changes diff --git a/project.4coder b/project.4coder index b653e386..b286935f 100644 --- a/project.4coder +++ b/project.4coder @@ -49,7 +49,7 @@ commands = // .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, // .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg debug telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, // .f1 = { .win = "raddbg_stable --ipc kill_all && build radbin", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, - .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg debug", .linux = "./build.sh raddbg", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, + .f1 = { .win = "raddbg_stable --ipc kill_all && build radbin telemetry debug", .linux = "./build.sh raddbg", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, //- rjf: [raddbg wsl] // .f1 = { .win = "wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, diff --git a/src/mule/mule_main.cpp b/src/mule/mule_main.cpp index f5b92f00..2d8e933c 100644 --- a/src/mule/mule_main.cpp +++ b/src/mule/mule_main.cpp @@ -459,8 +459,6 @@ type_coverage_eval_tests(void) const char const_string_array[] = "Hello, World!"; const char *const const_ptr_const_string = "Hello, World!"; - char *test = ")"; - MyByte *non_string_byte_ptr = "Hello, World!"; void *pointer = &basics; diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index f7b47811..3e419070 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -87,7 +87,7 @@ // [ ] memory_size(...) view for quickly evaluating memory sizes // [ ] value coloring view in watch window, so you can quickly scroll & see values outside of a threshold // -// [ ] more things should move to user data, but project-tagged - like +// [x] more things should move to user data, but project-tagged - like // recent files, watches?, etc. // // [ ] linux/dwarf fixes diff --git a/src/rdi_from_dwarf/rdi_from_dwarf.c b/src/rdi_from_dwarf/rdi_from_dwarf.c index a17a535a..7fc368f0 100644 --- a/src/rdi_from_dwarf/rdi_from_dwarf.c +++ b/src/rdi_from_dwarf/rdi_from_dwarf.c @@ -1624,18 +1624,18 @@ d2r_convert(Arena *arena, D2R_ConvertParams *params) top_task->dependency_count = already_computed_dependency_count; } + //- rjf: unpack task's unit + Rng1U64 unit_info_tag_range = unit_info_tag_ranges[top_task->unit_idx]; + DW2_ParseCtx *unit_parse_ctx = &unit_parse_ctxs[top_task->unit_idx]; + //- rjf: determine if we're done with this hash - B32 done = (found_already_computed_hash || (top_task->depth == 0 && top_task->start_off != top_task->off)); + B32 done = (found_already_computed_hash || (top_task->depth == 0 && top_task->start_off != top_task->off) || !contains_1u64(unit_info_tag_range, top_task->off)); //- rjf: if we're not done -> continue contributing to the task's hash if(!done) { Temp tag_scratch = scratch_begin(&dedup_root_scratch.arena, 1); - // rjf: unpack unit - Rng1U64 unit_info_tag_range = unit_info_tag_ranges[top_task->unit_idx]; - DW2_ParseCtx *unit_parse_ctx = &unit_parse_ctxs[top_task->unit_idx]; - // rjf: read next tag DW2_Tag tag = {0}; U64 start_off = top_task->off; @@ -1707,7 +1707,10 @@ d2r_convert(Arena *arena, D2R_ConvertParams *params) // rjf: unpack type reference in this tag DW2_Attrib *type_attrib = &dw2_attrib_nil; U64 type_info_off = 0; - if(include_tag_in_hash) + if(include_tag_in_hash && (!top_task->is_member || (tag.kind != DW_TagKind_PointerType && + tag.kind != DW_TagKind_PtrToMemberType && + tag.kind != DW_TagKind_ReferenceType && + tag.kind != DW_TagKind_RValueReferenceType))) { type_attrib = dw2_attrib_from_kind(&tag, DW_AttribKind_Type); type_info_off = dw2_reference_info_off_from_form_val(unit_parse_ctx, &type_attrib->val);