mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 14:58:08 +00:00
if regrel32 is marked as being outside the procedure frame, and if it has no type info, it seems that compilers generate that case to encode return variables which exist outside a procedure's frame, in which case we can make up the difference by grabbing the return type from the containing procedure type. this does not break existing valid cases, but may not be the fully correct rule.
This commit is contained in:
@@ -2560,6 +2560,16 @@ ASYNC_WORK_DEF(p2r_symbol_stream_convert_work)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(rjf): is this correct?
|
||||
// rjf: redirect type, if 0, and if outside frame, to the return type of the
|
||||
// containing procedure
|
||||
if(local_kind == RDI_LocalKind_Parameter && regrel32->itype == 0 &&
|
||||
top_scope_node->scope->symbol != 0 &&
|
||||
top_scope_node->scope->symbol->type != 0)
|
||||
{
|
||||
type = top_scope_node->scope->symbol->type->direct_type;
|
||||
}
|
||||
|
||||
// rjf: build local
|
||||
RDIM_Scope *scope = top_scope_node->scope;
|
||||
RDIM_Local *local = rdim_scope_push_local(arena, &sym_scopes, scope);
|
||||
|
||||
Reference in New Issue
Block a user