Skip to content

Commit 1ffd662

Browse files
committed
do case/slash insensitive search for filename references for breakpoint disqualification - we can *not* use the string table hash, since paths may disagree on casing
1 parent cb657aa commit 1ffd662

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/pdb/pdb_parse.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,21 +1138,19 @@ pdb_has_file_ref(String8 msf_data, String8List file_list, MSF_RawStreamTable *st
11381138
PDB_Strtbl *strtbl = pdb_strtbl_from_data(scratch.arena, strtbl_data);
11391139
if(strtbl->bucket_count != 0)
11401140
{
1141-
for(String8Node *file_n = file_list.first; file_n != 0; file_n = file_n->next)
1141+
for EachIndex(idx, strtbl->bucket_count)
11421142
{
1143-
Temp temp = temp_begin(scratch.arena);
1144-
String8 path = file_n->string;
1145-
String8 path_pdbstyle = path_convert_slashes(temp.arena, path, PathStyle_WindowsAbsolute);
1146-
String8 path_pdbstyle_lower = lower_from_str8(temp.arena, path_pdbstyle);
1147-
U32 off1 = pdb_strtbl_off_from_string(strtbl, path_pdbstyle);
1148-
U32 off2 = pdb_strtbl_off_from_string(strtbl, path_pdbstyle_lower);
1149-
temp_end(temp);
1150-
if(off1 != max_U32 || off2 != max_U32)
1143+
String8 stored_string = pdb_strtbl_string_from_index(strtbl, idx);
1144+
for(String8Node *file_n = file_list.first; file_n != 0; file_n = file_n->next)
11511145
{
1152-
has_ref = 1;
1153-
break;
1146+
if(str8_match(file_n->string, stored_string, StringMatchFlag_CaseInsensitive|StringMatchFlag_SlashInsensitive))
1147+
{
1148+
has_ref = 1;
1149+
goto dbl_break;
1150+
}
11541151
}
11551152
}
1153+
dbl_break:;
11561154
}
11571155
}
11581156
}

0 commit comments

Comments
 (0)