mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 09:18:09 +00:00
sort global symbols deterministically within GSI bucket
This commit is contained in:
@@ -1839,6 +1839,7 @@ THREAD_POOL_TASK_FUNC(lnk_move_global_symbols_to_gsi)
|
||||
CV_SymbolNode *n = &nodes[i];
|
||||
n->prev = n->next = 0;
|
||||
n->data = cv_symbol_from_ptr(symbol_arr[i]);
|
||||
n->data.offset = i;
|
||||
gsi_push_(gsi, symbol_hashes[i], n);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1827,7 +1827,11 @@ gsi_symbol_is_before(void *raw_a, void *raw_b)
|
||||
if (a_name.size != b_name.size) {
|
||||
is_before = a_name.size < b_name.size;
|
||||
} else {
|
||||
is_before = str8_compar_ignore_case(&a_name, &b_name) < 0;
|
||||
int cmp = str8_compar_ignore_case(&a_name, &b_name);
|
||||
if (cmp == 0) {
|
||||
cmp = u64_compar(&a->offset, &b->offset);
|
||||
}
|
||||
is_before = cmp < 0;
|
||||
}
|
||||
|
||||
return is_before;
|
||||
|
||||
Reference in New Issue
Block a user