Skip to content

Commit b1a91b8

Browse files
committed
adjust expiration timeouts for searches; fix unnecessary lowercasing when generating paths from pdbs
1 parent 7a5784b commit b1a91b8

File tree

4 files changed

+49
-20
lines changed

4 files changed

+49
-20
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# v0.9.24-alpha
2+
3+
## Debugger Changes
4+
5+
- Added the ability for the debugger to load, use, and evaluate using debug
6+
info, even when not actively debugging. The debugger will now keep a process'
7+
debug info loaded, even after the process ends. It stores the set of loaded
8+
debug info files in the project configuration file, meaning it will also
9+
automatically load the same debug info across many runs. Debug info can also
10+
be loaded manually (without ever launching a process) with the
11+
`Load Debug Info` command. There is also a new tab, `Debug Info`, which allows
12+
viewing and managing the set of loaded debug info files.
13+
- Improved the debugger's behavior when used as a drag & drop target, to allow
14+
for debug info loading as an option (when relevant), and to better handle the
15+
case where many files (potentially of different types) are dropped together.
16+
- Improved debug info searching performance and reponsiveness in large projects.
17+
- Fixed some crashes and incorrect results with the new `list` view.
18+
- Fixed some cases where RDIs did not contain some basic types from their
19+
originating PDBs.
20+
- Allowed `.` and `->` operators to be used with array types.
21+
- Fixed the debugger's treatment of quoted command line arguments when building
22+
targets. In previous versions, calling `raddbg main.exe "foo bar baz"` would
23+
create a target `main.exe` with arguments `foo bar baz` (dropping the quotes).
24+
This is now fixed, such that the target's arguments string will also contain
25+
the quotes, and pass them to the target when launched.
26+
- Fixed the debugger not correctly responding (through font and UI scale) to DPI
27+
changes.
28+
- Other small fixes, improvements, and tweaks.
29+
130
# v0.9.23-alpha
231

332
## Debugger Changes

src/base/base_thread_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ internal void access_touch(Access *access, AccessPt *pt, CondVar cv);
120120

121121
//- rjf: access points
122122
internal B32 access_pt_is_expired_(AccessPt *pt, AccessPtExpireParams *params);
123-
#define access_pt_is_expired(pt, ...) access_pt_is_expired_((pt), &(AccessPtExpireParams){.time = 2000000, .update_idxs = 10, __VA_ARGS__})
123+
#define access_pt_is_expired(pt, ...) access_pt_is_expired_((pt), &(AccessPtExpireParams){.time = 2000000, .update_idxs = 2, __VA_ARGS__})
124124

125125
//- rjf: progress counters
126126
#define set_progress_ptr(ptr) (tctx_selected()->progress_counter_ptr = (ptr))

src/dbg_info/dbg_info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ di_search_item_array_from_target_query(Access *access, RDI_SectionKind target, S
15041504
String8 key = str8_list_join(scratch.arena, &key_parts, 0);
15051505

15061506
// rjf: get artifact
1507-
AC_Artifact artifact = ac_artifact_from_key(access, key, di_search_artifact_create, di_search_artifact_destroy, endt_us, .gen = di_load_gen(), .flags = AC_Flag_Wide, .stale_out = stale_out);
1507+
AC_Artifact artifact = ac_artifact_from_key(access, key, di_search_artifact_create, di_search_artifact_destroy, endt_us, .gen = di_load_gen(), .flags = AC_Flag_Wide, .evict_threshold_us = 100000, .stale_out = stale_out);
15081508

15091509
// rjf: unpack artifact
15101510
result.v = (DI_SearchItem *)artifact.u64[2];

src/rdi_from_pdb/rdi_from_pdb.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,30 +1002,30 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
10021002
checksum_value.size = Min(checksum->len, checksum_value.size);
10031003
}
10041004

1005-
// rjf: file name -> normalized file path
1006-
String8 file_path = seq_file_name;
1007-
String8 file_path_normalized = lower_from_str8(scratch2.arena, str8_skip_chop_whitespace(file_path));
1005+
// rjf: file name -> sanitized file path
1006+
String8 file_path = seq_file_name;
1007+
String8 file_path_sanitized = str8_copy(scratch2.arena, str8_skip_chop_whitespace(file_path));
10081008
{
1009-
PathStyle file_path_normalized_style = path_style_from_str8(file_path_normalized);
1010-
String8List file_path_normalized_parts = str8_split_path(scratch2.arena, file_path_normalized);
1011-
if(file_path_normalized_style == PathStyle_Relative)
1009+
PathStyle file_path_sanitized_style = path_style_from_str8(file_path_sanitized);
1010+
String8List file_path_sanitized_parts = str8_split_path(scratch2.arena, file_path_sanitized);
1011+
if(file_path_sanitized_style == PathStyle_Relative)
10121012
{
10131013
String8List obj_folder_path_parts = str8_split_path(scratch2.arena, obj_folder_path);
1014-
str8_list_concat_in_place(&obj_folder_path_parts, &file_path_normalized_parts);
1015-
file_path_normalized_parts = obj_folder_path_parts;
1016-
file_path_normalized_style = path_style_from_str8(obj_folder_path);
1014+
str8_list_concat_in_place(&obj_folder_path_parts, &file_path_sanitized_parts);
1015+
file_path_sanitized_parts = obj_folder_path_parts;
1016+
file_path_sanitized_style = path_style_from_str8(obj_folder_path);
10171017
}
1018-
str8_path_list_resolve_dots_in_place(&file_path_normalized_parts, file_path_normalized_style);
1019-
file_path_normalized = str8_path_list_join_by_style(scratch2.arena, &file_path_normalized_parts, file_path_normalized_style);
1018+
str8_path_list_resolve_dots_in_place(&file_path_sanitized_parts, file_path_sanitized_style);
1019+
file_path_sanitized = str8_path_list_join_by_style(scratch2.arena, &file_path_sanitized_parts, file_path_sanitized_style);
10201020
}
10211021

1022-
// rjf: normalized file path -> source file node
1023-
U64 file_path_normalized_hash = rdi_hash(file_path_normalized.str, file_path_normalized.size);
1024-
U64 hit_path_slot = file_path_normalized_hash%hit_path_slots_count;
1022+
// rjf: sanitized file path -> source file node
1023+
U64 file_path_sanitized_hash = rdi_hash(file_path_sanitized.str, file_path_sanitized.size);
1024+
U64 hit_path_slot = file_path_sanitized_hash%hit_path_slots_count;
10251025
String8Node *hit_path_node = 0;
10261026
for(String8Node *n = hit_path_slots[hit_path_slot]; n != 0; n = n->next)
10271027
{
1028-
if(str8_match(n->string, file_path_normalized, 0))
1028+
if(str8_match(n->string, file_path_sanitized, 0))
10291029
{
10301030
hit_path_node = n;
10311031
break;
@@ -1035,11 +1035,11 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
10351035
{
10361036
hit_path_node = push_array(scratch2.arena, String8Node, 1);
10371037
SLLStackPush(hit_path_slots[hit_path_slot], hit_path_node);
1038-
hit_path_node->string = file_path_normalized;
1039-
P2R_SrcFileStubNode *stub_n = push_array(scratch.arena, P2R_SrcFileStubNode, 1);
1038+
hit_path_node->string = file_path_sanitized;
1039+
P2R_SrcFileStubNode *stub_n = push_array(scratch2.arena, P2R_SrcFileStubNode, 1);
10401040
SLLQueuePush(first_src_file_stub, last_src_file_stub, stub_n);
10411041
src_file_stub_count += 1;
1042-
stub_n->v.file_path = str8_copy(scratch.arena, file_path_normalized);
1042+
stub_n->v.file_path = str8_copy(scratch.arena, file_path_sanitized);
10431043
stub_n->v.checksum_kind = checksum_kind;
10441044
stub_n->v.checksum = str8_copy(scratch.arena, checksum_value);
10451045
}

0 commit comments

Comments
 (0)