mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-26 05:25:00 -07:00
pending thread names in ctrl entity system, for cases where a thread name is established before the thread is reported as being created, and the id is used to correllate
This commit is contained in:
@@ -14,6 +14,7 @@ CTRL_EntityKindTable:
|
||||
{Module "Module" }
|
||||
{EntryPoint "Entry Point" }
|
||||
{DebugInfoPath "Debug Info Path" }
|
||||
{PendingThreadName "Pending Thread Name" }
|
||||
}
|
||||
|
||||
@enum CTRL_EntityKind:
|
||||
|
||||
+20
-1
@@ -1146,6 +1146,16 @@ ctrl_entity_store_apply_events(CTRL_EntityStore *store, CTRL_EventList *list)
|
||||
{
|
||||
ctrl_entity_equip_string(store, thread, str8_lit("main_thread"));
|
||||
}
|
||||
CTRL_EntityList pending_thread_names = ctrl_entity_list_from_kind(store, CTRL_EntityKind_PendingThreadName);
|
||||
for(CTRL_EntityNode *n = pending_thread_names.first; n != 0; n = n->next)
|
||||
{
|
||||
if(n->v->id == event->entity_id)
|
||||
{
|
||||
ctrl_entity_equip_string(store, thread, n->v->string);
|
||||
ctrl_entity_release(store, n->v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
thread->stack_base = event->stack_base;
|
||||
ctrl_query_cached_rip_from_thread(store, event->entity);
|
||||
}break;
|
||||
@@ -1156,8 +1166,17 @@ ctrl_entity_store_apply_events(CTRL_EntityStore *store, CTRL_EventList *list)
|
||||
}break;
|
||||
case CTRL_EventKind_ThreadName:
|
||||
{
|
||||
CTRL_Entity *process = ctrl_entity_from_handle(store, event->parent);
|
||||
CTRL_Entity *thread = ctrl_entity_from_handle(store, event->entity);
|
||||
ctrl_entity_equip_string(store, thread, event->string);
|
||||
if(thread != &ctrl_entity_nil)
|
||||
{
|
||||
ctrl_entity_equip_string(store, thread, event->string);
|
||||
}
|
||||
else
|
||||
{
|
||||
CTRL_Entity *pending_name = ctrl_entity_alloc(store, process, CTRL_EntityKind_PendingThreadName, Arch_Null, ctrl_handle_zero(), event->entity_id);
|
||||
ctrl_entity_equip_string(store, pending_name, event->string);
|
||||
}
|
||||
}break;
|
||||
case CTRL_EventKind_ThreadColor:
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//- GENERATED CODE
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
String8 ctrl_entity_kind_display_string_table[8] =
|
||||
String8 ctrl_entity_kind_display_string_table[9] =
|
||||
{
|
||||
{0},
|
||||
str8_lit_comp("Root"),
|
||||
@@ -14,6 +14,7 @@ str8_lit_comp("Thread"),
|
||||
str8_lit_comp("Module"),
|
||||
str8_lit_comp("EntryPoint"),
|
||||
str8_lit_comp("DebugInfoPath"),
|
||||
str8_lit_comp("PendingThreadName"),
|
||||
};
|
||||
|
||||
U32 ctrl_exception_code_kind_code_table[38] =
|
||||
|
||||
@@ -16,6 +16,7 @@ CTRL_EntityKind_Thread,
|
||||
CTRL_EntityKind_Module,
|
||||
CTRL_EntityKind_EntryPoint,
|
||||
CTRL_EntityKind_DebugInfoPath,
|
||||
CTRL_EntityKind_PendingThreadName,
|
||||
CTRL_EntityKind_COUNT,
|
||||
} CTRL_EntityKind;
|
||||
|
||||
@@ -63,7 +64,7 @@ CTRL_ExceptionCodeKind_COUNT,
|
||||
} CTRL_ExceptionCodeKind;
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
extern String8 ctrl_entity_kind_display_string_table[8];
|
||||
extern String8 ctrl_entity_kind_display_string_table[9];
|
||||
extern U32 ctrl_exception_code_kind_code_table[38];
|
||||
extern String8 ctrl_exception_code_kind_display_string_table[38];
|
||||
extern String8 ctrl_exception_code_kind_lowercase_code_string_table[38];
|
||||
|
||||
Reference in New Issue
Block a user