mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 09:18:09 +00:00
minidump format types; open crash dump command, stub out opening path in control thread; expand d_handles to support machine id, entity id, *and* 'controller kind', which can be either a dump file or a demon - this properly separates the true process control abstraction (demon) from opening a regular dump file on any machine, which will let us trivially support any kind of dump file on any platform; also fix bad cfg tree state leak
This commit is contained in:
@@ -649,13 +649,13 @@ cfg_node_release(CFG_State *state, CFG_Node *node)
|
||||
for(CFG_NodePtrNode *n = nodes.first; n != 0; n = n->next)
|
||||
{
|
||||
CFG_Node *c = n->v;
|
||||
U64 hash = u64_hash_from_str8(str8_struct(&c->id));
|
||||
U64 slot_idx = hash%state->ctx.id_slots_count;
|
||||
cfg_string_release(state, c->string);
|
||||
SLLStackPush(state->free, c);
|
||||
c->first = c->last = c->prev = c->parent = 0;
|
||||
c->id = 0;
|
||||
c->string = str8_zero();
|
||||
U64 hash = u64_hash_from_str8(str8_struct(&c->id));
|
||||
U64 slot_idx = hash%state->ctx.id_slots_count;
|
||||
for(CFG_NodePtrNode *n = state->ctx.id_slots[slot_idx].first; n != 0; n = n->next)
|
||||
{
|
||||
if(n->v == c)
|
||||
|
||||
@@ -50,6 +50,9 @@ D_CmdTable: // | | | |
|
||||
|
||||
//- rjf: attaching
|
||||
{Attach 1 1 0 0 "query:unattached_processes" PID null Nil Null 0 0 0 0 0 1 1 Null "attach" "Attach" "Attaches to a process that is already running on the local machine." "" "" }
|
||||
|
||||
//- rjf: crash dump opening
|
||||
{OpenCrashDump 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 0 0 0 0 0 1 1 Null "open_crash_dump" "Open Crash Dump" "Opens a crash dump file and recreates debuggee state at the time of the crash." "" "" }
|
||||
}
|
||||
|
||||
@enum D_CmdKind:
|
||||
|
||||
@@ -8,7 +8,13 @@
|
||||
//~ rjf: ID Types
|
||||
|
||||
typedef U64 D_MsgID;
|
||||
typedef U64 D_MachineID;
|
||||
typedef U32 D_MachineID;
|
||||
typedef U32 D_ControllerKind;
|
||||
enum
|
||||
{
|
||||
D_ControllerKind_Demon,
|
||||
D_ControllerKind_Dump,
|
||||
};
|
||||
|
||||
#define D_MachineID_Local (1)
|
||||
|
||||
@@ -19,7 +25,8 @@ typedef struct D_Handle D_Handle;
|
||||
struct D_Handle
|
||||
{
|
||||
D_MachineID machine_id;
|
||||
DMN_Handle dmn_handle;
|
||||
D_ControllerKind controller_kind;
|
||||
U64 entity_id;
|
||||
};
|
||||
|
||||
typedef struct D_HandleNode D_HandleNode;
|
||||
@@ -227,6 +234,21 @@ struct D_EntityCtxLookupAccel
|
||||
U64 entity_kind_arrays_gens[D_EntityKind_COUNT];
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Opened Dump Cache Types
|
||||
|
||||
typedef struct D_DumpNode D_DumpNode;
|
||||
struct D_DumpNode
|
||||
{
|
||||
D_DumpNode *next;
|
||||
D_DumpNode *prev;
|
||||
D_Handle process;
|
||||
File file;
|
||||
FileProperties props;
|
||||
FileMap map;
|
||||
void *base;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Tick Input Types
|
||||
|
||||
|
||||
+196
-145
File diff suppressed because it is too large
Load Diff
@@ -362,13 +362,14 @@ internal D_BreakpointFlags d_breakpoint_flags_from_dmn_trap_flags(DMN_TrapFlags
|
||||
//~ rjf: Handle Type Functions
|
||||
|
||||
internal D_Handle d_handle_zero(void);
|
||||
internal D_Handle d_handle_make(D_MachineID machine_id, DMN_Handle dmn_handle);
|
||||
internal B32 d_handle_match(D_Handle a, D_Handle b);
|
||||
internal void d_handle_list_push(Arena *arena, D_HandleList *list, D_Handle *pair);
|
||||
internal D_HandleList d_handle_list_copy(Arena *arena, D_HandleList *src);
|
||||
internal D_HandleArray d_handle_array_from_list(Arena *arena, D_HandleList *src);
|
||||
internal String8 d_string_from_handle(Arena *arena, D_Handle handle);
|
||||
internal D_Handle d_handle_from_string(String8 string);
|
||||
internal DMN_Handle d_dmn_from_handle(D_Handle handle);
|
||||
internal D_Handle d_handle_from_dmn(D_MachineID machine_id, DMN_Handle handle);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Trap Type Functions
|
||||
@@ -566,6 +567,7 @@ internal void d_ctrl_thread__end_and_flush_log(void);
|
||||
//- rjf: msg kind implementations
|
||||
internal void d_ctrl_thread__launch(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg);
|
||||
internal void d_ctrl_thread__attach(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg);
|
||||
internal void d_ctrl_thread__open_crash_dump(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg);
|
||||
internal void d_ctrl_thread__kill(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg);
|
||||
internal void d_ctrl_thread__kill_all(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg);
|
||||
internal void d_ctrl_thread__detach(DMN_CtrlCtx *ctrl_ctx, D_Msg *msg);
|
||||
|
||||
@@ -2063,12 +2063,12 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P
|
||||
case D_CmdKind_FreezeLocalMachine:
|
||||
{
|
||||
D_MachineID machine_id = D_MachineID_Local;
|
||||
d_cmd(D_CmdKind_FreezeMachine, .entity = d_handle_make(machine_id, dmn_handle_zero()));
|
||||
d_cmd(D_CmdKind_FreezeMachine, .entity = d_handle_from_dmn(machine_id, dmn_handle_zero()));
|
||||
}break;
|
||||
case D_CmdKind_ThawLocalMachine:
|
||||
{
|
||||
D_MachineID machine_id = D_MachineID_Local;
|
||||
d_cmd(D_CmdKind_ThawMachine, .entity = d_handle_make(machine_id, dmn_handle_zero()));
|
||||
d_cmd(D_CmdKind_ThawMachine, .entity = d_handle_from_dmn(machine_id, dmn_handle_zero()));
|
||||
}break;
|
||||
case D_CmdKind_FreezeEntity:
|
||||
case D_CmdKind_ThawEntity:
|
||||
@@ -2119,6 +2119,16 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P
|
||||
MemoryCopyArray(msg->exception_code_filters, exception_code_filters);
|
||||
}
|
||||
}break;
|
||||
|
||||
//- rjf: opening crash dumps
|
||||
case D_CmdKind_OpenCrashDump:
|
||||
{
|
||||
String8 file_path = params->file_path;
|
||||
D_Msg *msg = d_msg_list_push(scratch.arena, &ctrl_msgs);
|
||||
msg->kind = D_MsgKind_OpenCrashDump;
|
||||
msg->path = str8_copy(scratch.arena, file_path);
|
||||
MemoryCopyArray(msg->exception_code_filters, exception_code_filters);
|
||||
}break;
|
||||
}
|
||||
|
||||
// rjf: do run if needed
|
||||
|
||||
@@ -159,6 +159,7 @@ typedef enum D_MsgKind
|
||||
D_MsgKind_Null,
|
||||
D_MsgKind_Launch,
|
||||
D_MsgKind_Attach,
|
||||
D_MsgKind_OpenCrashDump,
|
||||
D_MsgKind_Kill,
|
||||
D_MsgKind_KillAll,
|
||||
D_MsgKind_Detach,
|
||||
|
||||
@@ -41,6 +41,7 @@ D_CmdKind_ThawEntity,
|
||||
D_CmdKind_SetEntityColor,
|
||||
D_CmdKind_SetEntityName,
|
||||
D_CmdKind_Attach,
|
||||
D_CmdKind_OpenCrashDump,
|
||||
D_CmdKind_COUNT,
|
||||
} D_CmdKind;
|
||||
|
||||
|
||||
@@ -1306,7 +1306,7 @@ di_search_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *
|
||||
}
|
||||
lane_sync();
|
||||
|
||||
//- rjf: sort records
|
||||
//- rjf: sort records if we have a query
|
||||
if(!cancelled) ProfScope("sort records")
|
||||
{
|
||||
//- rjf: set up common data
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
@@ -0,0 +1,200 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef MINIDUMP_H
|
||||
#define MINIDUMP_H
|
||||
|
||||
typedef enum MDMP_DumpKind
|
||||
{
|
||||
MDMP_DumpKind_Normal = 0x00000000,
|
||||
MDMP_DumpKind_WithDataSegs = 0x00000001,
|
||||
MDMP_DumpKind_WithFullMemory = 0x00000002,
|
||||
MDMP_DumpKind_WithHandleData = 0x00000004,
|
||||
MDMP_DumpKind_FilterMemory = 0x00000008,
|
||||
MDMP_DumpKind_ScanMemory = 0x00000010,
|
||||
MDMP_DumpKind_WithUnloadedModules = 0x00000020,
|
||||
MDMP_DumpKind_WithIndirectlyReferencedMemory = 0x00000040,
|
||||
MDMP_DumpKind_FilterModulePaths = 0x00000080,
|
||||
MDMP_DumpKind_WithProcessThreadData = 0x00000100,
|
||||
MDMP_DumpKind_WithPrivateReadWriteMemory = 0x00000200,
|
||||
MDMP_DumpKind_WithoutOptionalData = 0x00000400,
|
||||
MDMP_DumpKind_WithFullMemoryInfo = 0x00000800,
|
||||
MDMP_DumpKind_WithThreadInfo = 0x00001000,
|
||||
MDMP_DumpKind_WithCodeSegs = 0x00002000,
|
||||
MDMP_DumpKind_WithoutAuxiliaryState = 0x00004000,
|
||||
MDMP_DumpKind_WithFullAuxiliaryState = 0x00008000,
|
||||
MDMP_DumpKind_WithPrivateWriteCopyMemory = 0x00010000,
|
||||
MDMP_DumpKind_IgnoreInaccessibleMemory = 0x00020000,
|
||||
MDMP_DumpKind_WithTokenInformation = 0x00040000,
|
||||
MDMP_DumpKind_WithModuleHeaders = 0x00080000,
|
||||
MDMP_DumpKind_FilterTriage = 0x00100000,
|
||||
MDMP_DumpKind_WithAvxXStateContext = 0x00200000,
|
||||
MDMP_DumpKind_WithIptTrace = 0x00400000,
|
||||
MDMP_DumpKind_ScanInaccessiblePartialPages = 0x00800000,
|
||||
MDMP_DumpKind_FilterWriteCombinedMemory,
|
||||
MDMP_DumpKind_ValidTypeFlags = 0x01ffffff,
|
||||
MDMP_DumpKind_NoIgnoreInaccessibleMemory,
|
||||
MDMP_DumpKind_ValidTypeFlagsEx
|
||||
}
|
||||
MDMP_DumpKind;
|
||||
|
||||
typedef enum MDMP_StreamKind
|
||||
{
|
||||
MDMP_StreamKind_Unused = 0,
|
||||
MDMP_StreamKind_Reserved0 = 1,
|
||||
MDMP_StreamKind_Reserved1 = 2,
|
||||
MDMP_StreamKind_ThreadList = 3,
|
||||
MDMP_StreamKind_ModuleList = 4,
|
||||
MDMP_StreamKind_MemoryList = 5,
|
||||
MDMP_StreamKind_Exception = 6,
|
||||
MDMP_StreamKind_SystemInfo = 7,
|
||||
MDMP_StreamKind_ThreadExList = 8,
|
||||
MDMP_StreamKind_Memory64List = 9,
|
||||
MDMP_StreamKind_CommentA = 10,
|
||||
MDMP_StreamKind_CommentW = 11,
|
||||
MDMP_StreamKind_HandleData = 12,
|
||||
MDMP_StreamKind_FunctionTable = 13,
|
||||
MDMP_StreamKind_UnloadedModuleList = 14,
|
||||
MDMP_StreamKind_MiscInfo = 15,
|
||||
MDMP_StreamKind_MemoryInfoList = 16,
|
||||
MDMP_StreamKind_ThreadInfoList = 17,
|
||||
MDMP_StreamKind_HandleOperationList = 18,
|
||||
MDMP_StreamKind_Token = 19,
|
||||
MDMP_StreamKind_JavaScriptData = 20,
|
||||
MDMP_StreamKind_SystemMemoryInfo = 21,
|
||||
MDMP_StreamKind_ProcessVmCounters = 22,
|
||||
MDMP_StreamKind_IptTrace = 23,
|
||||
MDMP_StreamKind_ThreadNames = 24,
|
||||
MDMP_StreamKind_ceNull = 0x8000,
|
||||
MDMP_StreamKind_ceSystemInfo = 0x8001,
|
||||
MDMP_StreamKind_ceException = 0x8002,
|
||||
MDMP_StreamKind_ceModuleList = 0x8003,
|
||||
MDMP_StreamKind_ceProcessList = 0x8004,
|
||||
MDMP_StreamKind_ceThreadList = 0x8005,
|
||||
MDMP_StreamKind_ceThreadContextList = 0x8006,
|
||||
MDMP_StreamKind_ceThreadCallStackList = 0x8007,
|
||||
MDMP_StreamKind_ceMemoryVirtualList = 0x8008,
|
||||
MDMP_StreamKind_ceMemoryPhysicalList = 0x8009,
|
||||
MDMP_StreamKind_ceBucketParameters = 0x800A,
|
||||
MDMP_StreamKind_ceProcessModuleMap = 0x800B,
|
||||
MDMP_StreamKind_ceDiagnosisList = 0x800C,
|
||||
MDMP_StreamKind_LastReserved = 0xffff
|
||||
}
|
||||
MDMP_StreamKind;
|
||||
|
||||
#define MDMP_MAGIC 0x504d444d
|
||||
|
||||
typedef struct MDMP_Header MDMP_Header;
|
||||
struct MDMP_Header
|
||||
{
|
||||
U32 magic;
|
||||
U32 version;
|
||||
U32 number_of_streams;
|
||||
U32 stream_directory_foff;
|
||||
U32 checksum;
|
||||
U32 reserved_or_time_date_stamp;
|
||||
U64 flags; // MDMP_DumpKind
|
||||
};
|
||||
|
||||
typedef struct MDMP_LocationDescriptor32 MDMP_LocationDescriptor32;
|
||||
struct MDMP_LocationDescriptor32
|
||||
{
|
||||
U32 data_size;
|
||||
U32 voff;
|
||||
};
|
||||
|
||||
typedef struct MDMP_LocationDescriptor64 MDMP_LocationDescriptor64;
|
||||
struct MDMP_LocationDescriptor64
|
||||
{
|
||||
U64 data_size;
|
||||
U64 voff;
|
||||
};
|
||||
|
||||
typedef struct MDMP_Directory MDMP_Directory;
|
||||
struct MDMP_Directory
|
||||
{
|
||||
U32 stream_kind;
|
||||
MDMP_LocationDescriptor32 location;
|
||||
};
|
||||
|
||||
typedef struct MDMP_MemoryDescriptor32 MDMP_MemoryDescriptor32;
|
||||
struct MDMP_MemoryDescriptor32
|
||||
{
|
||||
U64 start_of_memory_range;
|
||||
MDMP_LocationDescriptor32 memory_location;
|
||||
};
|
||||
|
||||
typedef struct MDMP_MemoryDescriptor64 MDMP_MemoryDescriptor64;
|
||||
struct MDMP_MemoryDescriptor64
|
||||
{
|
||||
U64 start_of_memory_range;
|
||||
U64 size;
|
||||
};
|
||||
|
||||
typedef struct MDMP_Thread MDMP_Thread;
|
||||
struct MDMP_Thread
|
||||
{
|
||||
U32 id;
|
||||
U32 suspend_count;
|
||||
U32 priority_class;
|
||||
U32 priority;
|
||||
U64 teb;
|
||||
MDMP_MemoryDescriptor32 stack;
|
||||
MDMP_LocationDescriptor32 thread_context;
|
||||
};
|
||||
|
||||
typedef struct MDMP_FixedFileInfo MDMP_FixedFileInfo;
|
||||
struct MDMP_FixedFileInfo
|
||||
{
|
||||
U32 signature;
|
||||
U32 struct_version;
|
||||
U32 file_version_ms;
|
||||
U32 file_version_ls;
|
||||
U32 product_version_ms;
|
||||
U32 product_version_ls;
|
||||
U32 file_flags_mask;
|
||||
U32 file_flags;
|
||||
U32 file_os;
|
||||
U32 file_type;
|
||||
U32 file_subtype;
|
||||
U32 file_date_ms;
|
||||
U32 file_date_ls;
|
||||
};
|
||||
|
||||
typedef struct MDMP_Module MDMP_Module;
|
||||
struct MDMP_Module
|
||||
{
|
||||
U64 image_base_vaddr;
|
||||
U32 image_size;
|
||||
U32 checksum;
|
||||
U32 time_date_stamp;
|
||||
U32 module_name_voff;
|
||||
MDMP_FixedFileInfo version_info;
|
||||
MDMP_LocationDescriptor32 cv_record;
|
||||
MDMP_LocationDescriptor32 misc_record;
|
||||
U64 reserved_0;
|
||||
U64 reserved_1;
|
||||
};
|
||||
|
||||
typedef struct MDMP_Exception MDMP_Exception;
|
||||
struct MDMP_Exception
|
||||
{
|
||||
U32 exception_code;
|
||||
U32 exception_flags;
|
||||
U64 exception_record;
|
||||
U64 exception_addr;
|
||||
U32 number_parameters;
|
||||
U32 unused_alignment;
|
||||
U64 exception_information[15];
|
||||
};
|
||||
|
||||
typedef struct MDMP_ExceptionStream MDMP_ExceptionStream;
|
||||
struct MDMP_ExceptionStream
|
||||
{
|
||||
U32 thread_id;
|
||||
U32 padding;
|
||||
MDMP_Exception exception;
|
||||
MDMP_LocationDescriptor32 thread_context;
|
||||
};
|
||||
|
||||
#endif // MINIDUMP_H
|
||||
@@ -0,0 +1,3 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
#ifndef MINIDUMP_PARSE_H
|
||||
#define MINIDUMP_PARSE_H
|
||||
|
||||
typedef struct MDMP_ThreadArray MDMP_ThreadArray;
|
||||
struct MDMP_ThreadArray
|
||||
{
|
||||
MDMP_Thread *v;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
typedef struct MDMP_ModuleArray MDMP_ModuleArray;
|
||||
struct MDMP_ModuleArray
|
||||
{
|
||||
MDMP_Module *v;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
typedef struct MDMP_MemoryArray MDMP_MemoryArray;
|
||||
struct MDMP_MemoryArray
|
||||
{
|
||||
MDMP_MemoryDescriptor64 *v;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
#endif // MINIDUMP_PARSE_H
|
||||
@@ -424,14 +424,14 @@ variadic_params(char *fmt, ...)
|
||||
static void
|
||||
type_coverage_eval_tests(void)
|
||||
{
|
||||
Basics basics = {-1, 1, -2, 2, -4, 4, -8, 8, 1.5f, 1.50000000000001}; EvalTest(basics.a, -1);
|
||||
Basics basics = {-1, 1, -2, 2, -4, 4, -8, 8, 1.5f, 1.50000000000001};
|
||||
Basics_Stdint basics_stdint = {-1, 1, -2, 2, -4, 4, -8, 8, 1.5f, 1.50000000000001};
|
||||
|
||||
uint32_t a = (1<<31);
|
||||
int32_t b = (1<<31);
|
||||
|
||||
uint32_t abcd = 0xaabbccdd; EvalTest(abcd, 0xaabbccdd);
|
||||
int64_t abcd64 = (int64_t)abcd; EvalTest(abcd64, 0xaabbccdd); EvalTest(abcd64, abcd);
|
||||
uint32_t abcd = 0xaabbccdd;
|
||||
int64_t abcd64 = (int64_t)abcd;
|
||||
|
||||
char string[] = "Hello World!";
|
||||
char longer_text[] =
|
||||
|
||||
@@ -62,7 +62,7 @@ str8_lit_comp(""),
|
||||
str8_lit_comp(""),
|
||||
};
|
||||
|
||||
RD_VocabInfo rd_vocab_info_table[359] =
|
||||
RD_VocabInfo rd_vocab_info_table[360] =
|
||||
{
|
||||
{str8_lit_comp("type_view"), str8_lit_comp("type_views"), str8_lit_comp("Type View"), str8_lit_comp("Type Views"), RD_IconKind_Binoculars},
|
||||
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
|
||||
@@ -208,6 +208,7 @@ RD_VocabInfo rd_vocab_info_table[359] =
|
||||
{str8_lit_comp("set_entity_color"), str8_lit_comp(""), str8_lit_comp("Set Entity Color"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("set_entity_name"), str8_lit_comp(""), str8_lit_comp("Set Entity Name"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("attach"), str8_lit_comp(""), str8_lit_comp("Attach"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("open_crash_dump"), str8_lit_comp(""), str8_lit_comp("Open Crash Dump"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("exit"), str8_lit_comp(""), str8_lit_comp("Exit"), str8_lit_comp(""), RD_IconKind_X},
|
||||
{str8_lit_comp("open_palette"), str8_lit_comp(""), str8_lit_comp("Open Palette"), str8_lit_comp(""), RD_IconKind_List},
|
||||
{str8_lit_comp("run_command"), str8_lit_comp(""), str8_lit_comp("Run Command"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
@@ -574,7 +575,7 @@ Rng1U64 rd_reg_slot_range_table[49] =
|
||||
{OffsetOf(RD_Regs, wm_event), OffsetOf(RD_Regs, wm_event) + sizeof(WM_Event *)},
|
||||
};
|
||||
|
||||
RD_CmdKindInfo rd_cmd_kind_info_table[248] =
|
||||
RD_CmdKindInfo rd_cmd_kind_info_table[249] =
|
||||
{
|
||||
{0},
|
||||
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
@@ -609,6 +610,7 @@ RD_CmdKindInfo rd_cmd_kind_info_table[248] =
|
||||
{ str8_lit_comp("set_entity_color"), str8_lit_comp("Sets the passed entity's color."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("set_entity_name"), str8_lit_comp("Sets the passed entity's name."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("attach"), str8_lit_comp("Attaches to a process that is already running on the local machine."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_PID, str8_lit_comp("query:unattached_processes"), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_crash_dump"), str8_lit_comp("Opens a crash dump file and recreates debuggee state at the time of the crash."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_palette"), str8_lit_comp("Opens the palette."), str8_lit_comp("help,cmd,lister"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||
{ str8_lit_comp("run_command"), str8_lit_comp("Runs a command from the command palette."), str8_lit_comp("help,cmd"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_CmdName, str8_lit_comp("query:commands"), str8_lit_comp("commands"), D_EntityKind_Null}},
|
||||
|
||||
@@ -95,6 +95,7 @@ RD_CmdKind_ThawEntity,
|
||||
RD_CmdKind_SetEntityColor,
|
||||
RD_CmdKind_SetEntityName,
|
||||
RD_CmdKind_Attach,
|
||||
RD_CmdKind_OpenCrashDump,
|
||||
RD_CmdKind_Exit,
|
||||
RD_CmdKind_OpenPalette,
|
||||
RD_CmdKind_RunCommand,
|
||||
@@ -602,7 +603,7 @@ Z(getting_started)\
|
||||
C_LINKAGE_BEGIN
|
||||
extern String8 rd_tab_fast_path_view_name_table[25];
|
||||
extern String8 rd_tab_fast_path_query_name_table[25];
|
||||
extern RD_VocabInfo rd_vocab_info_table[359];
|
||||
extern RD_VocabInfo rd_vocab_info_table[360];
|
||||
extern RD_NameSchemaInfo rd_name_schema_info_table[39];
|
||||
extern String8 rd_reg_slot_code_name_table[49];
|
||||
extern Rng1U64 rd_reg_slot_range_table[49];
|
||||
|
||||
@@ -693,8 +693,9 @@ rd_ctrl_entity_from_eval_space(E_Space space)
|
||||
space.kind == RD_EvalSpaceKind_MetaUnattachedProcess)
|
||||
{
|
||||
D_Handle handle;
|
||||
handle.machine_id = space.u64s[0];
|
||||
handle.dmn_handle.u64[0] = space.u64s[1];
|
||||
handle.machine_id = (U32)((space.u64s[0] & 0xffffffff00000000ull) >> 32);
|
||||
handle.controller_kind = (U32)((space.u64s[0] & 0x00000000ffffffffull) >> 0);
|
||||
handle.entity_id = space.u64s[1];
|
||||
entity = d_entity_from_handle(&d_user_state->ctrl_entity_store->ctx, handle);
|
||||
}
|
||||
return entity;
|
||||
@@ -704,8 +705,8 @@ internal E_Space
|
||||
rd_eval_space_from_ctrl_entity(D_Entity *entity, E_SpaceKind kind)
|
||||
{
|
||||
E_Space space = e_space_make(kind);
|
||||
space.u64s[0] = entity->handle.machine_id;
|
||||
space.u64s[1] = entity->handle.dmn_handle.u64[0];
|
||||
space.u64s[0] = (((U64)entity->handle.machine_id) << 32) | (((U64)entity->handle.controller_kind) << 0);
|
||||
space.u64s[1] = entity->handle.entity_id;
|
||||
return space;
|
||||
}
|
||||
|
||||
@@ -5755,7 +5756,7 @@ rd_window_frame(void)
|
||||
ID(panel);
|
||||
ID(view);
|
||||
#undef ID
|
||||
#define Handle(name) ui_labelf("%s: [0x%I64x, 0x%I64x]", #name, (regs->name).machine_id, (regs->name).dmn_handle.u64[0])
|
||||
#define Handle(name) ui_labelf("%s: [0x%x, 0x%x, 0x%I64x]", #name, (regs->name).machine_id, (regs->name).controller_kind, (regs->name).entity_id)
|
||||
Handle(machine);
|
||||
Handle(process);
|
||||
Handle(module);
|
||||
|
||||
@@ -298,6 +298,8 @@
|
||||
#include "artifact_cache/artifact_cache.h"
|
||||
#include "rdi/rdi_local.h"
|
||||
#include "rdi_make/rdi_make_local.h"
|
||||
#include "minidump/minidump.h"
|
||||
#include "minidump/minidump_parse.h"
|
||||
#include "mdesk/mdesk.h"
|
||||
#include "window_manager/window_manager_inc.h"
|
||||
#include "config/config_inc.h"
|
||||
@@ -351,6 +353,8 @@
|
||||
#include "artifact_cache/artifact_cache.c"
|
||||
#include "rdi/rdi_local.c"
|
||||
#include "rdi_make/rdi_make_local.c"
|
||||
#include "minidump/minidump.c"
|
||||
#include "minidump/minidump_parse.c"
|
||||
#include "mdesk/mdesk.c"
|
||||
#include "window_manager/window_manager_inc.c"
|
||||
#include "config/config_inc.c"
|
||||
|
||||
@@ -2516,7 +2516,7 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
|
||||
ui_spacer(ui_em(1.5f, 1.f));
|
||||
ui_set_next_pref_width(ui_children_sum(1));
|
||||
UI_Key pin_box_key = ui_key_from_stringf(ui_key_zero(), "###pin_%p", pin);
|
||||
UI_Box *pin_box = ui_build_box_from_key(UI_BoxFlag_AnimatePos, pin_box_key);
|
||||
UI_Box *pin_box = ui_build_box_from_key(0, pin_box_key);
|
||||
F32 pin_t = ui_anim(pin_box_key, 1.f, .rate = rd_state->catchall_animation_rate);
|
||||
UI_Parent(pin_box) UI_PrefWidth(ui_text_dim(1, 1))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user