mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-09-22 09:10:05 +00:00
Compare commits
31
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9086233d89 | ||
|
|
ad1b2fa23d | ||
|
|
f67098f54b | ||
|
|
ea4e671a44 | ||
|
|
0c4c18c64f | ||
|
|
ba9d68951d | ||
|
|
340d504f10 | ||
|
|
e8f03562bf | ||
|
|
c946f88b2a | ||
|
|
56e7bae038 | ||
|
|
c1741b4f39 | ||
|
|
ba41543543 | ||
|
|
5ae60aedc5 | ||
|
|
f23979e20a | ||
|
|
57fb0eb833 | ||
|
|
5d2d13d9d9 | ||
|
|
8342cfbd53 | ||
|
|
2721adf088 | ||
|
|
ffcecd659e | ||
|
|
0ccfb51102 | ||
|
|
f41f8dd719 | ||
|
|
fa6b04ab24 | ||
|
|
156615a3ba | ||
|
|
57a35c6b28 | ||
|
|
76ce8a79c2 | ||
|
|
932db741fa | ||
|
|
0add3ef72c | ||
|
|
e417a96ce4 | ||
|
|
b2262532a7 | ||
|
|
b24326f502 | ||
|
|
66c1fa337c |
@@ -0,0 +1,15 @@
|
||||
Clear-Host
|
||||
|
||||
$path_root = git rev-parse --show-toplevel
|
||||
|
||||
if ($IsWindows) {
|
||||
$devshell = Join-Path $path_root 'scripts/helpers/devshell.ps1'
|
||||
& $devshell -arch amd64
|
||||
}
|
||||
|
||||
Push-Location $path_root
|
||||
|
||||
$build_bat = Join-Path $path_root 'build.bat'
|
||||
& $build_bat @args
|
||||
|
||||
Pop-Location
|
||||
@@ -0,0 +1,10 @@
|
||||
Clear-Host
|
||||
$path_root = git rev-parse --show-toplevel
|
||||
$build_dir = Join-Path $path_root 'build'
|
||||
|
||||
if (Test-Path $build_dir) {
|
||||
Get-ChildItem -Path $build_dir -Recurse | Remove-Item -Force -Recurse
|
||||
Write-Host "Build directory cleaned."
|
||||
} else {
|
||||
Write-Host "Build directory does not exist."
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
if ($env:VCINSTALLDIR) {
|
||||
return
|
||||
}
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Use vswhere to find the latest Visual Studio installation
|
||||
$vswhere_out = & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
|
||||
if ($null -eq $vswhere_out) {
|
||||
Write-Host "ERROR: Visual Studio installation not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Find Launch-VsDevShell.ps1 in the Visual Studio installation
|
||||
$vs_path = $vswhere_out
|
||||
$vs_devshell = Join-Path $vs_path "\Common7\Tools\Launch-VsDevShell.ps1"
|
||||
|
||||
if ( -not (Test-Path $vs_devshell) ) {
|
||||
Write-Host "ERROR: Launch-VsDevShell.ps1 not found in Visual Studio installation"
|
||||
Write-Host Tested path: $vs_devshell
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Launch the Visual Studio Developer Shell
|
||||
Push-Location
|
||||
write-host @args
|
||||
& $vs_devshell @args
|
||||
Pop-Location
|
||||
@@ -505,6 +505,7 @@ DF_CoreViewRuleTable:
|
||||
{
|
||||
{Null null "" - - - - "" - "" "" }
|
||||
{Array array "array" - - x - "Array" x "x:{expr}" "Specifies that a pointer points to N elements, rather than only 1." }
|
||||
{Slice slice "slice" - - x - "Slice" x "" "Specifies a struct of {data, len} should be rendered as a slice." }
|
||||
{List list "list" - - - x "List" x "x:{member}" "Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list." }
|
||||
{ByteSwap bswap "bswap" x - x - "Byte Swap" x "" "Specifies that all integer primitives should be byte-swapped, such that their endianness is reversed." }
|
||||
{BaseDec base_dec "dec" x - - - "Decimal Base (Base 10)" x "" "Specifies that all integral evaluations should appear in base-10 form." }
|
||||
@@ -520,6 +521,7 @@ DF_CoreViewRuleTable:
|
||||
{Graph graph "graph" - x - x "Graph" x "" "Displays as a pointer graph, visualizing nodes and edges formed by pointers directly." }
|
||||
{Bitmap bitmap "bitmap" - x - x "Bitmap" x "x:{'w':expr, 'h':expr, 'fmt':tex2dformat}" "Displays as a bitmap, interpreting the data as raw pixel data." }
|
||||
{Geo geo "geo" - x - x "Geometry" x "x:{'count':expr, 'vertices_base':expr, 'vertices_size':expr}" "Displays as geometry, interpreting the data as vertex data." }
|
||||
{OdinMap odin_map "odin_map" - x - x "Odin map" x "" "Specifies that a struct should be rendered as an Odin map type." }
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//- GENERATED CODE
|
||||
|
||||
C_LINKAGE_BEGIN
|
||||
Rng1U64 df_g_cmd_param_slot_range_table[22] =
|
||||
Rng1U64 df_g_cmd_param_slot_range_table[21] =
|
||||
{
|
||||
{0},
|
||||
{OffsetOf(DF_CmdParams, window), OffsetOf(DF_CmdParams, window) + sizeof(DF_Handle)},
|
||||
@@ -20,7 +20,6 @@ Rng1U64 df_g_cmd_param_slot_range_table[22] =
|
||||
{OffsetOf(DF_CmdParams, cmd_spec), OffsetOf(DF_CmdParams, cmd_spec) + sizeof(struct DF_CmdSpec *)},
|
||||
{OffsetOf(DF_CmdParams, view_spec), OffsetOf(DF_CmdParams, view_spec) + sizeof(struct DF_ViewSpec *)},
|
||||
{OffsetOf(DF_CmdParams, cfg_node), OffsetOf(DF_CmdParams, cfg_node) + sizeof(struct DF_CfgNode *)},
|
||||
{OffsetOf(DF_CmdParams, os_event), OffsetOf(DF_CmdParams, os_event) + sizeof(struct OS_Event *)},
|
||||
{OffsetOf(DF_CmdParams, vaddr), OffsetOf(DF_CmdParams, vaddr) + sizeof(U64)},
|
||||
{OffsetOf(DF_CmdParams, voff), OffsetOf(DF_CmdParams, voff) + sizeof(U64)},
|
||||
{OffsetOf(DF_CmdParams, index), OffsetOf(DF_CmdParams, index) + sizeof(U64)},
|
||||
@@ -207,13 +206,12 @@ DF_CoreCmdKind_Null,
|
||||
DF_CoreCmdKind_Null,
|
||||
};
|
||||
|
||||
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[220] =
|
||||
DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[214] =
|
||||
{
|
||||
{ str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X},
|
||||
{ str8_lit_comp("run_command"), str8_lit_comp("Runs a command from the command palette."), str8_lit_comp("help,cmd"), str8_lit_comp("Run Command"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_CmdSpec, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("error"), str8_lit_comp("Notifies of an error."), str8_lit_comp(""), str8_lit_comp("Error"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("os_event"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("OS Event"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_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("Launch and Run"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_EntityList, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Play},
|
||||
{ str8_lit_comp("launch_and_init"), str8_lit_comp("Starts debugging a new instance of a target, then stops at the program's entry point."), str8_lit_comp("launch,start,entry,point"), str8_lit_comp("Launch and Initialize"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_EntityList, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_PlayStepForward},
|
||||
{ str8_lit_comp("kill"), str8_lit_comp("Kills the specified existing debugged process(es)."), str8_lit_comp("stop,kill"), str8_lit_comp("Kill"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_EntityList, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Stop},
|
||||
@@ -307,9 +305,6 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[220] =
|
||||
{ str8_lit_comp("apply_profile_data"), str8_lit_comp("Applies profile data from the active profile file."), str8_lit_comp(""), str8_lit_comp("Apply Profile Data"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp("Write User Data"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("write_profile_data"), str8_lit_comp("Writes profile data to the active profile file."), str8_lit_comp(""), str8_lit_comp("Write Profile Data"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("edit"), str8_lit_comp("Edits the current selection."), str8_lit_comp(""), str8_lit_comp("Edit"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Pencil},
|
||||
{ str8_lit_comp("accept"), str8_lit_comp("Accepts current changes, or answers prompts in the affirmative."), str8_lit_comp(""), str8_lit_comp("Accept"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_CheckFilled},
|
||||
{ str8_lit_comp("cancel"), str8_lit_comp("Rejects current changes, exits temporary menus, or answers prompts in the negative."), str8_lit_comp(""), str8_lit_comp("Cancel"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_X},
|
||||
{ str8_lit_comp("move_left"), str8_lit_comp("Moves the cursor or selection left."), str8_lit_comp(""), str8_lit_comp("Move Left"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_right"), str8_lit_comp("Moves the cursor or selection right."), str8_lit_comp(""), str8_lit_comp("Move Right"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_up"), str8_lit_comp("Moves the cursor or selection up."), str8_lit_comp(""), str8_lit_comp("Move Up"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
@@ -334,8 +329,6 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[220] =
|
||||
{ str8_lit_comp("move_down_page_select"), str8_lit_comp("Moves the cursor or selection down one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Page Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_up_whole_select"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Whole Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_down_whole_select"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Whole Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_up_reorder"), str8_lit_comp("Moves the cursor or selection up, while swapping the currently selected element with that upward."), str8_lit_comp(""), str8_lit_comp("Move Up Reorder"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_down_reorder"), str8_lit_comp("Moves the cursor or selection down, while swapping the currently selected element with that downward."), str8_lit_comp(""), str8_lit_comp("Move Down Reorder"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_home"), str8_lit_comp("Moves the cursor to the beginning of the line."), str8_lit_comp(""), str8_lit_comp("Move Home"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_end"), str8_lit_comp("Moves the cursor to the end of the line."), str8_lit_comp(""), str8_lit_comp("Move End"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
{ str8_lit_comp("move_home_select"), str8_lit_comp("Moves the cursor to the beginning of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Home Select"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
@@ -431,25 +424,27 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[220] =
|
||||
{ str8_lit_comp("toggle_dev_menu"), str8_lit_comp("Opens and closes the developer menu."), str8_lit_comp(""), str8_lit_comp("Toggle Developer Menu"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null},
|
||||
};
|
||||
|
||||
DF_CoreViewRuleSpecInfo df_g_core_view_rule_spec_info_table[17] =
|
||||
DF_CoreViewRuleSpecInfo df_g_core_view_rule_spec_info_table[19] =
|
||||
{
|
||||
{str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("array"), str8_lit_comp("Array"), str8_lit_comp("x:{expr}"), str8_lit_comp("Specifies that a pointer points to N elements, rather than only 1."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(array) , 0, },
|
||||
{str8_lit_comp("list"), str8_lit_comp("List"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(list) , },
|
||||
{str8_lit_comp("bswap"), str8_lit_comp("Byte Swap"), str8_lit_comp(""), str8_lit_comp("Specifies that all integer primitives should be byte-swapped, such that their endianness is reversed."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(bswap) , 0, },
|
||||
{str8_lit_comp("dec"), str8_lit_comp("Decimal Base (Base 10)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-10 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("bin"), str8_lit_comp("Binary Base (Base 2)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-2 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("oct"), str8_lit_comp("Octal Base (Base 8)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-8 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("hex"), str8_lit_comp("Hexadecimal Base (Base 16)"), str8_lit_comp(""), str8_lit_comp("Specifies that all integral evaluations should appear in base-16 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("only"), str8_lit_comp("Only Specified Members"), str8_lit_comp("x:{member}"), str8_lit_comp("Specifies that only the specified members should appear in struct, union, or class evaluations."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(only) , },
|
||||
{str8_lit_comp("omit"), str8_lit_comp("Omit Specified Members"), str8_lit_comp("x:{member}"), str8_lit_comp("Omits a list of member names from appearing in struct, union, or class evaluations."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(omit) , },
|
||||
{str8_lit_comp("no_addr"), str8_lit_comp("Disable Address Values"), str8_lit_comp(""), str8_lit_comp("Displays only what pointers point to, if possible, without the pointer's address value."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("rgba"), str8_lit_comp("Color (RGBA)"), str8_lit_comp(""), str8_lit_comp("Displays as a color, interpreting the data as encoding R, G, B, and A values."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(rgba) , },
|
||||
{str8_lit_comp("text"), str8_lit_comp("Text"), str8_lit_comp("x:{'lang':lang, 'size':expr}"), str8_lit_comp("Displays as text."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(text) , },
|
||||
{str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), str8_lit_comp("x:{'arch':arch, 'size':expr}"), str8_lit_comp("Displays as disassembled instructions, interpreting the data as raw machine code."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(disasm) , },
|
||||
{str8_lit_comp("graph"), str8_lit_comp("Graph"), str8_lit_comp(""), str8_lit_comp("Displays as a pointer graph, visualizing nodes and edges formed by pointers directly."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(graph) , },
|
||||
{str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), str8_lit_comp("x:{'w':expr, 'h':expr, 'fmt':tex2dformat}"), str8_lit_comp("Displays as a bitmap, interpreting the data as raw pixel data."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(bitmap) , },
|
||||
{str8_lit_comp("geo"), str8_lit_comp("Geometry"), str8_lit_comp("x:{'count':expr, 'vertices_base':expr, 'vertices_size':expr}"), str8_lit_comp("Displays as geometry, interpreting the data as vertex data."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(geo) , },
|
||||
{str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp(""), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("array"), str8_lit_comp("Array"), str8_lit_comp("Specifies that a pointer points to N elements, rather than only 1."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(array) , 0, },
|
||||
{str8_lit_comp("slice"), str8_lit_comp("Slice"), str8_lit_comp("Specifies that a struct to be rendered as a slice."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(slice) , 0, },
|
||||
{str8_lit_comp("list"), str8_lit_comp("List"), str8_lit_comp("Specifies that some struct, union, or class forms the top of a linked list, and the member which points at the following element in the list."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(list) , },
|
||||
{str8_lit_comp("bswap"), str8_lit_comp("Byte Swap"), str8_lit_comp("Specifies that all integer primitives should be byte-swapped, such that their endianness is reversed."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*1)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_NAME(bswap) , 0, },
|
||||
{str8_lit_comp("dec"), str8_lit_comp("Decimal Base (Base 10)"), str8_lit_comp("Specifies that all integral evaluations should appear in base-10 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("bin"), str8_lit_comp("Binary Base (Base 2)"), str8_lit_comp("Specifies that all integral evaluations should appear in base-2 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("oct"), str8_lit_comp("Octal Base (Base 8)"), str8_lit_comp("Specifies that all integral evaluations should appear in base-8 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("hex"), str8_lit_comp("Hexadecimal Base (Base 16)"), str8_lit_comp("Specifies that all integral evaluations should appear in base-16 form."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("only"), str8_lit_comp("Only Specified Members"), str8_lit_comp("Specifies that only the specified members should appear in struct, union, or class evaluations."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(only) , },
|
||||
{str8_lit_comp("omit"), str8_lit_comp("Omit Specified Members"), str8_lit_comp("Omits a list of member names from appearing in struct, union, or class evaluations."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(omit) , },
|
||||
{str8_lit_comp("no_addr"), str8_lit_comp("Disable Address Values"), str8_lit_comp("Displays only what pointers point to, if possible, without the pointer's address value."), (DF_CoreViewRuleSpecInfoFlag_Inherited*1)|(DF_CoreViewRuleSpecInfoFlag_Expandable*0)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*0), 0, 0, },
|
||||
{str8_lit_comp("rgba"), str8_lit_comp("Color (RGBA)"), str8_lit_comp("Displays as a color, interpreting the data as encoding R, G, B, and A values."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(rgba) , },
|
||||
{str8_lit_comp("text"), str8_lit_comp("Text"), str8_lit_comp("Displays as text."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(text) , },
|
||||
{str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), str8_lit_comp("Displays as disassembled instructions, interpreting the data as raw machine code."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(disasm) , },
|
||||
{str8_lit_comp("graph"), str8_lit_comp("Graph"), str8_lit_comp("Displays as a pointer graph, visualizing nodes and edges formed by pointers directly."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(graph) , },
|
||||
{str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), str8_lit_comp("Displays as a bitmap, interpreting the data as raw pixel data."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(bitmap) , },
|
||||
{str8_lit_comp("geo"), str8_lit_comp("Geometry"), str8_lit_comp("Displays as geometry, interpreting the data as vertex data."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(geo) , },
|
||||
{str8_lit_comp("odin_map"), str8_lit_comp("Odin map"), str8_lit_comp("Specifies that a struct to be rendered as an Odin map type."), (DF_CoreViewRuleSpecInfoFlag_Inherited*0)|(DF_CoreViewRuleSpecInfoFlag_Expandable*1)|(DF_CoreViewRuleSpecInfoFlag_EvalResolution*0)|(DF_CoreViewRuleSpecInfoFlag_VizBlockProd*1), 0, DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_NAME(odin_map) , },
|
||||
};
|
||||
|
||||
String8 df_g_icon_kind_text_table[69] =
|
||||
|
||||
@@ -348,6 +348,7 @@ typedef enum DF_CoreViewRuleKind
|
||||
{
|
||||
DF_CoreViewRuleKind_Null,
|
||||
DF_CoreViewRuleKind_Array,
|
||||
DF_CoreViewRuleKind_Slice,
|
||||
DF_CoreViewRuleKind_List,
|
||||
DF_CoreViewRuleKind_ByteSwap,
|
||||
DF_CoreViewRuleKind_BaseDec,
|
||||
@@ -363,6 +364,7 @@ DF_CoreViewRuleKind_Disasm,
|
||||
DF_CoreViewRuleKind_Graph,
|
||||
DF_CoreViewRuleKind_Bitmap,
|
||||
DF_CoreViewRuleKind_Geo,
|
||||
DF_CoreViewRuleKind_OdinMap,
|
||||
DF_CoreViewRuleKind_COUNT,
|
||||
} DF_CoreViewRuleKind;
|
||||
|
||||
@@ -421,6 +423,7 @@ Dir2 dir2;
|
||||
};
|
||||
|
||||
DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(array);
|
||||
DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(slice);
|
||||
DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(bswap);
|
||||
DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(list);
|
||||
DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(only);
|
||||
@@ -431,6 +434,7 @@ DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm);
|
||||
DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(graph);
|
||||
DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(bitmap);
|
||||
DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(geo);
|
||||
DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(odin_map);
|
||||
|
||||
struct{String8 mnemonic; String8 summary;} df_g_inst_table_x64[] =
|
||||
{
|
||||
|
||||
@@ -247,6 +247,7 @@ DF_CmdParamSlot2ViewSpecMap:
|
||||
DF_GfxViewRuleTable:
|
||||
{
|
||||
{"array" - - - - - "" }
|
||||
{"slice" - - - - - "" }
|
||||
{"list" x - - - - "" }
|
||||
{"dec" - x - - - "" }
|
||||
{"bin" - x - - - "" }
|
||||
@@ -259,6 +260,7 @@ DF_GfxViewRuleTable:
|
||||
{"text" - - - x x "Text" }
|
||||
{"disasm" - - - x x "Disassembly" }
|
||||
{"bitmap" - - x x x "Bitmap" }
|
||||
{"odin_map" - - x x x "Odin HashMap" }
|
||||
{"geo" - - x x x "Geometry" }
|
||||
}
|
||||
|
||||
|
||||
@@ -311,6 +311,574 @@ df_vr_eval_commit_rgba(DF_Eval eval, TG_Graph *graph, RDI_Parsed *raddbg, DF_Ctr
|
||||
}
|
||||
}
|
||||
|
||||
internal DF_BitmapTopologyInfo
|
||||
df_view_rule_hooks__bitmap_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
DF_BitmapTopologyInfo info = {0};
|
||||
{
|
||||
info.fmt = R_Tex2DFormat_RGBA8;
|
||||
}
|
||||
{
|
||||
DF_CfgNode *width_cfg = df_cfg_node_child_from_string(cfg, str8_lit("w"), 0);
|
||||
DF_CfgNode *height_cfg = df_cfg_node_child_from_string(cfg, str8_lit("h"), 0);
|
||||
DF_CfgNode *fmt_cfg = df_cfg_node_child_from_string(cfg, str8_lit("fmt"), 0);
|
||||
String8List width_expr_strs = {0};
|
||||
String8List height_expr_strs = {0};
|
||||
for(DF_CfgNode *child = width_cfg->first; child != &df_g_nil_cfg_node; child = child->next)
|
||||
{
|
||||
str8_list_push(scratch.arena, &width_expr_strs, child->string);
|
||||
}
|
||||
for(DF_CfgNode *child = height_cfg->first; child != &df_g_nil_cfg_node; child = child->next)
|
||||
{
|
||||
str8_list_push(scratch.arena, &height_expr_strs, child->string);
|
||||
}
|
||||
String8 width_expr = str8_list_join(scratch.arena, &width_expr_strs, 0);
|
||||
String8 height_expr = str8_list_join(scratch.arena, &height_expr_strs, 0);
|
||||
String8 fmt_string = fmt_cfg->first->string;
|
||||
DF_Eval width_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, width_expr);
|
||||
DF_Eval width_eval_value = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, width_eval);
|
||||
info.width = width_eval_value.imm_u64;
|
||||
DF_Eval height_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, height_expr);
|
||||
DF_Eval height_eval_value = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, height_eval);
|
||||
info.height = height_eval_value.imm_u64;
|
||||
if(fmt_string.size != 0)
|
||||
{
|
||||
for(R_Tex2DFormat fmt = (R_Tex2DFormat)0; fmt < R_Tex2DFormat_COUNT; fmt = (R_Tex2DFormat)(fmt+1))
|
||||
{
|
||||
if(str8_match(r_tex2d_format_display_string_table[fmt], fmt_string, StringMatchFlag_CaseInsensitive))
|
||||
{
|
||||
info.fmt = fmt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return info;
|
||||
}
|
||||
|
||||
internal DF_GeoTopologyInfo
|
||||
df_view_rule_hooks__geo_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
DF_GeoTopologyInfo result = {0};
|
||||
{
|
||||
StringJoin join = {0};
|
||||
join.sep = str8_lit(" ");
|
||||
DF_CfgNode *count_cfg = df_cfg_node_child_from_string(cfg, str8_lit("count"), 0);
|
||||
DF_CfgNode *vertices_base_cfg = df_cfg_node_child_from_string(cfg, str8_lit("vertices_base"), 0);
|
||||
DF_CfgNode *vertices_size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("vertices_size"), 0);
|
||||
String8List count_expr_strs = {0};
|
||||
String8List vertices_base_expr_strs = {0};
|
||||
String8List vertices_size_expr_strs = {0};
|
||||
for(DF_CfgNode *child = count_cfg->first; child != &df_g_nil_cfg_node; child = child->next)
|
||||
{
|
||||
str8_list_push(scratch.arena, &count_expr_strs, child->string);
|
||||
}
|
||||
for(DF_CfgNode *child = vertices_base_cfg->first; child != &df_g_nil_cfg_node; child = child->next)
|
||||
{
|
||||
str8_list_push(scratch.arena, &vertices_base_expr_strs, child->string);
|
||||
}
|
||||
for(DF_CfgNode *child = vertices_size_cfg->first; child != &df_g_nil_cfg_node; child = child->next)
|
||||
{
|
||||
str8_list_push(scratch.arena, &vertices_size_expr_strs, child->string);
|
||||
}
|
||||
String8 count_expr = str8_list_join(scratch.arena, &count_expr_strs, &join);
|
||||
String8 vertices_base_expr = str8_list_join(scratch.arena, &vertices_base_expr_strs, &join);
|
||||
String8 vertices_size_expr = str8_list_join(scratch.arena, &vertices_size_expr_strs, &join);
|
||||
DF_Eval count_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, count_expr);
|
||||
DF_Eval vertices_base_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, vertices_base_expr);
|
||||
DF_Eval vertices_size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, vertices_size_expr);
|
||||
DF_Eval count_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, count_eval);
|
||||
DF_Eval vertices_base_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, vertices_base_eval);
|
||||
DF_Eval vertices_size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, vertices_size_eval);
|
||||
U64 vertices_base_vaddr = vertices_base_val_eval.imm_u64 ? vertices_base_val_eval.imm_u64 : vertices_base_val_eval.offset;
|
||||
result.index_count = count_val_eval.imm_u64;
|
||||
result.vertices_vaddr_range = r1u64(vertices_base_vaddr, vertices_base_vaddr+vertices_size_val_eval.imm_u64);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal DF_TxtTopologyInfo
|
||||
df_view_rule_hooks__txt_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
DF_TxtTopologyInfo result = zero_struct;
|
||||
{
|
||||
StringJoin join = {0};
|
||||
join.sep = str8_lit(" ");
|
||||
DF_CfgNode *size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("size"), 0);
|
||||
DF_CfgNode *lang_cfg = df_cfg_node_child_from_string(cfg, str8_lit("lang"), 0);
|
||||
String8List size_expr_strs = {0};
|
||||
String8 lang_string = {0};
|
||||
for(DF_CfgNode *child = size_cfg->first; child != &df_g_nil_cfg_node; child = child->next)
|
||||
{
|
||||
str8_list_push(scratch.arena, &size_expr_strs, child->string);
|
||||
}
|
||||
lang_string = lang_cfg->first->string;
|
||||
String8 size_expr = str8_list_join(scratch.arena, &size_expr_strs, &join);
|
||||
DF_Eval size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, size_expr);
|
||||
DF_Eval size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, size_eval);
|
||||
result.lang = txt_lang_kind_from_extension(lang_string);
|
||||
result.size_cap = size_val_eval.imm_u64;
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal DF_DisasmTopologyInfo
|
||||
df_view_rule_hooks__disasm_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
DF_DisasmTopologyInfo result = zero_struct;
|
||||
{
|
||||
StringJoin join = {0};
|
||||
join.sep = str8_lit(" ");
|
||||
DF_CfgNode *size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("size"), 0);
|
||||
DF_CfgNode *arch_cfg = df_cfg_node_child_from_string(cfg, str8_lit("arch"), 0);
|
||||
String8List size_expr_strs = {0};
|
||||
String8 arch_string = {0};
|
||||
for(DF_CfgNode *child = size_cfg->first; child != &df_g_nil_cfg_node; child = child->next)
|
||||
{
|
||||
str8_list_push(scratch.arena, &size_expr_strs, child->string);
|
||||
}
|
||||
arch_string = arch_cfg->first->string;
|
||||
String8 size_expr = str8_list_join(scratch.arena, &size_expr_strs, &join);
|
||||
DF_Eval size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, size_expr);
|
||||
DF_Eval size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, size_eval);
|
||||
if(str8_match(arch_string, str8_lit("x64"), StringMatchFlag_CaseInsensitive))
|
||||
{
|
||||
result.arch = Architecture_x64;
|
||||
}
|
||||
result.size_cap = size_val_eval.imm_u64;
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ bill: "slice"
|
||||
|
||||
|
||||
internal TG_Member *tg_member_from_name(TG_MemberArray array, String8 name, StringMatchFlags flags)
|
||||
{
|
||||
for (U64 i = 0; i < array.count; i++)
|
||||
{
|
||||
TG_Member *member = &array.v[i];
|
||||
if (str8_match(member->name, name, flags))
|
||||
{
|
||||
return member;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
internal U64 df_evaluate_integer_from_eval(EVAL_ParseCtx *parse_ctx, DF_CtrlCtx *ctrl_ctx, DF_Eval eval, TG_Member *member)
|
||||
{
|
||||
DF_Eval res = zero_struct;
|
||||
res.mode = EVAL_EvalMode_Addr;
|
||||
res.offset = eval.offset + member->off;
|
||||
res.type_key = member->type_key;
|
||||
res = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, res);
|
||||
if (res.mode == EVAL_EvalMode_Value)
|
||||
{
|
||||
return res.imm_u64;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(slice)
|
||||
{
|
||||
TG_Key type_key = eval.type_key;
|
||||
TG_Kind type_kind = tg_kind_from_key(type_key);
|
||||
|
||||
if (type_kind == TG_Kind_Struct)
|
||||
{
|
||||
DF_CfgNode *struct_node = val->last;
|
||||
if (struct_node != &df_g_nil_cfg_node)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
|
||||
TG_MemberArray data_members = tg_data_members_from_graph_rdi_key(scratch.arena, parse_ctx->type_graph, parse_ctx->rdi, type_key);
|
||||
TG_Member *member_ptr = NULL;
|
||||
TG_Member *member_len = NULL;
|
||||
member_ptr = member_ptr ? member_ptr : tg_member_from_name(data_members, str8_lit("data"), StringMatchFlag_CaseInsensitive);
|
||||
member_ptr = member_ptr ? member_ptr : tg_member_from_name(data_members, str8_lit("str"), StringMatchFlag_CaseInsensitive);
|
||||
member_ptr = member_ptr ? member_ptr : tg_member_from_name(data_members, str8_lit("ptr"), StringMatchFlag_CaseInsensitive);
|
||||
|
||||
member_len = member_len ? member_len : tg_member_from_name(data_members, str8_lit("len"), StringMatchFlag_CaseInsensitive);
|
||||
member_len = member_len ? member_len : tg_member_from_name(data_members, str8_lit("length"), StringMatchFlag_CaseInsensitive);
|
||||
member_len = member_len ? member_len : tg_member_from_name(data_members, str8_lit("count"), StringMatchFlag_CaseInsensitive);
|
||||
member_len = member_len ? member_len : tg_member_from_name(data_members, str8_lit("size"), StringMatchFlag_CaseInsensitive);
|
||||
|
||||
if (member_ptr && member_len)
|
||||
{
|
||||
U64 slice_len = df_evaluate_integer_from_eval(parse_ctx, ctrl_ctx, eval, member_len);
|
||||
|
||||
TG_Key pointee = tg_ptee_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, member_ptr->type_key);
|
||||
TG_Key array_type = tg_cons_type_make(parse_ctx->type_graph, TG_Kind_Array, pointee, slice_len);
|
||||
|
||||
// TODO(bill): How do you make this render with the original name, if possible?
|
||||
DF_Eval new_eval = zero_struct;
|
||||
new_eval.mode = EVAL_EvalMode_Addr;
|
||||
new_eval.offset = eval.offset + member_ptr->off;
|
||||
new_eval.type_key = tg_cons_type_make(parse_ctx->type_graph, TG_Kind_Ptr, array_type, 0);
|
||||
|
||||
eval = new_eval;
|
||||
}
|
||||
|
||||
scratch_end(scratch);
|
||||
}
|
||||
}
|
||||
return eval;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
//~ bill: "odin_map"
|
||||
|
||||
typedef struct DF_OdinMapCellInfo DF_OdinMapCellInfo;
|
||||
struct DF_OdinMapCellInfo
|
||||
{
|
||||
U64 size_of_type;
|
||||
U64 size_of_cell;
|
||||
U64 elements_per_cell;
|
||||
};
|
||||
|
||||
internal DF_OdinMapCellInfo df_odin_map_cell_info(Arena *arena, EVAL_ParseCtx *parse_ctx, TG_Key type, TG_Key cell_type)
|
||||
{
|
||||
DF_OdinMapCellInfo info = zero_struct;
|
||||
info.size_of_type = tg_byte_size_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, type);
|
||||
info.size_of_cell = tg_byte_size_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, cell_type);
|
||||
|
||||
if (info.size_of_type != info.size_of_cell) {
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
|
||||
TG_Kind kind = tg_kind_from_key(cell_type);
|
||||
Assert(kind == TG_Kind_Struct);
|
||||
|
||||
TG_MemberArray data_members = tg_data_members_from_graph_rdi_key(scratch.arena, parse_ctx->type_graph, parse_ctx->rdi, cell_type);
|
||||
Assert(data_members.count >= 1);
|
||||
TG_Key array_type = data_members.v[0].type_key;
|
||||
U64 size_of_array = tg_byte_size_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, array_type);
|
||||
if (size_of_array > 0 && info.size_of_type > 0) {
|
||||
info.elements_per_cell = size_of_array / info.size_of_type;
|
||||
}
|
||||
|
||||
scratch_end(scratch);
|
||||
|
||||
}
|
||||
if (info.elements_per_cell == 0) {
|
||||
info.elements_per_cell = 1;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
internal U64 df_odin_map_cell_index(U64 base, DF_OdinMapCellInfo const *info, U64 index)
|
||||
{
|
||||
U64 elements_per_cell = info->elements_per_cell;
|
||||
U64 size_of_cell = info->size_of_cell;
|
||||
U64 size_of_type = info->size_of_type;
|
||||
U64 cell_index = 0;
|
||||
U64 data_index = 0;
|
||||
switch (elements_per_cell) {
|
||||
case 1:
|
||||
return base + (index * size_of_cell);
|
||||
case 2:
|
||||
cell_index = index >> 1;
|
||||
data_index = index & 1;
|
||||
break;
|
||||
case 4:
|
||||
cell_index = index >> 2;
|
||||
data_index = index & 3;
|
||||
break;
|
||||
case 8:
|
||||
cell_index = index >> 3;
|
||||
data_index = index & 7;
|
||||
break;
|
||||
case 16:
|
||||
cell_index = index >> 4;
|
||||
data_index = index & 15;
|
||||
break;
|
||||
case 32:
|
||||
cell_index = index >> 5;
|
||||
data_index = index & 31;
|
||||
break;
|
||||
default:
|
||||
cell_index = index / elements_per_cell;
|
||||
data_index = index % elements_per_cell;
|
||||
break;
|
||||
}
|
||||
return base + (cell_index * size_of_cell) + (data_index * size_of_type);
|
||||
}
|
||||
|
||||
// internal void dbg_printf(char const *fmt, ...) {
|
||||
// va_list argp;
|
||||
// va_start(argp, fmt);
|
||||
// char buf[4096] = {};
|
||||
// vsnprintf_s(buf, 4095, fmt, argp);
|
||||
// va_end(argp);
|
||||
// OutputDebugStringA(buf);
|
||||
// }
|
||||
|
||||
|
||||
internal U64 df_evaluate_hash_from_offset(EVAL_ParseCtx *parse_ctx, DF_CtrlCtx *ctrl_ctx, U64 offset, TG_Key hash_type)
|
||||
{
|
||||
DF_Eval res = zero_struct;
|
||||
res.mode = EVAL_EvalMode_Addr;
|
||||
res.offset = offset;
|
||||
res.type_key = hash_type;
|
||||
res = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, res);
|
||||
if (res.mode == EVAL_EvalMode_Value)
|
||||
{
|
||||
return res.imm_u64;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
typedef struct DF_OdinMapData DF_OdinMapData;
|
||||
struct DF_OdinMapData
|
||||
{
|
||||
U64 len;
|
||||
U64 cap;
|
||||
|
||||
TG_Key key;
|
||||
TG_Key value;
|
||||
TG_Key hash;
|
||||
TG_Key key_cell;
|
||||
TG_Key value_cell;
|
||||
|
||||
DF_Eval allocator_eval;
|
||||
|
||||
U64 key_ptr;
|
||||
U64 value_ptr;
|
||||
U64 hash_ptr;
|
||||
|
||||
DF_OdinMapCellInfo key_cell_info;
|
||||
DF_OdinMapCellInfo value_cell_info;
|
||||
U64 size_of_hash;
|
||||
};
|
||||
|
||||
|
||||
internal B32 df_odin_map_data(Arena *arena, EVAL_ParseCtx *parse_ctx, DF_CtrlCtx *ctrl_ctx, DF_Eval eval, DF_OdinMapData *md)
|
||||
{
|
||||
B32 ok = false;
|
||||
*md = zero_struct;
|
||||
|
||||
TG_Key type_key = eval.type_key;
|
||||
TG_Kind type_kind = tg_kind_from_key(type_key);
|
||||
|
||||
if (type_kind == TG_Kind_Struct)
|
||||
{
|
||||
TG_MemberArray data_members = tg_data_members_from_graph_rdi_key(arena, parse_ctx->type_graph, parse_ctx->rdi, type_key);
|
||||
|
||||
TG_Member *member_data = tg_member_from_name(data_members, str8_lit("data"), 0);
|
||||
TG_Member *member_len = tg_member_from_name(data_members, str8_lit("len"), 0);
|
||||
TG_Member *member_allocator = tg_member_from_name(data_members, str8_lit("allocator"), 0);
|
||||
|
||||
if (member_data && member_len && member_allocator)
|
||||
{
|
||||
TG_Key metadata = member_data->type_key;
|
||||
metadata = tg_ptee_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, metadata);
|
||||
if (tg_kind_from_key(metadata) != TG_Kind_Struct)
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
|
||||
md->allocator_eval = eval;
|
||||
md->allocator_eval.offset += member_allocator->off;
|
||||
md->allocator_eval.type_key = member_allocator->type_key;
|
||||
|
||||
TG_MemberArray md_members = tg_data_members_from_graph_rdi_key(arena, parse_ctx->type_graph, parse_ctx->rdi, metadata);
|
||||
TG_Member *m_key = tg_member_from_name(md_members, str8_lit("key"), 0);
|
||||
TG_Member *m_value = tg_member_from_name(md_members, str8_lit("value"), 0);
|
||||
TG_Member *m_hash = tg_member_from_name(md_members, str8_lit("hash"), 0);
|
||||
TG_Member *m_key_cell = tg_member_from_name(md_members, str8_lit("key_cell"), 0);
|
||||
TG_Member *m_value_cell = tg_member_from_name(md_members, str8_lit("value_cell"), 0);
|
||||
|
||||
if (m_key == NULL ||
|
||||
m_value == NULL ||
|
||||
m_hash == NULL ||
|
||||
m_key_cell == NULL ||
|
||||
m_value_cell == NULL)
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
|
||||
md->key = m_key->type_key;
|
||||
md->value = m_value->type_key;
|
||||
md->hash = m_hash->type_key;
|
||||
md->key_cell = m_key_cell->type_key;
|
||||
md->value_cell = m_value_cell->type_key;
|
||||
|
||||
U64 raw_data = df_evaluate_integer_from_eval(parse_ctx, ctrl_ctx, eval, member_data);
|
||||
U64 ptr = raw_data & ~(U64)63;
|
||||
md->len = df_evaluate_integer_from_eval(parse_ctx, ctrl_ctx, eval, member_len);
|
||||
U64 cap_log2 = raw_data & 63;
|
||||
md->cap = cap_log2 ? ((U64)1)<<cap_log2 : 0;
|
||||
TG_Key array_type = zero_struct;
|
||||
|
||||
md->key_cell_info = df_odin_map_cell_info(arena, parse_ctx, md->key, md->key_cell);
|
||||
md->value_cell_info = df_odin_map_cell_info(arena, parse_ctx, md->value, md->value_cell);
|
||||
md->size_of_hash = tg_byte_size_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, md->hash);
|
||||
|
||||
md->key_ptr = ptr;
|
||||
md->value_ptr = df_odin_map_cell_index(md->key_ptr, &md->key_cell_info, md->cap);
|
||||
md->hash_ptr = df_odin_map_cell_index(md->value_ptr, &md->value_cell_info, md->cap);
|
||||
|
||||
ok = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
end:;
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(odin_map)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
|
||||
DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth);
|
||||
vb->eval = eval;
|
||||
vb->cfg_table = *cfg_table;
|
||||
|
||||
DF_OdinMapData md = zero_struct;
|
||||
if (df_odin_map_data(scratch.arena, parse_ctx, ctrl_ctx, eval, &md))
|
||||
{
|
||||
U64 const TOMBSTONE_MASK = ((U64)1u)<<(md.size_of_hash*8 - 1);
|
||||
|
||||
U64 key_index = 0;
|
||||
for (U64 i = 0; i < md.cap; i += 1)
|
||||
{
|
||||
U64 offset_hash = md.hash_ptr + i*md.size_of_hash;
|
||||
|
||||
U64 h = df_evaluate_hash_from_offset(parse_ctx, ctrl_ctx, offset_hash, md.hash);
|
||||
if (h == 0 || (h & TOMBSTONE_MASK) != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
U64 offset_key = df_odin_map_cell_index(md.key_ptr, &md.key_cell_info, i);
|
||||
U64 offset_value = df_odin_map_cell_index(md.value_ptr, &md.value_cell_info, i);
|
||||
|
||||
DF_Eval addr_key = zero_struct;
|
||||
addr_key.mode = EVAL_EvalMode_Addr;
|
||||
addr_key.offset = offset_key;
|
||||
addr_key.type_key = md.key;
|
||||
|
||||
DF_Eval addr_value = zero_struct;
|
||||
addr_value.mode = EVAL_EvalMode_Addr;
|
||||
addr_value.offset = offset_value;
|
||||
addr_value.type_key = md.value;
|
||||
|
||||
// render element
|
||||
|
||||
DF_CfgTable child_cfg = *cfg_table;
|
||||
child_cfg = df_cfg_table_from_inheritance(arena, cfg_table);
|
||||
|
||||
DF_ExpandKey row_key = df_expand_key_make(df_hash_from_expand_key(vb->key), i);
|
||||
|
||||
B32 row_expanded = df_expand_key_is_set(&eval_view->expand_tree_table, row_key);
|
||||
|
||||
DF_EvalVizBlock *block = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Root, vb->key, row_key, depth+1);
|
||||
block->eval = addr_key;
|
||||
block->cfg_table = child_cfg;
|
||||
block->string = row_expanded ? push_str8f(arena, "key") : push_str8f(arena, "key (hash: %I64x)", h);
|
||||
block->visual_idx_range = r1u64(0, 1);
|
||||
block->semantic_idx_range = r1u64(0, 1);
|
||||
df_eval_viz_block_end(out, block);
|
||||
|
||||
if (row_expanded)
|
||||
{
|
||||
DF_EvalVizBlock * value_block = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Root, row_key, zero_struct, depth+2);
|
||||
value_block->eval = addr_value;
|
||||
value_block->cfg_table = child_cfg;
|
||||
value_block->string = push_str8f(arena, "value");
|
||||
value_block->visual_idx_range = r1u64(0, 1);
|
||||
value_block->semantic_idx_range = r1u64(0, 1);
|
||||
df_eval_viz_block_end(out, value_block);
|
||||
|
||||
DF_Eval eval_hash = zero_struct;
|
||||
eval_hash.type_key = md.hash;
|
||||
eval_hash.mode = EVAL_EvalMode_Value;
|
||||
eval_hash.imm_u64 = h;
|
||||
DF_EvalVizBlock * hash_block = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Root, row_key, zero_struct, depth+2);
|
||||
hash_block->eval = eval_hash;
|
||||
hash_block->cfg_table = child_cfg;
|
||||
hash_block->string = push_str8f(arena, "hash");
|
||||
hash_block->visual_idx_range = r1u64(0, 1);
|
||||
hash_block->semantic_idx_range = r1u64(0, 1);
|
||||
df_eval_viz_block_end(out, hash_block);
|
||||
}
|
||||
|
||||
key_index += 1;
|
||||
}
|
||||
}
|
||||
|
||||
df_eval_viz_block_end(out, vb);
|
||||
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(odin_map)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
|
||||
DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval);
|
||||
U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset;
|
||||
|
||||
DF_OdinMapData md = zero_struct;
|
||||
df_odin_map_data(scratch.arena, parse_ctx, ctrl_ctx, eval, &md);
|
||||
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Code)) UI_TextColor(df_rgba_from_theme_color(DF_ThemeColor_WeakText))
|
||||
ui_labelf("0x%I64x -> Odin map len: %I64u cap: %I64u", base_vaddr, md.len, md.cap);
|
||||
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(odin_map)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(odin_map)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(odin_map)
|
||||
{
|
||||
String8 result {};
|
||||
return result;
|
||||
}
|
||||
|
||||
DF_VIEW_CMD_FUNCTION_DEF(odin_map)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DF_VIEW_UI_FUNCTION_DEF(odin_map)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: "rgba"
|
||||
|
||||
typedef struct DF_ViewRuleHooks_RGBAState DF_ViewRuleHooks_RGBAState;
|
||||
struct DF_ViewRuleHooks_RGBAState
|
||||
{
|
||||
Vec4F32 hsva;
|
||||
U64 memgen_idx;
|
||||
};
|
||||
|
||||
DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(rgba)
|
||||
{
|
||||
DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth);
|
||||
|
||||
@@ -720,9 +720,10 @@ str8_lit_comp("open_user"),
|
||||
str8_lit_comp("open_profile"),
|
||||
};
|
||||
|
||||
DF_GfxViewRuleSpecInfo df_g_gfx_view_rule_spec_info_table[14] =
|
||||
DF_GfxViewRuleSpecInfo df_g_gfx_view_rule_spec_info_table[16] =
|
||||
{
|
||||
{ str8_lit_comp("array"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, 0, 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("slice"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, 0, 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("list"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*1)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(list) , 0, 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("dec"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(dec) , 0, 0, str8_lit_comp("") },
|
||||
{ str8_lit_comp("bin"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*1)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*0), 0, DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(bin) , 0, 0, str8_lit_comp("") },
|
||||
@@ -735,14 +736,16 @@ DF_GfxViewRuleSpecInfo df_g_gfx_view_rule_spec_info_table[14] =
|
||||
{ str8_lit_comp("text"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, 0, DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(text) , str8_lit_comp("text_view_rule") },
|
||||
{ str8_lit_comp("disasm"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*0)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, 0, DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(disasm) , str8_lit_comp("disasm_view_rule") },
|
||||
{ str8_lit_comp("bitmap"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(bitmap) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(bitmap) , str8_lit_comp("bitmap_view_rule") },
|
||||
{ str8_lit_comp("odin_map"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(odin_map) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(odin_map) , str8_lit_comp("odin_map_view_rule") },
|
||||
{ str8_lit_comp("geo"), (DF_GfxViewRuleSpecInfoFlag_VizRowProd*0)|(DF_GfxViewRuleSpecInfoFlag_LineStringize*0)|(DF_GfxViewRuleSpecInfoFlag_RowUI*1)|(DF_GfxViewRuleSpecInfoFlag_BlockUI*1), 0, 0, DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_NAME(geo) , DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_NAME(geo) , str8_lit_comp("geo_view_rule") },
|
||||
};
|
||||
|
||||
DF_ViewSpecInfo df_g_gfx_view_rule_tab_view_spec_info_table[4] =
|
||||
DF_ViewSpecInfo df_g_gfx_view_rule_tab_view_spec_info_table[5] =
|
||||
{
|
||||
{ DF_ViewSpecFlag_CanSerialize|DF_ViewSpecFlag_CanSerializeQuery, str8_lit_comp("text_view_rule"), str8_lit_comp("Text"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(text), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(text), DF_VIEW_CMD_FUNCTION_NAME(text), DF_VIEW_UI_FUNCTION_NAME(text) },
|
||||
{ DF_ViewSpecFlag_CanSerialize|DF_ViewSpecFlag_CanSerializeQuery, str8_lit_comp("disasm_view_rule"), str8_lit_comp("Disassembly"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(disasm), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(disasm), DF_VIEW_CMD_FUNCTION_NAME(disasm), DF_VIEW_UI_FUNCTION_NAME(disasm) },
|
||||
{ DF_ViewSpecFlag_CanSerialize|DF_ViewSpecFlag_CanSerializeQuery, str8_lit_comp("bitmap_view_rule"), str8_lit_comp("Bitmap"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(bitmap), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(bitmap), DF_VIEW_CMD_FUNCTION_NAME(bitmap), DF_VIEW_UI_FUNCTION_NAME(bitmap) },
|
||||
{ DF_ViewSpecFlag_CanSerialize|DF_ViewSpecFlag_CanSerializeQuery, str8_lit_comp("odin_map_view_rule"), str8_lit_comp("Odin HashMap"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(odin_map), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(odin_map), DF_VIEW_CMD_FUNCTION_NAME(odin_map), DF_VIEW_UI_FUNCTION_NAME(odin_map) },
|
||||
{ DF_ViewSpecFlag_CanSerialize|DF_ViewSpecFlag_CanSerializeQuery, str8_lit_comp("geo_view_rule"), str8_lit_comp("Geometry"), DF_NameKind_Null, DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(geo), DF_VIEW_STRING_FROM_STATE_FUNCTION_NAME(geo), DF_VIEW_CMD_FUNCTION_NAME(geo), DF_VIEW_UI_FUNCTION_NAME(geo) },
|
||||
};
|
||||
|
||||
|
||||
@@ -252,27 +252,33 @@ DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(omit);
|
||||
DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(no_addr);
|
||||
DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(rgba);
|
||||
DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(bitmap);
|
||||
DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(odin_map);
|
||||
DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(geo);
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba);
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(text);
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm);
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(bitmap);
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(odin_map);
|
||||
DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(geo);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(text);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(disasm);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(bitmap);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(odin_map);
|
||||
DF_VIEW_SETUP_FUNCTION_DEF(geo);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(text);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(disasm);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(bitmap);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(odin_map);
|
||||
DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(geo);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(text);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(disasm);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(bitmap);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(odin_map);
|
||||
DF_VIEW_CMD_FUNCTION_DEF(geo);
|
||||
DF_VIEW_UI_FUNCTION_DEF(text);
|
||||
DF_VIEW_UI_FUNCTION_DEF(disasm);
|
||||
DF_VIEW_UI_FUNCTION_DEF(bitmap);
|
||||
DF_VIEW_UI_FUNCTION_DEF(odin_map);
|
||||
DF_VIEW_UI_FUNCTION_DEF(geo);
|
||||
C_LINKAGE_BEGIN
|
||||
extern String8 df_g_theme_preset_display_string_table[9];
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
#include "third_party/blake2/blake2b.c"
|
||||
#endif
|
||||
|
||||
#ifndef F_TAB_STRING
|
||||
#define F_TAB_STRING " "
|
||||
#endif
|
||||
|
||||
internal F_Hash
|
||||
f_hash_from_string(String8 string)
|
||||
{
|
||||
@@ -617,7 +621,7 @@ f_push_run_from_string(Arena *arena, F_Tag tag, F32 size, F_RunFlags flags, Stri
|
||||
B32 is_tab = (piece_substring.size == 1 && piece_substring.str[0] == '\t');
|
||||
if(is_tab)
|
||||
{
|
||||
piece_substring = str8_lit(" ");
|
||||
piece_substring = str8_lit(F_TAB_STRING);
|
||||
}
|
||||
|
||||
//- rjf: piece substring -> raster cache info
|
||||
|
||||
Reference in New Issue
Block a user