mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-21 23:12:01 -07:00
eval viz: view rule -> expansion rule; rd: view rule -> view ui rule
This commit is contained in:
@@ -562,23 +562,6 @@ str8_lit_comp("5"),
|
||||
str8_lit_comp("c"),
|
||||
};
|
||||
|
||||
RD_ViewRuleInfo rd_view_rule_kind_info_table[13] =
|
||||
{
|
||||
{{0}, {0}, {0}, {0}, RD_IconKind_Null, 0, EV_EXPAND_RULE_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(null)},
|
||||
{str8_lit_comp("empty"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), RD_IconKind_Null, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_EXPAND_RULE_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(empty)},
|
||||
{str8_lit_comp("getting_started"), str8_lit_comp(""), str8_lit_comp("Getting Started"), str8_lit_comp(""), RD_IconKind_QuestionMark, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_EXPAND_RULE_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(getting_started)},
|
||||
{str8_lit_comp("settings"), str8_lit_comp("An interface to modify general settings for the debugger's appearance and behavior."), str8_lit_comp("Settings"), str8_lit_comp(""), RD_IconKind_Gear, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_EXPAND_RULE_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(settings)},
|
||||
{str8_lit_comp("pending_file"), str8_lit_comp(""), str8_lit_comp("Pending File"), str8_lit_comp(""), RD_IconKind_FileOutline, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_EXPAND_RULE_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(pending_file)},
|
||||
{str8_lit_comp("watch"), str8_lit_comp("The familiar 'watch window' debugger interface. Allows the inputting of a number of expressions. Each expression in the table is evaluated within the context of the selected thread's selected call stack frame. If applicable (depending on visualization rules and the expression's type), these expressions may be hierarchically expanded, which displays children as more rows in the table. The values of these expressions may also be edited, and if possible, can be used to write to registers or memory in attached processes. Also contains a new *view rule* column, not found in other major debuggers, which allows per-row specification of various visualization rules. These view rules may be used to visualize and inspect the evaluation of expressions in a variety of ways. To learn more, read the 'View Rules' section."), str8_lit_comp("Watch"), str8_lit_comp(""), RD_IconKind_Binoculars, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*1|RD_ViewRuleInfoFlag_FilterIsCode*1|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*1|RD_ViewRuleInfoFlag_CanUseInWatchTable*0|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*0), EV_EXPAND_RULE_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(watch)},
|
||||
{str8_lit_comp("text"), str8_lit_comp(""), str8_lit_comp("Text"), str8_lit_comp("x:{'lang':lang, 'size':expr}"), RD_IconKind_FileOutline, (RD_ViewRuleInfoFlag_ShowInDocs*0|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*1|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*1), EV_EXPAND_RULE_INFO_FUNCTION_NAME(text) , RD_VIEW_RULE_UI_FUNCTION_NAME(text)},
|
||||
{str8_lit_comp("disasm"), str8_lit_comp("Displays disassembled instructions in a textual form from the selected thread's containing process virtual address space."), str8_lit_comp("Disassembly"), str8_lit_comp("x:{'arch':arch, 'size':expr, 'addresses':bool, 'code_bytes':bool}"), RD_IconKind_Glasses, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*1|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*1), EV_EXPAND_RULE_INFO_FUNCTION_NAME(disasm) , RD_VIEW_RULE_UI_FUNCTION_NAME(disasm)},
|
||||
{str8_lit_comp("memory"), str8_lit_comp("A hex-editor-like grid interface for viewing memory."), str8_lit_comp("Memory"), str8_lit_comp("x:{'size':expr}"), RD_IconKind_Grid, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*1|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*1), EV_EXPAND_RULE_INFO_FUNCTION_NAME(memory) , RD_VIEW_RULE_UI_FUNCTION_NAME(memory)},
|
||||
{str8_lit_comp("bitmap"), str8_lit_comp("Visualizes memory as a bitmap."), str8_lit_comp("Bitmap"), str8_lit_comp("x:{'w':expr, 'h':expr, 'fmt':tex2dformat}"), RD_IconKind_Binoculars, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*1|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*1), EV_EXPAND_RULE_INFO_FUNCTION_NAME(bitmap) , RD_VIEW_RULE_UI_FUNCTION_NAME(bitmap)},
|
||||
{str8_lit_comp("checkbox"), str8_lit_comp("Visualizes memory as an RGBA color."), str8_lit_comp("Checkbox"), str8_lit_comp(""), RD_IconKind_CheckFilled, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*1|RD_ViewRuleInfoFlag_CanFillValueCell*1|RD_ViewRuleInfoFlag_CanExpand*0), EV_EXPAND_RULE_INFO_FUNCTION_NAME(nil), RD_VIEW_RULE_UI_FUNCTION_NAME(checkbox)},
|
||||
{str8_lit_comp("color_rgba"), str8_lit_comp("Visualizes memory as an RGBA color."), str8_lit_comp("Color (RGBA)"), str8_lit_comp(""), RD_IconKind_Palette, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*1|RD_ViewRuleInfoFlag_CanFillValueCell*1|RD_ViewRuleInfoFlag_CanExpand*1), EV_EXPAND_RULE_INFO_FUNCTION_NAME(color_rgba) , RD_VIEW_RULE_UI_FUNCTION_NAME(color_rgba)},
|
||||
{str8_lit_comp("geo3d"), str8_lit_comp("Visualizes memory as 3D geometry."), str8_lit_comp("Geometry (3D)"), str8_lit_comp("x:{'count':expr, 'vtx':expr, 'vtx_size':expr}"), RD_IconKind_Binoculars, (RD_ViewRuleInfoFlag_ShowInDocs*1|RD_ViewRuleInfoFlag_CanFilter*0|RD_ViewRuleInfoFlag_FilterIsCode*0|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*0|RD_ViewRuleInfoFlag_CanUseInWatchTable*1|RD_ViewRuleInfoFlag_CanFillValueCell*0|RD_ViewRuleInfoFlag_CanExpand*1), EV_EXPAND_RULE_INFO_FUNCTION_NAME(geo3d) , RD_VIEW_RULE_UI_FUNCTION_NAME(geo3d)},
|
||||
};
|
||||
|
||||
String8 rd_theme_preset_display_string_table[9] =
|
||||
{
|
||||
str8_lit_comp("Default (Dark)"),
|
||||
|
||||
@@ -350,24 +350,6 @@ RD_IconKind_Dot,
|
||||
RD_IconKind_COUNT,
|
||||
} RD_IconKind;
|
||||
|
||||
typedef enum RD_ViewRuleKind
|
||||
{
|
||||
RD_ViewRuleKind_Null,
|
||||
RD_ViewRuleKind_Empty,
|
||||
RD_ViewRuleKind_GettingStarted,
|
||||
RD_ViewRuleKind_Settings,
|
||||
RD_ViewRuleKind_PendingFile,
|
||||
RD_ViewRuleKind_Watch,
|
||||
RD_ViewRuleKind_Text,
|
||||
RD_ViewRuleKind_Disasm,
|
||||
RD_ViewRuleKind_Memory,
|
||||
RD_ViewRuleKind_Bitmap,
|
||||
RD_ViewRuleKind_Checkbox,
|
||||
RD_ViewRuleKind_ColorRGBA,
|
||||
RD_ViewRuleKind_Geo3D,
|
||||
RD_ViewRuleKind_COUNT,
|
||||
} RD_ViewRuleKind;
|
||||
|
||||
typedef enum RD_ThemeColor
|
||||
{
|
||||
RD_ThemeColor_Null,
|
||||
@@ -545,19 +527,6 @@ RD_CmdKindFlags flags;
|
||||
RD_Query query;
|
||||
};
|
||||
|
||||
typedef struct RD_ViewRuleInfo RD_ViewRuleInfo;
|
||||
struct RD_ViewRuleInfo
|
||||
{
|
||||
String8 string;
|
||||
String8 description;
|
||||
String8 display_name;
|
||||
String8 params_schema;
|
||||
RD_IconKind icon_kind;
|
||||
RD_ViewRuleInfoFlags flags;
|
||||
EV_ExpandRuleInfoHookFunctionType *expr_expand_info;
|
||||
RD_ViewRuleUIFunctionType *ui;
|
||||
};
|
||||
|
||||
#define rd_regs_lit_init_top \
|
||||
.machine = rd_regs()->machine,\
|
||||
.module = rd_regs()->module,\
|
||||
@@ -597,25 +566,6 @@ RD_ViewRuleUIFunctionType *ui;
|
||||
.params_tree = rd_regs()->params_tree,\
|
||||
.os_event = rd_regs()->os_event,\
|
||||
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(null);
|
||||
EV_EXPAND_RULE_INFO_FUNCTION_DEF(text);
|
||||
EV_EXPAND_RULE_INFO_FUNCTION_DEF(disasm);
|
||||
EV_EXPAND_RULE_INFO_FUNCTION_DEF(memory);
|
||||
EV_EXPAND_RULE_INFO_FUNCTION_DEF(bitmap);
|
||||
EV_EXPAND_RULE_INFO_FUNCTION_DEF(color_rgba);
|
||||
EV_EXPAND_RULE_INFO_FUNCTION_DEF(geo3d);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(empty);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(getting_started);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(settings);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(pending_file);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(watch);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(text);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(disasm);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(memory);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(bitmap);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(checkbox);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(color_rgba);
|
||||
RD_VIEW_RULE_UI_FUNCTION_DEF(geo3d);
|
||||
C_LINKAGE_BEGIN
|
||||
extern String8 rd_cfg_src_string_table[4];
|
||||
extern RD_CmdKind rd_cfg_src_load_cmd_kind_table[4];
|
||||
@@ -627,7 +577,6 @@ extern RD_StringBindingPair rd_default_binding_table[111];
|
||||
extern String8 rd_binding_version_remap_old_name_table[8];
|
||||
extern String8 rd_binding_version_remap_new_name_table[8];
|
||||
extern String8 rd_icon_kind_text_table[69];
|
||||
extern RD_ViewRuleInfo rd_view_rule_kind_info_table[13];
|
||||
extern String8 rd_theme_preset_display_string_table[9];
|
||||
extern String8 rd_theme_preset_code_string_table[9];
|
||||
extern String8 rd_theme_color_version_remap_old_name_table[22];
|
||||
|
||||
Reference in New Issue
Block a user