mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-07 08:25:41 +00:00
extend dbgi matching system with preferred dbgi key, to disambiguate results - fill with primary module dbgi in eval, to always prefer selected thread context when applicable
This commit is contained in:
@@ -570,6 +570,7 @@ struct E_ConsTypeSlot
|
||||
typedef struct E_Module E_Module;
|
||||
struct E_Module
|
||||
{
|
||||
DI_Key dbgi_key;
|
||||
RDI_Parsed *rdi;
|
||||
Rng1U64 vaddr_range;
|
||||
Arch arch;
|
||||
@@ -1111,7 +1112,7 @@ read_only global E_String2ExprMap e_string2expr_map_nil = {0};
|
||||
read_only global E_Expr e_expr_nil = {&e_expr_nil, &e_expr_nil, &e_expr_nil, &e_expr_nil, &e_expr_nil};
|
||||
read_only global E_IRNode e_irnode_nil = {&e_irnode_nil, &e_irnode_nil, &e_irnode_nil};
|
||||
read_only global E_Eval e_eval_nil = {{0}, {0}, {0}, &e_expr_nil, {&e_irnode_nil}};
|
||||
read_only global E_Module e_module_nil = {&rdi_parsed_nil};
|
||||
read_only global E_Module e_module_nil = {{0}, &rdi_parsed_nil};
|
||||
read_only global E_CacheBundle e_cache_bundle_nil = {0, {0}, {0}, {0}, {{0}, 0, &e_expr_nil, &e_expr_nil}, {&e_irnode_nil}};
|
||||
thread_static E_BaseCtx *e_base_ctx = 0;
|
||||
thread_static E_IRCtx *e_ir_ctx = 0;
|
||||
|
||||
+2
-2
@@ -1871,7 +1871,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
||||
Access *access = access_open();
|
||||
|
||||
// rjf: find match
|
||||
DI_Match match = di_match_from_string(string, 0, 0);
|
||||
DI_Match match = di_match_from_string(string, 0, e_base_ctx->primary_module->dbgi_key, 0);
|
||||
if(match.idx == 0)
|
||||
{
|
||||
String8List namespaceified_strings = {0};
|
||||
@@ -1900,7 +1900,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
||||
}
|
||||
for(String8Node *n = namespaceified_strings.first; n != 0; n = n->next)
|
||||
{
|
||||
match = di_match_from_string(n->string, 0, 0);
|
||||
match = di_match_from_string(n->string, 0, e_base_ctx->primary_module->dbgi_key, 0);
|
||||
if(match.idx != 0)
|
||||
{
|
||||
break;
|
||||
|
||||
@@ -585,7 +585,7 @@ e_leaf_type_key_from_name(String8 name)
|
||||
E_TypeKey key = e_leaf_builtin_type_key_from_name(name);
|
||||
if(!e_type_key_match(e_type_key_zero(), key))
|
||||
{
|
||||
DI_Match match = di_match_from_string(name, 0, 0);
|
||||
DI_Match match = di_match_from_string(name, 0, e_base_ctx->primary_module->dbgi_key, 0);
|
||||
if(match.section_kind == RDI_SectionKind_TypeNodes)
|
||||
{
|
||||
Access *access = access_open();
|
||||
|
||||
Reference in New Issue
Block a user