mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 06:48:41 +00:00
simplify testing ipc driving stuff in raddbg layer; put in formal eval/line-from-vaddr commands
This commit is contained in:
@@ -7,6 +7,7 @@ target:
|
|||||||
working_directory: build
|
working_directory: build
|
||||||
arguments: "--user:raddbg_test.user --project:raddbg_test.project"
|
arguments: "--user:raddbg_test.user --project:raddbg_test.project"
|
||||||
enabled: 1
|
enabled: 1
|
||||||
|
debug_subprocesses: 0
|
||||||
}
|
}
|
||||||
target:
|
target:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -994,7 +994,7 @@ d_lines_array_from_dbgi_key_file_path_line_range(Arena *arena, DI_Key dbgi_key,
|
|||||||
override_n = override_n->next)
|
override_n = override_n->next)
|
||||||
{
|
{
|
||||||
String8 file_path = override_n->string;
|
String8 file_path = override_n->string;
|
||||||
String8 file_path_normalized = rdim_normalize_path_str8(scratch.arena, file_path);
|
String8 file_path_normalized = rdim_normalized_from_path(scratch.arena, file_path);
|
||||||
|
|
||||||
// rjf: binary -> rdi
|
// rjf: binary -> rdi
|
||||||
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
|
RDI_Parsed *rdi = di_rdi_from_key(access, dbgi_key, 0, 0);
|
||||||
@@ -1087,7 +1087,7 @@ d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64
|
|||||||
override_n = override_n->next)
|
override_n = override_n->next)
|
||||||
{
|
{
|
||||||
String8 file_path = override_n->string;
|
String8 file_path = override_n->string;
|
||||||
String8 file_path_normalized = rdim_normalize_path_str8(scratch.arena, file_path);
|
String8 file_path_normalized = rdim_normalized_from_path(scratch.arena, file_path);
|
||||||
for EachIndex(idx, dbgi_keys.count)
|
for EachIndex(idx, dbgi_keys.count)
|
||||||
{
|
{
|
||||||
Access *access = access_open();
|
Access *access = access_open();
|
||||||
|
|||||||
@@ -2294,3 +2294,27 @@ ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- rjf: eval -> string path
|
||||||
|
|
||||||
|
internal String8
|
||||||
|
ev_value_string_from_eval(Arena *arena, EV_StringParams *params, E_Eval eval, U64 cap)
|
||||||
|
{
|
||||||
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
|
String8List strs = {0};
|
||||||
|
EV_StringIter *iter = ev_string_iter_begin(scratch.arena, eval, params);
|
||||||
|
for(String8 string = {0}; ev_string_iter_next(scratch.arena, iter, &string);)
|
||||||
|
{
|
||||||
|
if(strs.total_size + string.size > cap)
|
||||||
|
{
|
||||||
|
String8 allowed_string = str8_chop(string, ((strs.total_size + string.size) - cap) + 3);
|
||||||
|
str8_list_push(scratch.arena, &strs, allowed_string);
|
||||||
|
str8_list_push(scratch.arena, &strs, str8_lit("..."));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
str8_list_push(scratch.arena, &strs, string);
|
||||||
|
}
|
||||||
|
String8 result = str8_list_join(arena, &strs, 0);
|
||||||
|
scratch_end(scratch);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|||||||
@@ -383,4 +383,7 @@ internal String8 ev_escaped_from_raw_string(Arena *arena, String8 raw);
|
|||||||
internal EV_StringIter *ev_string_iter_begin(Arena *arena, E_Eval eval, EV_StringParams *params);
|
internal EV_StringIter *ev_string_iter_begin(Arena *arena, E_Eval eval, EV_StringParams *params);
|
||||||
internal B32 ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string);
|
internal B32 ev_string_iter_next(Arena *arena, EV_StringIter *it, String8 *out_string);
|
||||||
|
|
||||||
|
//- rjf: eval -> string path
|
||||||
|
internal String8 ev_value_string_from_eval(Arena *arena, EV_StringParams *params, E_Eval eval, U64 cap);
|
||||||
|
|
||||||
#endif // EVAL_VISUALIZATION_CORE_H
|
#endif // EVAL_VISUALIZATION_CORE_H
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ rdim_lower_from_str8(RDIM_Arena *arena, RDIM_String8 string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
RDI_PROC RDIM_String8
|
RDI_PROC RDIM_String8
|
||||||
rdim_normalize_path_str8(RDIM_Arena *arena, RDIM_String8 path)
|
rdim_normalized_from_path(RDIM_Arena *arena, RDIM_String8 path)
|
||||||
{
|
{
|
||||||
RDIM_String8 result = rdim_lower_from_str8(arena, path);
|
RDIM_String8 result = rdim_lower_from_str8(arena, path);
|
||||||
for(RDI_U64 i = 0; i < result.RDIM_String8_SizeMember; i += 1)
|
for(RDI_U64 i = 0; i < result.RDIM_String8_SizeMember; i += 1)
|
||||||
|
|||||||
@@ -1333,7 +1333,7 @@ RDI_PROC RDI_S32 rdim_str8_match(RDIM_String8 a, RDIM_String8 b, RDIM_StringMatc
|
|||||||
#define rdim_str8_struct(S) rdim_str8((RDI_U8*)(S), sizeof(*(S)))
|
#define rdim_str8_struct(S) rdim_str8((RDI_U8*)(S), sizeof(*(S)))
|
||||||
#define rdim_str8_struct_array(S, C) rdim_str8((RDI_U8*)(S), sizeof(*(S)) * (C))
|
#define rdim_str8_struct_array(S, C) rdim_str8((RDI_U8*)(S), sizeof(*(S)) * (C))
|
||||||
RDI_PROC RDIM_String8 rdim_lower_from_str8(RDIM_Arena *arena, RDIM_String8 string);
|
RDI_PROC RDIM_String8 rdim_lower_from_str8(RDIM_Arena *arena, RDIM_String8 string);
|
||||||
RDI_PROC RDIM_String8 rdim_normalize_path_str8(RDIM_Arena *arena, RDIM_String8 path);
|
RDI_PROC RDIM_String8 rdim_normalized_from_path(RDIM_Arena *arena, RDIM_String8 path);
|
||||||
|
|
||||||
//- rjf: string lists
|
//- rjf: string lists
|
||||||
RDI_PROC void rdim_str8_list_push(RDIM_Arena *arena, RDIM_String8List *list, RDIM_String8 string);
|
RDI_PROC void rdim_str8_list_push(RDIM_Arena *arena, RDIM_String8List *list, RDIM_String8 string);
|
||||||
|
|||||||
+16
-105
@@ -720,89 +720,7 @@ rb_thread_entry_point(void *p)
|
|||||||
else if(elf_w_dwarf) { log_infof("ELFs specified; converting DWARF data to RDI\n"); }
|
else if(elf_w_dwarf) { log_infof("ELFs specified; converting DWARF data to RDI\n"); }
|
||||||
|
|
||||||
// rjf: convert
|
// rjf: convert
|
||||||
D2R_ConvertParams convert_params = {0};
|
D2R2_ConvertParams convert_params = {0};
|
||||||
{
|
|
||||||
B32 got_exe = 0;
|
|
||||||
B32 got_dbg = 0;
|
|
||||||
if(!got_exe && !got_dbg)
|
|
||||||
{
|
|
||||||
for(RB_FileNode *n = input_files_from_format_table[RB_FileFormat_PE].first; n != 0; n = n->next)
|
|
||||||
{
|
|
||||||
if(n->v->format_flags & RB_FileFormatFlag_HasDWARF)
|
|
||||||
{
|
|
||||||
got_exe = 1;
|
|
||||||
got_dbg = 1;
|
|
||||||
convert_params.dbg_name = n->v->path;
|
|
||||||
convert_params.dbg_data = n->v->data;
|
|
||||||
convert_params.exe_name = n->v->path;
|
|
||||||
convert_params.exe_data = n->v->data;
|
|
||||||
convert_params.exe_kind = ExecutableImageKind_CoffPe;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!got_exe)
|
|
||||||
{
|
|
||||||
for(RB_FileNode *n = input_files_from_format_table[RB_FileFormat_ELF32].first; n != 0; n = n->next)
|
|
||||||
{
|
|
||||||
got_exe = 1;
|
|
||||||
convert_params.exe_name = n->v->path;
|
|
||||||
convert_params.exe_data = n->v->data;
|
|
||||||
convert_params.exe_kind = ExecutableImageKind_Elf32;
|
|
||||||
if(!(n->v->format_flags & RB_FileFormatFlag_HasDWARF))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!got_exe)
|
|
||||||
{
|
|
||||||
for(RB_FileNode *n = input_files_from_format_table[RB_FileFormat_ELF64].first; n != 0; n = n->next)
|
|
||||||
{
|
|
||||||
got_exe = 1;
|
|
||||||
convert_params.exe_name = n->v->path;
|
|
||||||
convert_params.exe_data = n->v->data;
|
|
||||||
convert_params.exe_kind = ExecutableImageKind_Elf64;
|
|
||||||
if(!(n->v->format_flags & RB_FileFormatFlag_HasDWARF))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!got_dbg)
|
|
||||||
{
|
|
||||||
for(RB_FileNode *n = input_files_from_format_table[RB_FileFormat_ELF32].first; n != 0; n = n->next)
|
|
||||||
{
|
|
||||||
if(n->v->format_flags & RB_FileFormatFlag_HasDWARF)
|
|
||||||
{
|
|
||||||
got_dbg = 1;
|
|
||||||
convert_params.dbg_name = n->v->path;
|
|
||||||
convert_params.dbg_data = n->v->data;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!got_dbg)
|
|
||||||
{
|
|
||||||
for(RB_FileNode *n = input_files_from_format_table[RB_FileFormat_ELF64].first; n != 0; n = n->next)
|
|
||||||
{
|
|
||||||
if(n->v->format_flags & RB_FileFormatFlag_HasDWARF)
|
|
||||||
{
|
|
||||||
got_dbg = 1;
|
|
||||||
convert_params.dbg_name = n->v->path;
|
|
||||||
convert_params.dbg_data = n->v->data;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
convert_params.subset_flags = subset_flags;
|
|
||||||
convert_params.deterministic = cmd_line_has_flag(cmdline, str8_lit("deterministic"));
|
|
||||||
convert_params.is_parse_relaxed = 1; // TODO: switch
|
|
||||||
}
|
|
||||||
#if DWARF_2
|
|
||||||
|
|
||||||
// rjf: convert [2]
|
|
||||||
D2R2_ConvertParams convert_params_2 = {0};
|
|
||||||
{
|
{
|
||||||
B32 got_exe = 0;
|
B32 got_exe = 0;
|
||||||
B32 got_dbg = 0;
|
B32 got_dbg = 0;
|
||||||
@@ -892,11 +810,11 @@ rb_thread_entry_point(void *p)
|
|||||||
String8 raw_sections = str8_substr(exe_data, pe.section_table_range);
|
String8 raw_sections = str8_substr(exe_data, pe.section_table_range);
|
||||||
COFF_SectionHeader *section_table = str8_deserial_get_raw_ptr(raw_sections, 0, sizeof(COFF_SectionHeader) * pe.section_count);
|
COFF_SectionHeader *section_table = str8_deserial_get_raw_ptr(raw_sections, 0, sizeof(COFF_SectionHeader) * pe.section_count);
|
||||||
String8 string_table = str8_substr(exe_data, pe.string_table_range);
|
String8 string_table = str8_substr(exe_data, pe.string_table_range);
|
||||||
convert_params_2.arch = pe.arch;
|
convert_params.arch = pe.arch;
|
||||||
convert_params_2.base_vaddr = pe.image_base;
|
convert_params.base_vaddr = pe.image_base;
|
||||||
convert_params_2.raw = dw_input_from_coff_section_table(scratch.arena, exe_data, string_table, pe.section_count, section_table);
|
convert_params.raw = dw_input_from_coff_section_table(scratch.arena, exe_data, string_table, pe.section_count, section_table);
|
||||||
convert_params_2.path_style = PathStyle_WindowsAbsolute;
|
convert_params.path_style = PathStyle_WindowsAbsolute;
|
||||||
convert_params_2.binary_sections = c2r_rdi_binary_sections_from_coff_sections(arena, exe_data, string_table, pe.section_count, section_table);
|
convert_params.binary_sections = c2r_rdi_binary_sections_from_coff_sections(arena, exe_data, string_table, pe.section_count, section_table);
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}break;
|
}break;
|
||||||
case ExecutableImageKind_Elf32:
|
case ExecutableImageKind_Elf32:
|
||||||
@@ -904,23 +822,20 @@ rb_thread_entry_point(void *p)
|
|||||||
{
|
{
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
ELF_Bin bin = elf_bin_from_data(scratch.arena, dbg_data);
|
ELF_Bin bin = elf_bin_from_data(scratch.arena, dbg_data);
|
||||||
convert_params_2.arch = arch_from_elf_machine(bin.hdr.e_machine);
|
convert_params.arch = arch_from_elf_machine(bin.hdr.e_machine);
|
||||||
convert_params_2.base_vaddr = elf_base_addr_from_bin(&bin);
|
convert_params.base_vaddr = elf_base_addr_from_bin(&bin);
|
||||||
convert_params_2.raw = dw_input_from_elf_bin(scratch.arena, dbg_data, &bin);
|
convert_params.raw = dw_input_from_elf_bin(scratch.arena, dbg_data, &bin);
|
||||||
convert_params_2.path_style = PathStyle_UnixAbsolute;
|
convert_params.path_style = PathStyle_UnixAbsolute;
|
||||||
convert_params_2.binary_sections = e2r_rdi_binary_sections_from_elf_section_table(arena, dbg_data, &bin, &bin.shdrs);
|
convert_params.binary_sections = e2r_rdi_binary_sections_from_elf_section_table(arena, dbg_data, &bin, &bin.shdrs);
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
convert_params_2.exe_name = exe_name;
|
convert_params.exe_name = exe_name;
|
||||||
convert_params_2.exe_data = exe_data;
|
convert_params.exe_data = exe_data;
|
||||||
convert_params_2.subset_flags = subset_flags;
|
convert_params.subset_flags = subset_flags;
|
||||||
convert_params_2.deterministic = cmd_line_has_flag(cmdline, str8_lit("deterministic"));
|
convert_params.deterministic = cmd_line_has_flag(cmdline, str8_lit("deterministic"));
|
||||||
}
|
}
|
||||||
ProfScope("convert [2]") dwarf_bake_params_2 = d2r2_convert(arena, &convert_params_2);
|
ProfScope("convert") dwarf_bake_params = d2r2_convert(arena, &convert_params);
|
||||||
#else
|
|
||||||
ProfScope("convert") dwarf_bake_params = d2r_convert(arena, &convert_params);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//- rjf: PDB inputs => PDB -> RDI conversion
|
//- rjf: PDB inputs => PDB -> RDI conversion
|
||||||
@@ -995,11 +910,7 @@ rb_thread_entry_point(void *p)
|
|||||||
{
|
{
|
||||||
bake_params = push_array(arena, RDIM_BakeParams, 1);
|
bake_params = push_array(arena, RDIM_BakeParams, 1);
|
||||||
rdim_bake_params_concat_in_place(bake_params, &pdb_bake_params);
|
rdim_bake_params_concat_in_place(bake_params, &pdb_bake_params);
|
||||||
#if DWARF_2
|
|
||||||
rdim_bake_params_concat_in_place(bake_params, &dwarf_bake_params_2);
|
|
||||||
#else
|
|
||||||
rdim_bake_params_concat_in_place(bake_params, &dwarf_bake_params);
|
rdim_bake_params_concat_in_place(bake_params, &dwarf_bake_params);
|
||||||
#endif
|
|
||||||
for EachNode(n, RDIM_BakeParamsNode, first_rdi_bake_params)
|
for EachNode(n, RDIM_BakeParamsNode, first_rdi_bake_params)
|
||||||
{
|
{
|
||||||
rdim_bake_params_concat_in_place(bake_params, &n->v);
|
rdim_bake_params_concat_in_place(bake_params, &n->v);
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
#include "base/base_inc.h"
|
#include "base/base_inc.h"
|
||||||
#include "x64/x64.h"
|
#include "x64/x64.h"
|
||||||
#include "linker/hash_table.h"
|
#include "linker/hash_table.h"
|
||||||
#include "linker/lf_hash_table.h"
|
|
||||||
#include "linker/base_ext/base_bit_array.h"
|
#include "linker/base_ext/base_bit_array.h"
|
||||||
#include "rdi/rdi_local.h"
|
#include "rdi/rdi_local.h"
|
||||||
#include "rdi_make/rdi_make_local.h"
|
#include "rdi_make/rdi_make_local.h"
|
||||||
@@ -36,7 +35,6 @@
|
|||||||
#include "rdi_from_coff/rdi_from_coff.h"
|
#include "rdi_from_coff/rdi_from_coff.h"
|
||||||
#include "rdi_from_elf/rdi_from_elf.h"
|
#include "rdi_from_elf/rdi_from_elf.h"
|
||||||
#include "rdi_from_pdb/rdi_from_pdb.h"
|
#include "rdi_from_pdb/rdi_from_pdb.h"
|
||||||
#include "rdi_from_dwarf/rdi_from_dwarf.h"
|
|
||||||
#include "rdi_from_dwarf/rdi_from_dwarf_2.h"
|
#include "rdi_from_dwarf/rdi_from_dwarf_2.h"
|
||||||
#include "radbin/radbin.h"
|
#include "radbin/radbin.h"
|
||||||
|
|
||||||
@@ -44,7 +42,6 @@
|
|||||||
#include "base/base_inc.c"
|
#include "base/base_inc.c"
|
||||||
#include "x64/x64.c"
|
#include "x64/x64.c"
|
||||||
#include "linker/hash_table.c"
|
#include "linker/hash_table.c"
|
||||||
#include "linker/lf_hash_table.c"
|
|
||||||
#include "linker/base_ext/base_bit_array.c"
|
#include "linker/base_ext/base_bit_array.c"
|
||||||
#include "rdi/rdi_local.c"
|
#include "rdi/rdi_local.c"
|
||||||
#include "rdi_make/rdi_make_local.c"
|
#include "rdi_make/rdi_make_local.c"
|
||||||
@@ -66,7 +63,6 @@
|
|||||||
#include "rdi_from_coff/rdi_from_coff.c"
|
#include "rdi_from_coff/rdi_from_coff.c"
|
||||||
#include "rdi_from_elf/rdi_from_elf.c"
|
#include "rdi_from_elf/rdi_from_elf.c"
|
||||||
#include "rdi_from_pdb/rdi_from_pdb.c"
|
#include "rdi_from_pdb/rdi_from_pdb.c"
|
||||||
#include "rdi_from_dwarf/rdi_from_dwarf.c"
|
|
||||||
#include "rdi_from_dwarf/rdi_from_dwarf_2.c"
|
#include "rdi_from_dwarf/rdi_from_dwarf_2.c"
|
||||||
#include "radbin/radbin.c"
|
#include "radbin/radbin.c"
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ str8_lit_comp(""),
|
|||||||
str8_lit_comp(""),
|
str8_lit_comp(""),
|
||||||
};
|
};
|
||||||
|
|
||||||
RD_VocabInfo rd_vocab_info_table[361] =
|
RD_VocabInfo rd_vocab_info_table[363] =
|
||||||
{
|
{
|
||||||
{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("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},
|
{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},
|
||||||
@@ -214,6 +214,9 @@ RD_VocabInfo rd_vocab_info_table[361] =
|
|||||||
{str8_lit_comp("open_palette"), str8_lit_comp(""), str8_lit_comp("Open Palette"), str8_lit_comp(""), RD_IconKind_List},
|
{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},
|
{str8_lit_comp("run_command"), str8_lit_comp(""), str8_lit_comp("Run Command"), str8_lit_comp(""), RD_IconKind_Null},
|
||||||
{str8_lit_comp("run_ext_driver_text_command"), str8_lit_comp(""), str8_lit_comp("Run External Driver Text Command"), str8_lit_comp(""), RD_IconKind_Null},
|
{str8_lit_comp("run_ext_driver_text_command"), str8_lit_comp(""), str8_lit_comp("Run External Driver Text Command"), str8_lit_comp(""), RD_IconKind_Null},
|
||||||
|
{str8_lit_comp("state"), str8_lit_comp(""), str8_lit_comp("State"), str8_lit_comp(""), RD_IconKind_Null},
|
||||||
|
{str8_lit_comp("eval"), str8_lit_comp(""), str8_lit_comp("Eval"), str8_lit_comp(""), RD_IconKind_Null},
|
||||||
|
{str8_lit_comp("line_from_vaddr"), str8_lit_comp(""), str8_lit_comp("Line From Virtual Address"), str8_lit_comp(""), RD_IconKind_Null},
|
||||||
{str8_lit_comp("wm_event"), str8_lit_comp(""), str8_lit_comp("OS Event"), str8_lit_comp(""), RD_IconKind_Null},
|
{str8_lit_comp("wm_event"), str8_lit_comp(""), str8_lit_comp("OS Event"), str8_lit_comp(""), RD_IconKind_Null},
|
||||||
{str8_lit_comp("select_thread"), str8_lit_comp(""), str8_lit_comp("Select Thread"), str8_lit_comp(""), RD_IconKind_Thread},
|
{str8_lit_comp("select_thread"), str8_lit_comp(""), str8_lit_comp("Select Thread"), str8_lit_comp(""), RD_IconKind_Thread},
|
||||||
{str8_lit_comp("select_unwind"), str8_lit_comp(""), str8_lit_comp("Select Unwind"), str8_lit_comp(""), RD_IconKind_Null},
|
{str8_lit_comp("select_unwind"), str8_lit_comp(""), str8_lit_comp("Select Unwind"), str8_lit_comp(""), RD_IconKind_Null},
|
||||||
@@ -365,7 +368,6 @@ RD_VocabInfo rd_vocab_info_table[361] =
|
|||||||
{str8_lit_comp("enable_breakpoint"), str8_lit_comp(""), str8_lit_comp("Enable Breakpoint"), str8_lit_comp(""), RD_IconKind_CheckFilled},
|
{str8_lit_comp("enable_breakpoint"), str8_lit_comp(""), str8_lit_comp("Enable Breakpoint"), str8_lit_comp(""), RD_IconKind_CheckFilled},
|
||||||
{str8_lit_comp("disable_breakpoint"), str8_lit_comp(""), str8_lit_comp("Disable Breakpoint"), str8_lit_comp(""), RD_IconKind_CheckHollow},
|
{str8_lit_comp("disable_breakpoint"), str8_lit_comp(""), str8_lit_comp("Disable Breakpoint"), str8_lit_comp(""), RD_IconKind_CheckHollow},
|
||||||
{str8_lit_comp("clear_breakpoints"), str8_lit_comp(""), str8_lit_comp("Clear Breakpoints"), str8_lit_comp(""), RD_IconKind_Trash},
|
{str8_lit_comp("clear_breakpoints"), str8_lit_comp(""), str8_lit_comp("Clear Breakpoints"), str8_lit_comp(""), RD_IconKind_Trash},
|
||||||
{str8_lit_comp("list_breakpoints"), str8_lit_comp(""), str8_lit_comp("List Breakpoints"), str8_lit_comp(""), RD_IconKind_Null},
|
|
||||||
{str8_lit_comp("clear_output"), str8_lit_comp(""), str8_lit_comp("Clear Output"), str8_lit_comp(""), RD_IconKind_Null},
|
{str8_lit_comp("clear_output"), str8_lit_comp(""), str8_lit_comp("Clear Output"), str8_lit_comp(""), RD_IconKind_Null},
|
||||||
{str8_lit_comp("add_watch_pin"), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
{str8_lit_comp("add_watch_pin"), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||||
{str8_lit_comp("toggle_watch_pin"), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
{str8_lit_comp("toggle_watch_pin"), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||||
@@ -576,7 +578,7 @@ Rng1U64 rd_reg_slot_range_table[49] =
|
|||||||
{OffsetOf(RD_Regs, wm_event), OffsetOf(RD_Regs, wm_event) + sizeof(WM_Event *)},
|
{OffsetOf(RD_Regs, wm_event), OffsetOf(RD_Regs, wm_event) + sizeof(WM_Event *)},
|
||||||
};
|
};
|
||||||
|
|
||||||
RD_CmdKindInfo rd_cmd_kind_info_table[249] =
|
RD_CmdKindInfo rd_cmd_kind_info_table[251] =
|
||||||
{
|
{
|
||||||
{0},
|
{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}},
|
{ 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}},
|
||||||
@@ -615,7 +617,10 @@ RD_CmdKindInfo rd_cmd_kind_info_table[249] =
|
|||||||
{ 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("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("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}},
|
{ 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}},
|
||||||
{ str8_lit_comp("run_ext_driver_text_command"), str8_lit_comp(""), 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*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
{ str8_lit_comp("run_ext_driver_text_command"), str8_lit_comp(""), 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("state"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(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("eval"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(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_Expr, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
|
{ str8_lit_comp("line_from_vaddr"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(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_Vaddr, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
{ str8_lit_comp("wm_event"), str8_lit_comp(""), 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("wm_event"), str8_lit_comp(""), 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("select_thread"), str8_lit_comp("Selects a thread."), 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_Thread, str8_lit_comp("query:threads"), str8_lit_comp(""), D_EntityKind_Thread}},
|
{ str8_lit_comp("select_thread"), str8_lit_comp("Selects a thread."), 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_Thread, str8_lit_comp("query:threads"), str8_lit_comp(""), D_EntityKind_Thread}},
|
||||||
{ str8_lit_comp("select_unwind"), str8_lit_comp("Selects an unwind frame number for the selected thread."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(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("query:call_stack"), str8_lit_comp(""), D_EntityKind_Null}},
|
{ str8_lit_comp("select_unwind"), str8_lit_comp("Selects an unwind frame number for the selected thread."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(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("query:call_stack"), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
@@ -767,7 +772,6 @@ RD_CmdKindInfo rd_cmd_kind_info_table[249] =
|
|||||||
{ str8_lit_comp("enable_breakpoint"), str8_lit_comp("Enables a breakpoint."), 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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:breakpoints"), str8_lit_comp(""), D_EntityKind_Null}},
|
{ str8_lit_comp("enable_breakpoint"), str8_lit_comp("Enables a breakpoint."), 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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:breakpoints"), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), 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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:breakpoints"), str8_lit_comp(""), D_EntityKind_Null}},
|
{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), 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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:breakpoints"), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
{ str8_lit_comp("clear_breakpoints"), str8_lit_comp("Removes all breakpoints."), 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*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
{ str8_lit_comp("clear_breakpoints"), str8_lit_comp("Removes all breakpoints."), 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*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
{ str8_lit_comp("list_breakpoints"), str8_lit_comp("Lists all breakpoints."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(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("clear_output"), str8_lit_comp("Clears all output."), 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*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
{ str8_lit_comp("clear_output"), str8_lit_comp("Clears all output."), 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*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("$watch_pins,"), (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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("$watch_pins,"), (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*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), D_EntityKind_Null}},
|
||||||
|
|||||||
@@ -100,6 +100,9 @@ RD_CmdKind_Exit,
|
|||||||
RD_CmdKind_OpenPalette,
|
RD_CmdKind_OpenPalette,
|
||||||
RD_CmdKind_RunCommand,
|
RD_CmdKind_RunCommand,
|
||||||
RD_CmdKind_RunExternalDriverTextCommand,
|
RD_CmdKind_RunExternalDriverTextCommand,
|
||||||
|
RD_CmdKind_State,
|
||||||
|
RD_CmdKind_Eval,
|
||||||
|
RD_CmdKind_LineFromVAddr,
|
||||||
RD_CmdKind_WMEvent,
|
RD_CmdKind_WMEvent,
|
||||||
RD_CmdKind_SelectThread,
|
RD_CmdKind_SelectThread,
|
||||||
RD_CmdKind_SelectUnwind,
|
RD_CmdKind_SelectUnwind,
|
||||||
@@ -251,7 +254,6 @@ RD_CmdKind_RemoveBreakpoint,
|
|||||||
RD_CmdKind_EnableBreakpoint,
|
RD_CmdKind_EnableBreakpoint,
|
||||||
RD_CmdKind_DisableBreakpoint,
|
RD_CmdKind_DisableBreakpoint,
|
||||||
RD_CmdKind_ClearBreakpoints,
|
RD_CmdKind_ClearBreakpoints,
|
||||||
RD_CmdKind_ListBreakpoints,
|
|
||||||
RD_CmdKind_ClearOutput,
|
RD_CmdKind_ClearOutput,
|
||||||
RD_CmdKind_AddWatchPin,
|
RD_CmdKind_AddWatchPin,
|
||||||
RD_CmdKind_ToggleWatchPin,
|
RD_CmdKind_ToggleWatchPin,
|
||||||
@@ -603,7 +605,7 @@ Z(getting_started)\
|
|||||||
C_LINKAGE_BEGIN
|
C_LINKAGE_BEGIN
|
||||||
extern String8 rd_tab_fast_path_view_name_table[25];
|
extern String8 rd_tab_fast_path_view_name_table[25];
|
||||||
extern String8 rd_tab_fast_path_query_name_table[25];
|
extern String8 rd_tab_fast_path_query_name_table[25];
|
||||||
extern RD_VocabInfo rd_vocab_info_table[361];
|
extern RD_VocabInfo rd_vocab_info_table[363];
|
||||||
extern RD_NameSchemaInfo rd_name_schema_info_table[39];
|
extern RD_NameSchemaInfo rd_name_schema_info_table[39];
|
||||||
extern String8 rd_reg_slot_code_name_table[49];
|
extern String8 rd_reg_slot_code_name_table[49];
|
||||||
extern Rng1U64 rd_reg_slot_range_table[49];
|
extern Rng1U64 rd_reg_slot_range_table[49];
|
||||||
|
|||||||
@@ -942,9 +942,14 @@ RD_CmdTable: // | | | |
|
|||||||
//- rjf: palette
|
//- rjf: palette
|
||||||
{OpenPalette 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 List "open_palette" "Open Palette" "Opens the palette." "help,cmd,lister" "" }
|
{OpenPalette 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 List "open_palette" "Open Palette" "Opens the palette." "help,cmd,lister" "" }
|
||||||
|
|
||||||
//- rjf: command runners
|
//- rjf: command fast-path
|
||||||
{RunCommand 1 1 0 0 "query:commands" CmdName commands Nil Null 0 0 0 0 0 1 1 Null "run_command" "Run Command" "Runs a command from the command palette." "help,cmd" "" }
|
{RunCommand 1 1 0 0 "query:commands" CmdName commands Nil Null 0 0 0 0 0 1 1 Null "run_command" "Run Command" "Runs a command from the command palette." "help,cmd" "" }
|
||||||
{RunExternalDriverTextCommand 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 1 1 Null "run_ext_driver_text_command" "Run External Driver Text Command" "" "" "" }
|
|
||||||
|
//- rjf: external drivers
|
||||||
|
{RunExternalDriverTextCommand 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "run_ext_driver_text_command" "Run External Driver Text Command" "" "" "" }
|
||||||
|
{State 0 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "state" "State" "" "" "" }
|
||||||
|
{Eval 0 1 0 0 "" Expr null Nil Null 0 0 0 0 0 0 0 Null "eval" "Eval" "" "" "" }
|
||||||
|
{LineFromVAddr 0 1 0 0 "" Vaddr null Nil Null 0 0 0 0 0 0 0 Null "line_from_vaddr" "Line From Virtual Address" "" "" "" }
|
||||||
|
|
||||||
//- rjf: os event passthrough
|
//- rjf: os event passthrough
|
||||||
{WMEvent 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "wm_event" "OS Event" "" "" "" }
|
{WMEvent 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "wm_event" "OS Event" "" "" "" }
|
||||||
@@ -1152,7 +1157,6 @@ RD_CmdTable: // | | | |
|
|||||||
{EnableBreakpoint 1 1 0 0 "query:breakpoints" Cfg null Breakpoint Null 0 0 0 0 1 1 1 CheckFilled "enable_breakpoint" "Enable Breakpoint" "Enables a breakpoint." "" "" }
|
{EnableBreakpoint 1 1 0 0 "query:breakpoints" Cfg null Breakpoint Null 0 0 0 0 1 1 1 CheckFilled "enable_breakpoint" "Enable Breakpoint" "Enables a breakpoint." "" "" }
|
||||||
{DisableBreakpoint 1 1 0 0 "query:breakpoints" Cfg null Breakpoint Null 0 0 0 0 1 1 1 CheckHollow "disable_breakpoint" "Disable Breakpoint" "Disables a breakpoint." "" "" }
|
{DisableBreakpoint 1 1 0 0 "query:breakpoints" Cfg null Breakpoint Null 0 0 0 0 1 1 1 CheckHollow "disable_breakpoint" "Disable Breakpoint" "Disables a breakpoint." "" "" }
|
||||||
{ClearBreakpoints 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Trash "clear_breakpoints" "Clear Breakpoints" "Removes all breakpoints." "" "" }
|
{ClearBreakpoints 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Trash "clear_breakpoints" "Clear Breakpoints" "Removes all breakpoints." "" "" }
|
||||||
{ListBreakpoints 0 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "list_breakpoints" "List Breakpoints" "Lists all breakpoints." "" "" }
|
|
||||||
|
|
||||||
//- rjf: output
|
//- rjf: output
|
||||||
{ClearOutput 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "clear_output" "Clear Output" "Clears all output." "" "" }
|
{ClearOutput 1 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "clear_output" "Clear Output" "Clears all output." "" "" }
|
||||||
|
|||||||
+104
-366
@@ -9227,26 +9227,6 @@ rd_value_string_from_eval(Arena *arena, String8 filter, EV_StringParams *params,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal String8
|
|
||||||
rd_value_string_from_eval2(Arena *arena, String8 filter, EV_StringParams *params, U64 cap, E_Eval eval)
|
|
||||||
{
|
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
|
||||||
String8List strs = {0};
|
|
||||||
EV_StringIter *iter = ev_string_iter_begin(scratch.arena, eval, params);
|
|
||||||
for(String8 string = {0}; ev_string_iter_next(scratch.arena, iter, &string);)
|
|
||||||
{
|
|
||||||
if(strs.total_size + string.size > cap)
|
|
||||||
{
|
|
||||||
str8_list_push(scratch.arena, &strs, str8_lit("..."));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
str8_list_push(scratch.arena, &strs, string);
|
|
||||||
}
|
|
||||||
String8 result = str8_list_join(arena, &strs, 0);
|
|
||||||
scratch_end(scratch);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Hover Eval
|
//~ rjf: Hover Eval
|
||||||
|
|
||||||
@@ -10302,264 +10282,6 @@ rd_next_view_cmd(RD_Cmd **cmd)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ IPC
|
|
||||||
|
|
||||||
internal RD_IpcReply
|
|
||||||
rd_ipc_mdesk_reply_from_string(Arena *arena, String8 string)
|
|
||||||
{
|
|
||||||
MD_ParseResult parse = md_parse_from_text(arena, str8_lit("ipc_reply"), string);
|
|
||||||
return (RD_IpcReply){ .parse = parse, .root = parse.root, parse.root->first };
|
|
||||||
}
|
|
||||||
|
|
||||||
internal B32
|
|
||||||
rd_ipc_parse_string(MD_Node *node, String8 child_name, String8 *out)
|
|
||||||
{
|
|
||||||
MD_Node *child = md_child_from_string(node, child_name, 0);
|
|
||||||
if (!md_node_is_nil(child) && !md_node_is_nil(child->first))
|
|
||||||
{
|
|
||||||
if (out) { *out = child->first->string; }
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal B32
|
|
||||||
rd_ipc_parse_u32(MD_Node *node, String8 child_name, U32 *out)
|
|
||||||
{
|
|
||||||
String8 value = {0};
|
|
||||||
if (rd_ipc_parse_string(node, child_name, &value))
|
|
||||||
{
|
|
||||||
U64 v64 = 0;
|
|
||||||
if (try_u64_from_str8_c_rules(value, &v64))
|
|
||||||
{
|
|
||||||
if (out) { *out = safe_cast_u32(v64); }
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal B32
|
|
||||||
rd_ipc_parse_int_(MD_Node *node, String8 child_name, U64 out_size, void *out)
|
|
||||||
{
|
|
||||||
String8 value = {0};
|
|
||||||
if (rd_ipc_parse_string(node, child_name, &value))
|
|
||||||
{
|
|
||||||
U64 v64 = 0;
|
|
||||||
if (try_u64_from_str8_c_rules(value, &v64))
|
|
||||||
{
|
|
||||||
if (out) { MemoryCopy(out, &v64, out_size); }
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal B32
|
|
||||||
rd_ipc_parse_b32(MD_Node *node, String8 child_name, B32 *out)
|
|
||||||
{
|
|
||||||
B32 is_ok = 0;
|
|
||||||
String8 s = {0};
|
|
||||||
U64 value = 0;
|
|
||||||
if (rd_ipc_parse_string(node, child_name, &s))
|
|
||||||
{
|
|
||||||
if (str8_matchi(s, str8_lit("true"))) { value = 1; is_ok = 1; }
|
|
||||||
else if (str8_matchi(s, str8_lit("false"))) { value = 0; is_ok = 1; }
|
|
||||||
else
|
|
||||||
{
|
|
||||||
is_ok = try_u64_from_str8_c_rules(s, &value);
|
|
||||||
value = !!value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (is_ok && out) { *out = value; }
|
|
||||||
return is_ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
rd_ipc_reply_push(Arena *arena, String8List *out, char *name, String8 value)
|
|
||||||
{
|
|
||||||
str8_list_pushf(arena, out, "%s: \"%S\"\n", name, escaped_from_raw_str8(arena, value));
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
rd_ipc_reply_block_begin(Arena *arena, String8List *out, char *name)
|
|
||||||
{
|
|
||||||
str8_list_pushf(arena, out, "%s: {\n", name);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
rd_ipc_reply_block_end(Arena *arena, String8List *out)
|
|
||||||
{
|
|
||||||
str8_list_pushf(arena, out, "}\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
rd_ipc_reply_push_u64(Arena *arena, String8List *out, char *name, U64 value)
|
|
||||||
{
|
|
||||||
str8_list_pushf(arena, out, "%s: %I64u\n", name, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
rd_ipc_reply_push_str8(Arena *arena, String8List *out, char *name, String8 value)
|
|
||||||
{
|
|
||||||
str8_list_pushf(arena, out, "%s: \"%S\"\n", name, escaped_from_raw_str8(arena, value));
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void
|
|
||||||
rd_ipc_reply_push_b32(Arena *arena, String8List *out, char *name, B32 value)
|
|
||||||
{
|
|
||||||
rd_ipc_reply_push_u64(arena, out, name, !!value);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal String8
|
|
||||||
rd_ipc_make_reply_ack(Arena *arena, String8 cmd, B32 ok)
|
|
||||||
{
|
|
||||||
String8List s = {0};
|
|
||||||
rd_ipc_reply_block_begin(arena, &s, "cmd_reply");
|
|
||||||
rd_ipc_reply_push_b32(arena, &s, "ok", ok);
|
|
||||||
rd_ipc_reply_push (arena, &s, "cmd", cmd);
|
|
||||||
rd_ipc_reply_block_end(arena, &s);
|
|
||||||
return str8_list_join(arena, &s, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal String8
|
|
||||||
rd_ipc_make_reply_status(Arena *arena)
|
|
||||||
{
|
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
|
||||||
String8List s = {0};
|
|
||||||
rd_ipc_reply_block_begin(arena, &s, "status");
|
|
||||||
rd_ipc_reply_push_b32 (arena, &s, "ok", 1);
|
|
||||||
rd_ipc_reply_push_b32 (arena, &s, "running", d_ctrl_targets_running());
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "run_gen", d_run_gen());
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "ip", d_ctrl_last_stop_event().rip_vaddr);
|
|
||||||
rd_ipc_reply_block_end(arena, &s);
|
|
||||||
scratch_end(scratch);
|
|
||||||
return str8_list_join(arena, &s, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal String8
|
|
||||||
rd_ipc_make_reply_stop_event(Arena *arena)
|
|
||||||
{
|
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
|
||||||
|
|
||||||
D_Event e = d_ctrl_last_stop_event();
|
|
||||||
|
|
||||||
String8List stop_cause_list = {0};
|
|
||||||
DR_FStrList stop_cause_fstr = rd_stop_explanation_fstrs_from_ctrl_event(scratch.arena, &e);
|
|
||||||
for EachNode (n, DR_FStrNode, stop_cause_fstr.first) { str8_list_push(scratch.arena, &stop_cause_list, n->v.string); }
|
|
||||||
String8 stop_cause = str8_list_join(arena, &stop_cause_list, &(StringJoin){.sep=str8_lit(" ")});
|
|
||||||
|
|
||||||
String8List s = {0};
|
|
||||||
rd_ipc_reply_block_begin(arena, &s, "stop_event");
|
|
||||||
rd_ipc_reply_push_b32 (arena, &s, "ok", 1);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "arch", e.arch);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "vaddr_min", e.vaddr_rng.min);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "vaddr_max", e.vaddr_rng.max);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "ip_vaddr", e.rip_vaddr);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "sp_base", e.stack_base);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "tls_root", e.tls_root);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "tls_index", e.tls_index);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "tls_offset", e.tls_offset);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "timestamp", e.timestamp);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "exception_code", e.exception_code);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "bp_flags", e.bp_flags);
|
|
||||||
rd_ipc_reply_push_str8(arena, &s, "string", e.string);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "target_os", e.target_os);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &s, "tls_model", e.tls_model);
|
|
||||||
rd_ipc_reply_push_str8(arena, &s, "stop_cause", stop_cause);
|
|
||||||
rd_ipc_reply_block_end(arena, &s);
|
|
||||||
|
|
||||||
String8 result = str8_list_join(arena, &s, 0);
|
|
||||||
scratch_end(scratch);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal String8
|
|
||||||
rd_ipc_make_reply_eval(Arena *arena, String8 expr, E_Eval eval, U64 cap)
|
|
||||||
{
|
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
|
||||||
|
|
||||||
// gather value & type
|
|
||||||
EV_StringParams string_params =
|
|
||||||
{
|
|
||||||
.flags = EV_StringFlag_ReadOnlyDisplayRules|rd_state->eval_viz_base_string_flags,
|
|
||||||
.radix = 10,
|
|
||||||
};
|
|
||||||
String8 value_string = rd_value_string_from_eval2(scratch.arena, str8_zero(), &string_params, cap, eval);
|
|
||||||
String8 type_string = e_type_string_from_key(scratch.arena, eval.irtree.type_key);
|
|
||||||
|
|
||||||
String8List errors = {0};
|
|
||||||
for EachNode(msg, E_Msg, eval.msgs.first) { str8_list_push(scratch.arena, &errors, msg->text); }
|
|
||||||
String8 error_string = str8_list_join(scratch.arena, &errors, &(StringJoin){.sep = str8_lit("; ")});
|
|
||||||
|
|
||||||
// format reply
|
|
||||||
String8List reply = {0};
|
|
||||||
rd_ipc_reply_block_begin(arena, &reply, "eval");
|
|
||||||
rd_ipc_reply_push_b32 (arena, &reply, "ok", 1);
|
|
||||||
rd_ipc_reply_push (arena, &reply, "cmd", str8_lit("eval"));
|
|
||||||
rd_ipc_reply_push (arena, &reply, "expr", expr);
|
|
||||||
rd_ipc_reply_push (arena, &reply, "value", value_string);
|
|
||||||
rd_ipc_reply_push (arena, &reply, "type", type_string);
|
|
||||||
rd_ipc_reply_push (arena, &reply, "error", error_string);
|
|
||||||
rd_ipc_reply_block_end(arena, &reply);
|
|
||||||
String8 result = str8_list_join(arena, &reply, 0);
|
|
||||||
|
|
||||||
scratch_end(scratch);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal String8
|
|
||||||
rd_ipc_make_reply_source_location_from_address(Arena *arena, U64 vaddr)
|
|
||||||
{
|
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
|
||||||
|
|
||||||
D_Entity *process = d_entity_from_handle(rd_base_regs()->process);
|
|
||||||
if(process == &d_entity_nil)
|
|
||||||
{
|
|
||||||
D_Entity *thread = d_entity_from_handle(rd_base_regs()->thread);
|
|
||||||
process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process);
|
|
||||||
}
|
|
||||||
|
|
||||||
D_Entity *module = &d_entity_nil;
|
|
||||||
DI_Key dbgi_key = {0};
|
|
||||||
U64 voff = 0;
|
|
||||||
D_LineList lines = {0};
|
|
||||||
if(process != &d_entity_nil)
|
|
||||||
{
|
|
||||||
module = d_module_from_process_vaddr(process, vaddr);
|
|
||||||
if(module != &d_entity_nil)
|
|
||||||
{
|
|
||||||
dbgi_key = d_dbgi_key_from_module(module);
|
|
||||||
voff = d_voff_from_vaddr(module, vaddr);
|
|
||||||
lines = d_lines_from_dbgi_key_voff(scratch.arena, dbgi_key, voff);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
D_Line line = {0};
|
|
||||||
if(lines.first != 0)
|
|
||||||
{
|
|
||||||
line = lines.first->v;
|
|
||||||
}
|
|
||||||
|
|
||||||
B32 is_ok = (process != &d_entity_nil && module != &d_entity_nil && lines.first != 0);
|
|
||||||
|
|
||||||
String8List reply = {0};
|
|
||||||
rd_ipc_reply_block_begin(arena, &reply, "source_location_from_address");
|
|
||||||
rd_ipc_reply_push_b32 (arena, &reply, "ok", is_ok);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &reply, "vaddr", vaddr);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &reply, "voff", voff);
|
|
||||||
rd_ipc_reply_push_str8(arena, &reply, "file_path", line.file_path);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &reply, "line", line.pt.line);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &reply, "column", line.pt.column);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &reply, "voff_min", line.voff_range.min);
|
|
||||||
rd_ipc_reply_push_u64 (arena, &reply, "voff_max", line.voff_range.max);
|
|
||||||
rd_ipc_reply_block_end(arena, &reply);
|
|
||||||
String8 result = str8_list_join(arena, &reply, 0);
|
|
||||||
|
|
||||||
scratch_end(scratch);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Main Layer Top-Level Calls
|
//~ rjf: Main Layer Top-Level Calls
|
||||||
|
|
||||||
@@ -12857,7 +12579,7 @@ rd_frame(void)
|
|||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
|
||||||
//- rjf: external driver textual commands
|
//- rjf: external drivers
|
||||||
case RD_CmdKind_RunExternalDriverTextCommand:
|
case RD_CmdKind_RunExternalDriverTextCommand:
|
||||||
{
|
{
|
||||||
String8 msg = rd_regs()->string;
|
String8 msg = rd_regs()->string;
|
||||||
@@ -12865,83 +12587,7 @@ rd_frame(void)
|
|||||||
CmdLine msg_cmd_line = cmd_line_from_string_list(scratch.arena, msg_parts);
|
CmdLine msg_cmd_line = cmd_line_from_string_list(scratch.arena, msg_parts);
|
||||||
String8 cmd_kind_name = str8_list_first(&msg_cmd_line.inputs);
|
String8 cmd_kind_name = str8_list_first(&msg_cmd_line.inputs);
|
||||||
RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(cmd_kind_name);
|
RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(cmd_kind_name);
|
||||||
U64 cmd_args_pos = str8_find_needle(msg, 0, cmd_kind_name, StringMatchFlag_CaseInsensitive);
|
if(cmd_kind_info != &rd_nil_cmd_kind_info) RD_RegsScope()
|
||||||
String8 cmd_args = str8_skip_chop_whitespace(str8_skip(msg, cmd_args_pos + cmd_kind_name.size));
|
|
||||||
if(str8_match(cmd_kind_name, str8_lit("status"), 0))
|
|
||||||
{
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_status(rd_state->cmd_output_arena));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("stop_event"), 0))
|
|
||||||
{
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_stop_event(rd_state->cmd_output_arena));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("run"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_Run);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("run"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("halt"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_Halt);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("halt"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("kill_all"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_KillAll);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("kill_all"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("step_over"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_StepOver);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("step_over"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("step_into"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_StepInto);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("step_into"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("step_out"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_StepOut);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("step_out"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("step_over_inst"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_StepOverInst);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("step_over_inst"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("step_into_inst"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_StepIntoInst);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("step_into_inst"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("step_over_line"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_StepOverLine);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("step_over_line"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("step_into_line"), 0))
|
|
||||||
{
|
|
||||||
rd_cmd(RD_CmdKind_StepIntoLine);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_ack(rd_state->cmd_output_arena, str8_lit("step_into_line"), 1));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("eval"), 0))
|
|
||||||
{
|
|
||||||
U64 cap_end = str8_find_needle(cmd_args, 0, str8_lit(" "), 0);
|
|
||||||
String8 cap_str = str8_substr(cmd_args, r1u64(0, cap_end));
|
|
||||||
U64 cap = 0;
|
|
||||||
try_u64_from_str8_c_rules(cap_str, &cap);
|
|
||||||
String8 expr = str8_skip(cmd_args, cap_str.size);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_eval(rd_state->cmd_output_arena, expr, e_eval_from_string(expr), cap));
|
|
||||||
}
|
|
||||||
else if(str8_match(cmd_kind_name, str8_lit("source_location_from_address"), 0))
|
|
||||||
{
|
|
||||||
String8 vaddr_str = str8_skip_chop_whitespace(cmd_args);
|
|
||||||
U64 vaddr = 0;
|
|
||||||
try_u64_from_str8_c_rules(vaddr_str, &vaddr);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, rd_ipc_make_reply_source_location_from_address(rd_state->cmd_output_arena, vaddr));
|
|
||||||
}
|
|
||||||
else if(cmd_kind_info != &rd_nil_cmd_kind_info) RD_RegsScope()
|
|
||||||
{
|
{
|
||||||
for EachNonZeroEnumVal(RD_RegSlot, s)
|
for EachNonZeroEnumVal(RD_RegSlot, s)
|
||||||
{
|
{
|
||||||
@@ -12971,6 +12617,108 @@ rd_frame(void)
|
|||||||
log_user_errorf("`%S` is not a command.", cmd_kind_name);
|
log_user_errorf("`%S` is not a command.", cmd_kind_name);
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
case RD_CmdKind_State:
|
||||||
|
{
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, "state:\n{\n");
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " running: %i\n", d_ctrl_targets_running());
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " run_gen: %I64u\n", d_run_gen());
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " ip: 0x%I64x\n", d_ctrl_last_stop_event().rip_vaddr);
|
||||||
|
{
|
||||||
|
D_Event evt = d_ctrl_last_stop_event();
|
||||||
|
DR_FStrList explanation_fstrs = rd_stop_explanation_fstrs_from_ctrl_event(scratch.arena, &evt);
|
||||||
|
String8 explanation_string = dr_string_from_fstrs(scratch.arena, &explanation_fstrs);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " stop_event:\n {\n");
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " arch: %S\n", string_from_arch(evt.arch));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " vaddr_range: [0x%I64x, 0x%I64x)\n", evt.vaddr_rng.min, evt.vaddr_rng.max);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " ip_vaddr: 0x%I64x\n", evt.rip_vaddr);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " stack_base: 0x%I64x\n", evt.stack_base);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " tls_root: 0x%I64x\n", evt.tls_root);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " tls_index: 0x%I64x\n", evt.tls_index);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " timestamp: 0x%I64x\n", evt.timestamp);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " exception_code: 0x%I64x\n", (U64)evt.exception_code);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " bp_flags: 0x%I64x\n", (U64)evt.bp_flags);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " string: \"%S\"\n", escaped_from_raw_str8(scratch.arena, evt.string));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " tls_model: 0x%I64x\n", evt.tls_model);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " explanation: \"%S\"\n", escaped_from_raw_str8(scratch.arena, explanation_string));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " }\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " threads:\n {\n");
|
||||||
|
D_EntityArray threads = d_entity_array_from_kind(D_EntityKind_Thread);
|
||||||
|
for EachIndex(idx, threads.count)
|
||||||
|
{
|
||||||
|
D_Entity *thread = threads.v[idx];
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " {\n");
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " name: \"%S\"\n", escaped_from_raw_str8(scratch.arena, thread->string));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " id: %I64u\n", thread->id);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " ip: 0x%I64x\n", d_query_cached_rip_from_thread(thread));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " }\n");
|
||||||
|
}
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " }\n");
|
||||||
|
}
|
||||||
|
{
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " modules:\n {\n");
|
||||||
|
D_EntityArray modules = d_entity_array_from_kind(D_EntityKind_Module);
|
||||||
|
for EachIndex(idx, modules.count)
|
||||||
|
{
|
||||||
|
D_Entity *module = modules.v[idx];
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " {\n");
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " name: \"%S\"\n", escaped_from_raw_str8(scratch.arena, module->string));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " vaddr_range: [0x%I64x, 0x%I64x)\n", module->vaddr_range.min, module->vaddr_range.max);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " }\n");
|
||||||
|
}
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " }\n");
|
||||||
|
}
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, "}\n");
|
||||||
|
}break;
|
||||||
|
case RD_CmdKind_Eval:
|
||||||
|
{
|
||||||
|
String8 expr = rd_regs()->expr;
|
||||||
|
E_Eval eval = e_eval_from_string(expr);
|
||||||
|
E_Eval type_eval = e_eval_from_stringf("typeof(%S)", expr);
|
||||||
|
EV_StringParams string_params =
|
||||||
|
{
|
||||||
|
.flags = EV_StringFlag_ReadOnlyDisplayRules | rd_state->eval_viz_base_string_flags,
|
||||||
|
.radix = 10,
|
||||||
|
};
|
||||||
|
String8 value_string = ev_value_string_from_eval(scratch.arena, &string_params, eval, 512);
|
||||||
|
String8 type_value_string = ev_value_string_from_eval(scratch.arena, &string_params, type_eval, 512);
|
||||||
|
String8List msgs_strings = {0};
|
||||||
|
for EachNode(msg, E_Msg, eval.msgs.first)
|
||||||
|
{
|
||||||
|
str8_list_push(scratch.arena, &msgs_strings, msg->text);
|
||||||
|
}
|
||||||
|
StringJoin join = {.sep = s(". ")};
|
||||||
|
String8 msgs_string = str8_list_join(scratch.arena, &msgs_strings, &join);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, "eval:\n{\n");
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " expr: %S\n", expr);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " value: \"%S\"\n", escaped_from_raw_str8(scratch.arena, value_string));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " type: \"%S\"\n", escaped_from_raw_str8(scratch.arena, type_value_string));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " msgs: \"%S\"\n", escaped_from_raw_str8(scratch.arena, msgs_string));
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, "}\n");
|
||||||
|
}break;
|
||||||
|
case RD_CmdKind_LineFromVAddr:
|
||||||
|
{
|
||||||
|
U64 vaddr = rd_regs()->vaddr;
|
||||||
|
D_Entity *thread = d_entity_from_handle(rd_base_regs()->thread);
|
||||||
|
D_Entity *process = d_entity_ancestor_from_kind(thread, D_EntityKind_Process);
|
||||||
|
D_Entity *module = d_module_from_process_vaddr(process, vaddr);
|
||||||
|
U64 voff = d_voff_from_vaddr(module, vaddr);
|
||||||
|
DI_Key dbgi_key = d_dbgi_key_from_module(module);
|
||||||
|
D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, dbgi_key, voff);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, "lines:\n{\n");
|
||||||
|
for EachNode(n, D_LineNode, lines.first)
|
||||||
|
{
|
||||||
|
D_Line line = n->v;
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " {\n");
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " file_path: \"%S\"\n", line.file_path);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " line_num: %I64d\n", line.pt.line);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " column_num: %I64d\n", line.pt.column);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " voff_range: [0x%I64x, 0x%I64x)\n", line.voff_range.min, line.voff_range.max);
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " }\n");
|
||||||
|
}
|
||||||
|
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, "}\n");
|
||||||
|
}break;
|
||||||
|
|
||||||
//- rjf: exiting
|
//- rjf: exiting
|
||||||
case RD_CmdKind_Exit:
|
case RD_CmdKind_Exit:
|
||||||
@@ -15810,16 +15558,6 @@ rd_frame(void)
|
|||||||
cfg_node_release(rd_state->cfg, n->v);
|
cfg_node_release(rd_state->cfg, n->v);
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
case RD_CmdKind_ListBreakpoints:
|
|
||||||
{
|
|
||||||
CFG_NodePtrList list = cfg_node_top_level_list_from_string(scratch.arena, str8_lit("breakpoint"));
|
|
||||||
for(CFG_NodePtrNode *n = list.first; n != 0; n = n->next)
|
|
||||||
{
|
|
||||||
if(rd_cfg_is_project_filtered(n->v)){ continue; }
|
|
||||||
String8 string = cfg_string_from_tree(rd_state->cmd_output_arena, rd_state->cfg_schema_table, str8_zero(), n->v);
|
|
||||||
str8_list_push(rd_state->cmd_output_arena, &rd_state->cmd_outputs, string);
|
|
||||||
}
|
|
||||||
}break;
|
|
||||||
|
|
||||||
//- rjf: output
|
//- rjf: output
|
||||||
case RD_CmdKind_ClearOutput:
|
case RD_CmdKind_ClearOutput:
|
||||||
|
|||||||
@@ -93,17 +93,6 @@ enum
|
|||||||
RD_CmdKindFlag_ListInTextRng = (1<<4),
|
RD_CmdKindFlag_ListInTextRng = (1<<4),
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ IPC
|
|
||||||
|
|
||||||
typedef struct RD_IpcReply RD_IpcReply;
|
|
||||||
struct RD_IpcReply
|
|
||||||
{
|
|
||||||
MD_ParseResult parse;
|
|
||||||
MD_Node *root;
|
|
||||||
MD_Node *msg;
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Autocompletion Cursor Info Type
|
//~ rjf: Autocompletion Cursor Info Type
|
||||||
|
|
||||||
@@ -762,7 +751,6 @@ internal void rd_window_frame(void);
|
|||||||
//~ rjf: Eval Visualization
|
//~ rjf: Eval Visualization
|
||||||
|
|
||||||
internal String8 rd_value_string_from_eval(Arena *arena, String8 filter, EV_StringParams *params, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval);
|
internal String8 rd_value_string_from_eval(Arena *arena, String8 filter, EV_StringParams *params, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval);
|
||||||
internal String8 rd_value_string_from_eval2(Arena *arena, String8 filter, EV_StringParams *params, U64 cap, E_Eval eval);
|
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Hover Eval
|
//~ rjf: Hover Eval
|
||||||
@@ -848,15 +836,6 @@ internal void rd_push_cmd(String8 name, RD_Regs *regs);
|
|||||||
internal B32 rd_next_cmd(RD_Cmd **cmd);
|
internal B32 rd_next_cmd(RD_Cmd **cmd);
|
||||||
internal B32 rd_next_view_cmd(RD_Cmd **cmd);
|
internal B32 rd_next_view_cmd(RD_Cmd **cmd);
|
||||||
|
|
||||||
////////////////////////////////
|
|
||||||
//~ IPC
|
|
||||||
|
|
||||||
internal RD_IpcReply rd_ipc_mdesk_reply_from_string(Arena *arena, String8 string);
|
|
||||||
internal B32 rd_ipc_parse_string(MD_Node *node, String8 child_name, String8 *out);
|
|
||||||
internal B32 rd_ipc_parse_int_(MD_Node *node, String8 child_name, U64 out_size, void *out);
|
|
||||||
#define rd_ipc_parse_int(a, b, c) rd_ipc_parse_int_(a, b, sizeof(*c), c)
|
|
||||||
internal B32 rd_ipc_parse_b32(MD_Node *node, String8 child_name, B32 *out);
|
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Main Layer Top-Level Calls
|
//~ rjf: Main Layer Top-Level Calls
|
||||||
|
|
||||||
|
|||||||
@@ -295,7 +295,6 @@
|
|||||||
#include "x64/x64.h"
|
#include "x64/x64.h"
|
||||||
#include "win32/win32_inc.h"
|
#include "win32/win32_inc.h"
|
||||||
#include "linker/hash_table.h"
|
#include "linker/hash_table.h"
|
||||||
#include "linker/lf_hash_table.h"
|
|
||||||
#include "linker/base_ext/base_bit_array.h"
|
#include "linker/base_ext/base_bit_array.h"
|
||||||
#include "artifact_cache/artifact_cache.h"
|
#include "artifact_cache/artifact_cache.h"
|
||||||
#include "rdi/rdi_local.h"
|
#include "rdi/rdi_local.h"
|
||||||
@@ -328,7 +327,6 @@
|
|||||||
#include "rdi_from_coff/rdi_from_coff.h"
|
#include "rdi_from_coff/rdi_from_coff.h"
|
||||||
#include "rdi_from_elf/rdi_from_elf.h"
|
#include "rdi_from_elf/rdi_from_elf.h"
|
||||||
#include "rdi_from_pdb/rdi_from_pdb.h"
|
#include "rdi_from_pdb/rdi_from_pdb.h"
|
||||||
#include "rdi_from_dwarf/rdi_from_dwarf.h"
|
|
||||||
#include "rdi_from_dwarf/rdi_from_dwarf_2.h"
|
#include "rdi_from_dwarf/rdi_from_dwarf_2.h"
|
||||||
#include "radbin/radbin.h"
|
#include "radbin/radbin.h"
|
||||||
#include "arch/arch_inc.h"
|
#include "arch/arch_inc.h"
|
||||||
@@ -351,7 +349,6 @@
|
|||||||
#include "x64/x64.c"
|
#include "x64/x64.c"
|
||||||
#include "win32/win32_inc.c"
|
#include "win32/win32_inc.c"
|
||||||
#include "linker/hash_table.c"
|
#include "linker/hash_table.c"
|
||||||
#include "linker/lf_hash_table.c"
|
|
||||||
#include "linker/base_ext/base_bit_array.c"
|
#include "linker/base_ext/base_bit_array.c"
|
||||||
#include "artifact_cache/artifact_cache.c"
|
#include "artifact_cache/artifact_cache.c"
|
||||||
#include "rdi/rdi_local.c"
|
#include "rdi/rdi_local.c"
|
||||||
@@ -384,7 +381,6 @@
|
|||||||
#include "rdi_from_coff/rdi_from_coff.c"
|
#include "rdi_from_coff/rdi_from_coff.c"
|
||||||
#include "rdi_from_elf/rdi_from_elf.c"
|
#include "rdi_from_elf/rdi_from_elf.c"
|
||||||
#include "rdi_from_pdb/rdi_from_pdb.c"
|
#include "rdi_from_pdb/rdi_from_pdb.c"
|
||||||
#include "rdi_from_dwarf/rdi_from_dwarf.c"
|
|
||||||
#include "rdi_from_dwarf/rdi_from_dwarf_2.c"
|
#include "rdi_from_dwarf/rdi_from_dwarf_2.c"
|
||||||
#include "radbin/radbin.c"
|
#include "radbin/radbin.c"
|
||||||
#include "arch/arch_inc.c"
|
#include "arch/arch_inc.c"
|
||||||
|
|||||||
@@ -2313,7 +2313,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
|
|||||||
for EachNode(override_n, String8Node, overrides.first)
|
for EachNode(override_n, String8Node, overrides.first)
|
||||||
{
|
{
|
||||||
String8 file_path = override_n->string;
|
String8 file_path = override_n->string;
|
||||||
String8 file_path_normalized = rdim_normalize_path_str8(scratch.arena, file_path);
|
String8 file_path_normalized = rdim_normalized_from_path(scratch.arena, file_path);
|
||||||
B32 good_src_id = 0;
|
B32 good_src_id = 0;
|
||||||
U32 src_id = 0;
|
U32 src_id = 0;
|
||||||
if(rdi != &rdi_parsed_nil)
|
if(rdi != &rdi_parsed_nil)
|
||||||
|
|||||||
@@ -1202,7 +1202,7 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
|
|||||||
Rng1U64 range = lane_range(n->count);
|
Rng1U64 range = lane_range(n->count);
|
||||||
for EachInRange(n_idx, range)
|
for EachInRange(n_idx, range)
|
||||||
{
|
{
|
||||||
RDIM_String8 normalized_path = rdim_normalize_path_str8(scratch.arena, n->v[n_idx].path);
|
RDIM_String8 normalized_path = rdim_normalized_from_path(scratch.arena, n->v[n_idx].path);
|
||||||
rdim_bake_string_map_loose_insert(scratch.arena, top, lane_map, 1, normalized_path);
|
rdim_bake_string_map_loose_insert(scratch.arena, top, lane_map, 1, normalized_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1505,7 +1505,7 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
|
|||||||
for EachInRange(n_idx, n_range)
|
for EachInRange(n_idx, n_range)
|
||||||
{
|
{
|
||||||
RDIM_SrcFile *src_file = &n->v[n_idx];
|
RDIM_SrcFile *src_file = &n->v[n_idx];
|
||||||
RDIM_String8 normalized_path = rdim_normalize_path_str8(scratch.arena, src_file->path);
|
RDIM_String8 normalized_path = rdim_normalized_from_path(scratch.arena, src_file->path);
|
||||||
rdim_bake_name_map_insert(scratch.arena, top, map, 4, normalized_path, rdim_idx_from_src_file(src_file));
|
rdim_bake_name_map_insert(scratch.arena, top, map, 4, normalized_path, rdim_idx_from_src_file(src_file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2450,7 +2450,7 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params)
|
|||||||
|
|
||||||
//- rjf: fill file info
|
//- rjf: fill file info
|
||||||
Temp scratch2 = scratch_begin(&scratch.arena, 1);
|
Temp scratch2 = scratch_begin(&scratch.arena, 1);
|
||||||
String8 normalized_path = rdim_normalize_path_str8(scratch2.arena, src->path);
|
String8 normalized_path = rdim_normalized_from_path(scratch2.arena, src->path);
|
||||||
B32 has_checksum = (RDI_ChecksumKind_NULL < src->checksum_kind && src->checksum_kind < RDI_ChecksumKind_COUNT && src->checksum.size != 0);
|
B32 has_checksum = (RDI_ChecksumKind_NULL < src->checksum_kind && src->checksum_kind < RDI_ChecksumKind_COUNT && src->checksum.size != 0);
|
||||||
dst->file_path_node_idx = rdim_bake_path_node_idx_from_string(path_tree, src->path);
|
dst->file_path_node_idx = rdim_bake_path_node_idx_from_string(path_tree, src->path);
|
||||||
dst->normal_full_path_string_idx = rdim_bake_idx_from_string(bake_strings, normalized_path);
|
dst->normal_full_path_string_idx = rdim_bake_idx_from_string(bake_strings, normalized_path);
|
||||||
|
|||||||
@@ -7,6 +7,88 @@
|
|||||||
|
|
||||||
extern B32 g_stop_on_first_fail_or_crash;
|
extern B32 g_stop_on_first_fail_or_crash;
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
// Debugger IPC Replies
|
||||||
|
|
||||||
|
typedef struct RD_IpcReply RD_IpcReply;
|
||||||
|
struct RD_IpcReply
|
||||||
|
{
|
||||||
|
MD_ParseResult parse;
|
||||||
|
MD_Node *root;
|
||||||
|
MD_Node *msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
internal RD_IpcReply
|
||||||
|
rd_ipc_mdesk_reply_from_string(Arena *arena, String8 string)
|
||||||
|
{
|
||||||
|
MD_ParseResult parse = md_parse_from_text(arena, str8_lit("ipc_reply"), string);
|
||||||
|
return (RD_IpcReply){ .parse = parse, .root = parse.root, parse.root->first };
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
rd_ipc_parse_string(MD_Node *node, String8 child_name, String8 *out)
|
||||||
|
{
|
||||||
|
MD_Node *child = md_child_from_string(node, child_name, 0);
|
||||||
|
if (!md_node_is_nil(child) && !md_node_is_nil(child->first))
|
||||||
|
{
|
||||||
|
if (out) { *out = child->first->string; }
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
rd_ipc_parse_u32(MD_Node *node, String8 child_name, U32 *out)
|
||||||
|
{
|
||||||
|
String8 value = {0};
|
||||||
|
if (rd_ipc_parse_string(node, child_name, &value))
|
||||||
|
{
|
||||||
|
U64 v64 = 0;
|
||||||
|
if (try_u64_from_str8_c_rules(value, &v64))
|
||||||
|
{
|
||||||
|
if (out) { *out = safe_cast_u32(v64); }
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
rd_ipc_parse_int_(MD_Node *node, String8 child_name, U64 out_size, void *out)
|
||||||
|
{
|
||||||
|
String8 value = {0};
|
||||||
|
if (rd_ipc_parse_string(node, child_name, &value))
|
||||||
|
{
|
||||||
|
U64 v64 = 0;
|
||||||
|
if (try_u64_from_str8_c_rules(value, &v64))
|
||||||
|
{
|
||||||
|
if (out) { MemoryCopy(out, &v64, out_size); }
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal B32
|
||||||
|
rd_ipc_parse_b32(MD_Node *node, String8 child_name, B32 *out)
|
||||||
|
{
|
||||||
|
B32 is_ok = 0;
|
||||||
|
String8 s = {0};
|
||||||
|
U64 value = 0;
|
||||||
|
if (rd_ipc_parse_string(node, child_name, &s))
|
||||||
|
{
|
||||||
|
if (str8_matchi(s, str8_lit("true"))) { value = 1; is_ok = 1; }
|
||||||
|
else if (str8_matchi(s, str8_lit("false"))) { value = 0; is_ok = 1; }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
is_ok = try_u64_from_str8_c_rules(s, &value);
|
||||||
|
value = !!value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_ok && out) { *out = value; }
|
||||||
|
return is_ok;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// IPC Controller
|
// IPC Controller
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user