mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 05:18:40 +00:00
sketch out better usage of expansion info in text visualizer; notes; naming pass
This commit is contained in:
@@ -2388,7 +2388,7 @@ rd_view_from_eval(RD_Cfg *parent, E_Eval eval)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
E_TypeKey type_key = eval.irtree.type_key;
|
||||
E_Type *type = e_type_from_key__cached(type_key);
|
||||
E_Type *type = e_type_from_key(type_key);
|
||||
String8 schema_name = str8_lit("watch");
|
||||
B32 type_is_visualizer = 0;
|
||||
if(type->kind == E_TypeKind_Lens)
|
||||
@@ -3262,7 +3262,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
case E_SpaceKind_File:
|
||||
case E_SpaceKind_FileSystem:
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(eval.irtree.type_key);
|
||||
E_Type *type = e_type_from_key(eval.irtree.type_key);
|
||||
String8 file = rd_file_path_from_eval(scratch.arena, eval);
|
||||
if(str8_match(type->name, str8_lit("folder"), 0))
|
||||
{
|
||||
@@ -3954,7 +3954,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
E_TypeKind block_type_kind = e_type_kind_from_key(block_type_key);
|
||||
if(block_type_kind == E_TypeKind_Set)
|
||||
{
|
||||
E_Type *block_type = e_type_from_key__cached(block_type_key);
|
||||
E_Type *block_type = e_type_from_key(block_type_key);
|
||||
group_cfg_name = rd_singular_from_code_name_plural(block_type->name);
|
||||
if(group_cfg_name.size == 0)
|
||||
{
|
||||
@@ -4303,7 +4303,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
EV_Row *row = &row_node->row;
|
||||
F32 row_height = row_height_px*row->visual_size;
|
||||
RD_WatchRowInfo *row_info = &row_infos[local_row_idx];
|
||||
E_Type *block_type = e_type_from_key__cached(row->block->eval.irtree.type_key);
|
||||
E_Type *block_type = e_type_from_key(row->block->eval.irtree.type_key);
|
||||
|
||||
// rjf: determine if this row's block is good for the current drag/drop
|
||||
B32 block_is_good_for_drop = 0;
|
||||
@@ -4608,7 +4608,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
B32 cell_selected = (row_selected && selection_tbl.min.x <= cell_x && cell_x <= selection_tbl.max.x);
|
||||
RD_WatchRowCellInfo cell_info = rd_info_from_watch_row_cell(scratch.arena, row, string_flags, row_info, cell, ui_top_font(), ui_top_font_size(), visual_row_string_max_size_px);
|
||||
E_TypeKey cell_type_key = cell->eval.irtree.type_key;
|
||||
E_Type *cell_type = e_type_from_key__cached(cell_type_key);
|
||||
E_Type *cell_type = e_type_from_key(cell_type_key);
|
||||
E_Eval cell_value_eval = e_value_eval_from_eval(cell->eval);
|
||||
B32 cell_toggled = (cell_value_eval.value.u64 != 0);
|
||||
B32 next_cell_toggled = cell_toggled;
|
||||
@@ -4836,7 +4836,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
RD_CellParams cell_params = {0};
|
||||
ProfScope("form cell build parameters")
|
||||
{
|
||||
E_Type *block_type = e_type_from_key__cached(row->block->eval.irtree.type_key);
|
||||
E_Type *block_type = e_type_from_key(row->block->eval.irtree.type_key);
|
||||
B32 cells_are_editable = !!(block_type->flags & E_TypeFlag_EditableChildren);
|
||||
|
||||
// rjf: set up base parameters
|
||||
@@ -5568,7 +5568,7 @@ rd_arch_from_eval(E_Eval eval)
|
||||
}
|
||||
|
||||
// rjf: try arch arguments
|
||||
E_Type *type = e_type_from_key__cached(eval.irtree.type_key);
|
||||
E_Type *type = e_type_from_key(eval.irtree.type_key);
|
||||
if(type->kind == E_TypeKind_Lens)
|
||||
{
|
||||
for EachIndex(idx, type->count)
|
||||
|
||||
@@ -26,7 +26,7 @@ E_TYPE_EXPAND_INFO_FUNCTION_DEF(commands)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8List cmd_names = {0};
|
||||
E_Type *type = e_type_from_key__cached(eval.irtree.type_key);
|
||||
E_Type *type = e_type_from_key(eval.irtree.type_key);
|
||||
for EachNonZeroEnumVal(RD_CmdKind, k)
|
||||
{
|
||||
RD_CmdKindInfo *info = &rd_cmd_kind_info_table[k];
|
||||
@@ -269,7 +269,7 @@ E_TYPE_IREXT_FUNCTION_DEF(schema)
|
||||
String8 bytecode = e_bytecode_from_oplist(scratch.arena, &oplist);
|
||||
E_Interpretation interpret = e_interpret(bytecode);
|
||||
E_TypeKey type_key = irtree->type_key;
|
||||
E_Type *type = e_type_from_key__cached(type_key);
|
||||
E_Type *type = e_type_from_key(type_key);
|
||||
ext->cfg = rd_cfg_from_eval_space(interpret.space);
|
||||
ext->entity = rd_ctrl_entity_from_eval_space(interpret.space);
|
||||
ext->schemas = rd_schemas_from_name(type->name);
|
||||
@@ -687,7 +687,7 @@ E_TYPE_IREXT_FUNCTION_DEF(cfgs_slice)
|
||||
|
||||
//- rjf: determine which key we'll be gathering
|
||||
E_TypeKey type_key = irtree->type_key;
|
||||
E_Type *type = e_type_from_key__cached(type_key);
|
||||
E_Type *type = e_type_from_key(type_key);
|
||||
String8 cfg_name = rd_singular_from_code_name_plural(type->name);
|
||||
|
||||
//- rjf: gather cfgs
|
||||
@@ -1423,7 +1423,7 @@ E_TYPE_ACCESS_FUNCTION_DEF(ctrl_entities)
|
||||
}break;
|
||||
case E_ExprKind_ArrayIndex:
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(lhs_irtree->type_key);
|
||||
E_Type *type = e_type_from_key(lhs_irtree->type_key);
|
||||
CTRL_EntityKind kind = ctrl_entity_kind_from_string(rd_singular_from_code_name_plural(type->name));
|
||||
E_Value rhs_value = e_value_from_expr(expr->first->next);
|
||||
U64 rhs_idx = rhs_value.u64;
|
||||
@@ -1461,7 +1461,7 @@ E_TYPE_EXPAND_INFO_FUNCTION_DEF(ctrl_entities)
|
||||
|
||||
//- rjf: determine which type of child we're gathering
|
||||
E_TypeKey lhs_type_key = eval.irtree.type_key;
|
||||
E_Type *lhs_type = e_type_from_key__cached(lhs_type_key);
|
||||
E_Type *lhs_type = e_type_from_key(lhs_type_key);
|
||||
String8 name = rd_singular_from_code_name_plural(lhs_type->name);
|
||||
CTRL_EntityKind entity_kind = ctrl_entity_kind_from_string(name);
|
||||
|
||||
@@ -1548,7 +1548,7 @@ E_TYPE_EXPAND_INFO_FUNCTION_DEF(debug_info_table)
|
||||
RDI_SectionKind section = RDI_SectionKind_NULL;
|
||||
{
|
||||
E_TypeKey lhs_type_key = eval.irtree.type_key;
|
||||
E_Type *lhs_type = e_type_from_key__cached(lhs_type_key);
|
||||
E_Type *lhs_type = e_type_from_key(lhs_type_key);
|
||||
if(0){}
|
||||
else if(str8_match(lhs_type->name, str8_lit("procedures"), 0)) {section = RDI_SectionKind_Procedures;}
|
||||
else if(str8_match(lhs_type->name, str8_lit("globals"), 0)) {section = RDI_SectionKind_GlobalVariables;}
|
||||
|
||||
@@ -1,215 +1,6 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: 0.9.16 release notes
|
||||
//
|
||||
// - **Formal integration of views (view rules) into the evaluation language.**
|
||||
// "View rules", now simply called "views", have been formally integrated
|
||||
// into the debugger evaluation language. They now appear similar to function
|
||||
// calls, and are expressed directly within an expression. For example, an
|
||||
// expression `dynamic_array` with a view rule `slice` from prior versions
|
||||
// would now be expressed as `slice(dynamic_array)`. Alternatively, views
|
||||
// can be expressed with similar syntax to method calls:
|
||||
// `dynamic_array.slice()`. Many views can still be attached to a single
|
||||
// expression, like `dynamic_array.slice().hex()` (equivalent to
|
||||
// `hex(slice(dynamic_array))`. The first argument to a view is the
|
||||
// expression to which the view should apply. Some views take additional
|
||||
// parameters, like `bitmap(base_pointer, width, height)`. Named parameters,
|
||||
// required in some cases (e.g. the `fmt`/format parameter for `bitmap`), are
|
||||
// expressed using `name = value` syntax:
|
||||
// `bitmap(base, width, height, fmt=bgra8)`.
|
||||
// - **Support for generics in type views (auto view rules)**. "Auto view
|
||||
// rules", now simply called "type views", have been upgraded to support type
|
||||
// pattern-matching. This makes them usable for generic types in various
|
||||
// languages. This pattern-matching is done by using `?` characters in a
|
||||
// pattern, to specify placeholders for various parts of a type name. For
|
||||
// example, the pattern `DynamicArray<?>` would match `DynamicArray<int>`,
|
||||
// `DynamicArray<float>`, and so on. `?(?)` would match all function types.
|
||||
// (#118, #345)
|
||||
// - **Usage of the source expression within type views.** Type views have been
|
||||
// upgraded to support a larger number of possibilities. Instead of mapping
|
||||
// to a set of views which are applied to some other expression, type views
|
||||
// can remap the expression itself, and apply additional views. These
|
||||
// expressions can refer to the originating expression either explicitly
|
||||
// using the `$` character, or implicitly in some cases. For instance, a type
|
||||
// like `struct Bitmap {U8 *base; U32 width; U32 height;};` can be used in a
|
||||
// type view which maps `Bitmap` to `bitmap(base, width, height)`. In this
|
||||
// case, `base`, `width`, and `height` are recognized as being member names
|
||||
// of `Bitmap`. This is equivalent to `bitmap($.base, $.width, $.height)`.
|
||||
// - **Hardware data breakpoints.** Breakpoints have been upgraded to support
|
||||
// flags for breaking on writing, reading, or execution, as well as an
|
||||
// address range size. When used with an address location, this can be used
|
||||
// to express hardware data breakpoints, where the CPU will break when it
|
||||
// sees particular addresses being written to, read from, or executed,
|
||||
// regardless of which code does it. There is a maximum limit of four such
|
||||
// breakpoints on a processor. Theoretically, this means a limit of four per
|
||||
// thread, but for now, the debugger only supports four global data
|
||||
// breakpoints. In the future, we plan to allow organizing these by thread,
|
||||
// in which case the total number of data breakpoints we support will
|
||||
// increase.
|
||||
// - **A new `table` view** has been added, which allows one to define custom
|
||||
// rules for how rows of a watch expansion are formed. The first argument a
|
||||
// `table` is the expression which should be evaluated (like other views),
|
||||
// and the remaining arguments are used to express a number of expressions
|
||||
// which should be used to generated cells for each row in the expansion. For
|
||||
// instance, `table(my_int_array, $, $*4, $*8)` would expand `my_int_array`,
|
||||
// but instead of the default row structure (which displays an expression
|
||||
// string, a value string, and a type string), three cells would be generated
|
||||
// per row: one with the value of each element, one with that value
|
||||
// multiplied by 4, and one multiplied by 8.
|
||||
// - **A new `sequence` view** has been added. This is a simple view which
|
||||
// simply takes a single integer scalar argument `n`, and returns a sequence
|
||||
// of integers, from `0`, `1`, `2`, all the way to `n`. This sequence can be
|
||||
// expanded. This can compose with the `table` view, to easily generate `n`
|
||||
// rows, and use each integer as a value in each cell expression. As an
|
||||
// example, `table(sequence(1000), array1[$], array2[$])` would display
|
||||
// elements of `array1` and `array2` in each row, side-by-side.
|
||||
// - **The everything palette**. The F1 command palette has been replaced by a
|
||||
// substantially more powerful "everything palette" (referred to in the UI
|
||||
// simply as "palette"), opened with the `Open Palette` command. This palette
|
||||
// lists commands and allows the editing of bindings, just like the old
|
||||
// command palette (although it now also supports searching for command
|
||||
// bindings themselves, in addition to the original searching support for
|
||||
// command names and descriptions). However, this palette now also lists
|
||||
// targets, breakpoints, recent files, recent projects, settings (including
|
||||
// tab settings, window settings, user settings, project settings), attached
|
||||
// processes, threads, modules, functions, types, and global variables. This
|
||||
// can be used to quickly search for a large set of possible things, and
|
||||
// either jump to them or edit them. The old `Run Command` command still
|
||||
// exists, and still presents a command palette, which is simply a
|
||||
// special-case of the generalized palette. But this command is no longer
|
||||
// bound to F1 by default.
|
||||
// - **Upgraded per-tab settings.** The tab right-click menu has been upgraded
|
||||
// to show all tab-related settings, including ones specially-defined for
|
||||
// specific visualizers (like the width and height parameters to the bitmap
|
||||
// visualizer). The debugger UI now also supports per-tab font sizes. If a
|
||||
// tab has no per-tab font size set, then it inherits the window's font size.
|
||||
// Each tab's root expression is now also editable in this interface. The tab
|
||||
// right-click menu's options also show up in the palette when the
|
||||
// corresponding tab is focused. They can also be manually opened with the
|
||||
// `Tab Settings` command.
|
||||
// - **UI for setting the font.** The fonts which the debugger uses can now be
|
||||
// set through settings UI (including the palette), rather than just through
|
||||
// the configuration files.
|
||||
// - **Support for searching system font folders for fonts.** The debugger now
|
||||
// accepts system font file names in addition to full font file paths to
|
||||
// specify font settings.
|
||||
// - **Per-`Watch` expressions and labels.** Expressions inserted into a
|
||||
// `Watch` tab are now stored per-tab. This makes many `Watch` tabs more
|
||||
// useful, since different tabs can have a different set of expressions.
|
||||
// `Watch` tabs can now also be labeled, so you can visually distinguish
|
||||
// many `Watch` tabs more easily.
|
||||
// - **Evaluation drag/drop.** Evaluations in a watch tree can be dragged and
|
||||
// dropped. This can be used to create new top-level rows in a `Watch` tab,
|
||||
// or to drag evaluations between `Watch` tabs, or to drag evaluations to
|
||||
// source or disassembly views and pin the evaluation to some location there.
|
||||
// (#137, #388)
|
||||
// - **Settings expressions.** Debugger settings have been upgraded to be
|
||||
// stored as expressions, rather than being locked to a specific value.
|
||||
// These expressions are evaluated, like any other expression, and their
|
||||
// evaluated value is used when the setting value is actually needed.
|
||||
// - **Upgrades to the `slice` view.** The `slice` view has been streamlined
|
||||
// and simplified. When an expression with a `slice` view is expanded, it
|
||||
// will simply expand to the slice's contents, which matches the behavior
|
||||
// with static arrays. The `slice` view now also supports
|
||||
// `first, one_past_last` pointer pairs, as well as `base_pointer, length`
|
||||
// pairs.
|
||||
// - **Boolean evaluation toggle-switches.** The debugger now displays toggle
|
||||
// switches as an additional visualization and editor for all boolean
|
||||
// evaluations.
|
||||
// - **A new `range1` view** has been added, which expresses bounds for some
|
||||
// scalar value. When this view is used in an evaluation, the debugger will
|
||||
// visualize the evaluation value with a slider, which can be used to edit
|
||||
// the value as well.
|
||||
// - **Merging of `Watch` UI with hover evaluation.** The hover evaluation
|
||||
// feature has been majorly upgraded to support all features normally
|
||||
// available in `Watch` tabs. (#342)
|
||||
// - Added **transient tabs**, which are colored differently than normal tabs.
|
||||
// These tabs are automatically opened by the debugger when snapping to
|
||||
// source code which is not already opened. They are automatically replaced
|
||||
// and recycled when the debugger needs to snap to new locations. This will
|
||||
// greatly reduce the number of unused source code tabs accumulated
|
||||
// throughout a debugging session. These tabs can still be promoted to
|
||||
// permanent tabs, in which case they'll stay around until manually closed.
|
||||
// - The `Scheduler` tab has been removed, in favor of three separate tabs,
|
||||
// which present various versions of the same information: `Threads`,
|
||||
// `Processes`, and `Machines`. The justification for this is that the
|
||||
// common case is debugging a small number of programs, usually 1, and for
|
||||
// those purposes, the `Threads` tab is sufficient if not desirable, and
|
||||
// the extra information provided by `Processes` and `Machines`, while useful
|
||||
// in other contexts, is not useful in that common case. The `Machines` tab
|
||||
// now shows a superset of the information previously found in the
|
||||
// `Scheduler` tab.
|
||||
// - The two separate interfaces for editing threads, breakpoints, and watch
|
||||
// pins (the right-click context menu and the dedicated tabs) have been
|
||||
// merged. Both interfaces support exactly the same features in exactly the
|
||||
// same way. The same interface is also accessible through the palette.
|
||||
// - Added the ability to add a list of environment strings to targets. (#73)
|
||||
// - The debugger releases are now packaged with a `raddbg_markup.h`
|
||||
// single-header library which contains a number of source code markup tools
|
||||
// which can be used in your programs. Some of these features are for direct
|
||||
// interaction with the RAD Debugger. Others are simply helpers (often
|
||||
// abstracting over platform functionality) for very commonly needed
|
||||
// debugger-related features, like setting thread names. This second set of
|
||||
// features will work with any debugger. Here is a list of this library's
|
||||
// initial features (proper documentation will be written once the library
|
||||
// matures):
|
||||
// - `raddbg_is_attached()`: Returns 1 if the RAD Debugger is attached,
|
||||
// otherwise returns 0.
|
||||
// - `raddbg_break()`: Generates a trap instruction at the usage site.
|
||||
// - `raddbg_break_if(expr)`: Generates a trap instruction guarded by a
|
||||
// conditional, evaluating `expr`.
|
||||
// - `raddbg_thread_name(format, ...)`, e.g.
|
||||
// `raddbg_thread_name("worker_thread_%i", index)`: Sets the calling
|
||||
// thread's name.
|
||||
// - `raddbg_log(format, ...)`, e.g.
|
||||
// `raddbg_log("This is a number: %i", 123)`: Writes a debug string for a
|
||||
// debugger to read and display in its UI.
|
||||
// - `raddbg_thread_color_u32(hexcode)`, e.g.
|
||||
// `raddbg_thread_color_u32(0xff0000ff)`: Sets the calling thread's color.
|
||||
// - Also can be done with individual `[0, 1]` color components:
|
||||
// `raddbg_thread_color_rgba(1.f, 0.f, 0.f, 1.f)`
|
||||
// - `raddbg_pin(<expr>)`, e.g.
|
||||
// `raddbg_pin(slice(dynamic_array))`: Like watch pins, but defined in
|
||||
// source code. This is used by the debugger UI, but does not show up
|
||||
// anywhere other than the source code, so it can either be used as a macro
|
||||
// (which expands to nothing), or in comments too.
|
||||
// - `raddbg_entry_point(name)`, e.g. `raddbg_entry_point(entry_point)`:
|
||||
// declares the entry point for an executable, which the debugger will use
|
||||
// when stepping into a program, rather than the defaults (e.g. `main`).
|
||||
// - `raddbg_type_view(<type|pattern>, <expression>)`, e.g.
|
||||
// `raddbg_type_view(DynamicArray<?>, slice($))`: declares a type view from
|
||||
// source code, rather than from debugger configuration.
|
||||
// - The debugger now incorporates the loaded project in all window titles.
|
||||
// - Fixed an annoyance where the debugger would open a console window, even
|
||||
// for graphical programs, causing a flicker.
|
||||
// - Fixed substantial unnecessary memory usage with very large output logs.
|
||||
// - Fixed a debugger regression which was incorrectly using thread name events
|
||||
// when those events were sent to name a suspended thread by a different
|
||||
// thread. (#430)
|
||||
// - Added support for Tab and Shift + Tab style navigation in Watch tables,
|
||||
// using the `Move Next` and `Move Previous` commands. (#93)
|
||||
// - The debugger now correctly serializes window sizes when fullscreened.
|
||||
// (#130)
|
||||
// - Added an option to disable the Alt key Windows-style menu-bar focusing
|
||||
// behavior. (#382)
|
||||
// - Added an option to quickly duplicate configuration entities (targets,
|
||||
// breakpoints, etc.). (#451)
|
||||
// - Fixed a crash relating to truncated string hover tooltips when font sizes
|
||||
// were changed. (#416)
|
||||
// - Fixed the debugger's lack of robustness to selecting non-config files as
|
||||
// config files. (#432, #409)
|
||||
// - Fixed crashes caused by quick changes in the set of loaded modules while
|
||||
// debug information table tabs (`Procedures`, `Globals`, `Types`) were open.
|
||||
// (#467, #459, #458, #440, #436, #415, #412)
|
||||
// - Fixed a crash where the debugger would crash when toggling fullscreen, if
|
||||
// launched in fullscreen mode. (#454, #413)
|
||||
// - Adjusted breakpoint placement to automatically deduplicate identical
|
||||
// breakpoints, if placed at the same location, with no extra information
|
||||
// attached (condition or label). (#407)
|
||||
// - Made several visual improvements.
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: post-0.9.16 TODO notes
|
||||
//
|
||||
@@ -371,160 +162,6 @@
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Recently Completed Task Log
|
||||
//
|
||||
// [x] filesystem drag/drop support
|
||||
// [x] ** Converter performance & heuristics for asynchronously doing it early
|
||||
// [x] icon fonts glyphs sometimes disappear for specific font size, but they
|
||||
// reappear if you go +1 higher or -1 lower. Mostly red triangle in watch
|
||||
// values for "unknown identifier". But also yellow arrow in call stack
|
||||
// disappears if font size gets too large.
|
||||
// [x] @cleanup central worker thread pool - eliminate per-layer thread pools
|
||||
// [x] frontend config entities, serialization/deserialization, remove hacks,
|
||||
// etc. - the entity structure should be dramatically simplified & made
|
||||
// to reflect a more flexible string-tree data structure which can be
|
||||
// more trivially derived from config, and more flexibly rearranged.
|
||||
// drag/drop watch rows -> tabs, tabs -> watch rows, etc.
|
||||
// [x] frontend entities need to be the "upstream state" for windows, panels,
|
||||
// tabs, etc. - entities can be mapped to caches of window/panel/view state
|
||||
// in purely immediate-mode fashion, so the only *state* part of the
|
||||
// equation only has to do with the string tree.
|
||||
// [x] watch table UI - hidden table boundaries, special-cased control hacks
|
||||
// [x] hash store -> need to somehow hold on to hash blobs which are still
|
||||
// depended upon by usage layers, e.g. extra dependency refcount, e.g.
|
||||
// text cache can explicitly correllate nodes in its cache to hashes,
|
||||
// bump their refcount - this would keep the hash correllated to its key
|
||||
// and it would prevent it from being evicted (output debug string perf)
|
||||
// [x] OutputDebugString spam, keeping way too much around!
|
||||
// [x] auto view rule templates (?)
|
||||
// [x] auto-view-rules likely should apply at each level in the expression
|
||||
// tree
|
||||
// [x] `slice` view rule - extend to support begin/end style as well
|
||||
// [x] investigate false exceptions, being reported while stepping through init code
|
||||
// [x] collapse upstream state for theme/bindings/settings into entities; use cache accelerators if needed to make up difference
|
||||
// [x] collapse upstream state for windows/panels/tabs into entities; use downstream window/view resource cache to make up the difference
|
||||
// [x] entity <-> mdesk paths
|
||||
// [x] save view column pcts; generalize to being a first-class thing in
|
||||
// RD_View, e.g. by just having a string -> f32 store
|
||||
// [x] transient view timeout releasing
|
||||
// [x] view rule editors in hover-eval
|
||||
// [x] table column boundaries should be checked against *AFTER* table
|
||||
// contents, not before
|
||||
// [x] In a "hover watch" (where you hover over a variable and it shows a pop-
|
||||
// up watch window), if you expand an item near the bottom of the listing,
|
||||
// it will be clipped to the bottom of the listing instead of showing the
|
||||
// actual items (ie., it doesn't resize the listing based on what's
|
||||
// actually visible)
|
||||
// [x] Right-clicking on a thread in the Scheduler window pops up a context
|
||||
// menu, but you can't actually see it because the tooltip for the thread
|
||||
// draws on top of it, so you can't see the menu.
|
||||
// [x] double-click vs. single-click for folder navigation, see if we can infer
|
||||
// [x] 'view rules' need to be rephrased as "function" calls in the expression language
|
||||
// [x] need a formalization which takes unknown identifiers which are called, and tries
|
||||
// to use that to apply a IR-generation rule, which is keyed by that unknown
|
||||
// identifier
|
||||
// [x] we need to select expressions as "parents" when possible, so that when using an
|
||||
// auto-view-rule (or similar context), leaf identifiers referring to e.g. members
|
||||
// of an expression's type resolve correctly (e.g. bitmap(base, width, height) being
|
||||
// used as a shorthand for bitmap(foo.base, foo.width, foo.height) when evaluating
|
||||
// foo).
|
||||
// [x] single-line visualization busted with auto-view-rules applied, it seems...
|
||||
// not showing member variables, just commas, check w/ mohit
|
||||
// [x] r8 bitmap view rule seems incorrect?
|
||||
// [x] font cache layer -> can probably cache (string*font*size) -> (run) too
|
||||
// (not just rasterization)... would save a *lot*, there is a ton of work
|
||||
// just in looking up & stitching stuff repeatedly
|
||||
// [x] convert UI layout pass to not be naive recursive version
|
||||
// [x] @feature header file for target -> debugger communication; printf, log,
|
||||
// etc.
|
||||
// [x] `slider:(min max)` view rule
|
||||
// [x] `matrix` view rule
|
||||
// [x] `each:(expr addition)` - apply some additional expression to all
|
||||
// elements in an array/linked list would be useful to look at only a
|
||||
// subset of an array of complex structs
|
||||
// [x] @bug view-snapping in scroll-lists, accounting for mapping between
|
||||
// visual positions & logical positions (variably sized rows in watch,
|
||||
// table headers, etc.)
|
||||
// [x] @cleanup straighten out index/number space & types & terminology for
|
||||
// scroll lists
|
||||
// [x] sort locals by appearance in source code (or maybe just debug info)
|
||||
// [x] per-panel font size overrides
|
||||
// [x] theme lister -> fonts & font sizes
|
||||
// [x] make `array` view rule work with actual array types, to change their
|
||||
// size dynamically
|
||||
// [x] automatically start search query with selected text
|
||||
// [x] @feature processor/data breakpoints
|
||||
// [x] Setting the code_font/main_font values to a font name doesn't work.
|
||||
// Should probably make note that you have to set it to a path to a TTF,
|
||||
// since that's not normally how Windows fonts work.
|
||||
// [x] I had to go into the user file to change the font. That should probably
|
||||
// be in the theme window?
|
||||
// [x] autocompletion lister, file lister, function lister, command lister,
|
||||
// etc., all need to be merged, and optionally contextualized/filtered.
|
||||
// right-clicking a tab should be equivalent to spawning a command lister,
|
||||
// but only with commands that are directly
|
||||
// [x] tab opening
|
||||
// [x] query listers
|
||||
// [x] watch-window-defined query completion
|
||||
// [x] rebindings
|
||||
// [x] correct breakpoint/watch pin location visualization
|
||||
// [x] config saving/loading
|
||||
// [x] "pin hover eval"
|
||||
// [x] member filtering
|
||||
// [x] filtering is busted on ctrl_entities, cgs
|
||||
// [x] right-click menus -> specialize query
|
||||
// [x] writing ctrl entity names
|
||||
// [x] saved view rules need to be applied when watch loads!!!
|
||||
// [x] mechanism to promote tab -> non-auto
|
||||
// [x] focusing a hover eval makes icons disappear! (seems to only work with
|
||||
// table demo in mule_main)
|
||||
// [x] need to distinguish between auto-genn'd expressions and editable expressions
|
||||
// in watches. if I put in array[0] in the watch window, it just shows up as
|
||||
// [0] (same for member names, foo.a shows as .a)
|
||||
// [x] types in watch windows are missing!
|
||||
// [x] MISSING ERRORS IN WATCH WINDOW
|
||||
// [x] fix everything lister stopping at targets?
|
||||
// [x] strange bug where typing on a non-editable expression cell (e.g. bp
|
||||
// right-click menu) causes cmd icons to shift over
|
||||
// [x] acceleration pass:
|
||||
// [x] default setting schema lookup
|
||||
// [x] evaluation, esp. setting evaluation (evaluation cache)
|
||||
// [x] string -> run?
|
||||
// [x] fix glitchiness when mutating cfgs - the cfgs evaluations are cached, and
|
||||
// never are recomputed!!!!
|
||||
// [x] fix editing source locations textually
|
||||
// [x] see if I can make padding member names nicer
|
||||
// [x] settings / exception filters
|
||||
// [x] why does 'cut' not work???
|
||||
// [x] disallow chained fast paths when evaluating callee in call expr
|
||||
// [x] missing function type decorations in lister etc.
|
||||
// [x] dynamic type resolution
|
||||
// [x] ensure "file picking", for file path map remap, works
|
||||
// [x] paths in cfg -> relativization on save, de-relativization on load
|
||||
// [x] "add hover eval to watch" (expr drag & drop -> watch window)
|
||||
// [x] unattached process evaluation - need a string to evaluate so I can generate
|
||||
// the evals
|
||||
// [x] save-to-project (command line targets)
|
||||
// [x] odin's demo is busted - need to revert PDB conversion type index changes.
|
||||
//- readme improvements
|
||||
// [x] I was a little confused about what a profile file was. I understood
|
||||
// what the user file was, but the profile file sounded like it should
|
||||
// perhaps be per-project, yet it sounded like it was meant to be somewhat
|
||||
// global? I don't have any feedback here because it probably will make
|
||||
// sense once I use the debugger more, but I just thought I'd make a note
|
||||
// to say that I was confused about it after reading the manual, so
|
||||
// perhaps you could elaborate a little more on it in there.
|
||||
// [x] It wasn't clear to me how you save a user or project file. I can see
|
||||
// how to load them, but not how you save them. Obviously I can just copy
|
||||
// the files myself in the shell, but it seemed weird that there was no
|
||||
// "save" option in the menus.
|
||||
// [x] user switching
|
||||
// [x] project switching
|
||||
// [x] do not apply filters past one block layer
|
||||
// [x] "pop out" (hitting enter on visualizers should open them as tabs)
|
||||
// [x] crash bug, release mode - filter globals view (try with debugging raddbg, typing `dev` in globals view)
|
||||
// [x] fix operator precedence in (u64)&foo - merge prefix-unary parsing with atom parsing loop
|
||||
// [x] finish theme editing, build themes - replace code colors map with new theme stuff
|
||||
// [x] autocompletion lister
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Build Options
|
||||
|
||||
+16
-16
@@ -941,13 +941,13 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
////////////////////////////
|
||||
//- rjf: unpack row's evaluation, key, & block info
|
||||
//
|
||||
E_Type *row_type = e_type_from_key__cached(row->eval.irtree.type_key);
|
||||
E_Type *row_type = e_type_from_key(row->eval.irtree.type_key);
|
||||
EV_Key key = row->key;
|
||||
EV_Block *block = row->block;
|
||||
E_Eval block_eval = e_eval_from_key(row->block->eval.key);
|
||||
E_TypeKey block_type_key = e_type_key_unwrap(block_eval.irtree.type_key, E_TypeUnwrapFlag_Meta);
|
||||
E_TypeKind block_type_kind = e_type_kind_from_key(block_type_key);
|
||||
E_Type *block_type = e_type_from_key__cached(block_type_key);
|
||||
E_Type *block_type = e_type_from_key(block_type_key);
|
||||
RD_Cfg *evalled_cfg = rd_cfg_from_eval_space(row->eval.space);
|
||||
CTRL_Entity *evalled_entity = (row->eval.space.kind == RD_EvalSpaceKind_MetaCtrlEntity ? rd_ctrl_entity_from_eval_space(row->eval.space) : &ctrl_entity_nil);
|
||||
|
||||
@@ -1086,7 +1086,7 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
}
|
||||
else if(maybe_table_type->kind == E_TypeKind_Lens)
|
||||
{
|
||||
maybe_table_type = e_type_from_key__cached(maybe_table_type->direct_type_key);
|
||||
maybe_table_type = e_type_from_key(maybe_table_type->direct_type_key);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
@@ -1125,7 +1125,7 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
//
|
||||
else if(row->eval.space.kind == E_SpaceKind_FileSystem)
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(row->eval.irtree.type_key);
|
||||
E_Type *type = e_type_from_key(row->eval.irtree.type_key);
|
||||
if(type->kind == E_TypeKind_Set)
|
||||
{
|
||||
String8 file_path = e_string_from_id(row->eval.value.u64);
|
||||
@@ -1325,7 +1325,7 @@ rd_watch_row_info_from_row(Arena *arena, EV_Row *row)
|
||||
//
|
||||
else if(row->eval.space.kind == RD_EvalSpaceKind_MetaCmd)
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(row->eval.irtree.type_key);
|
||||
E_Type *type = e_type_from_key(row->eval.irtree.type_key);
|
||||
if(type->kind == E_TypeKind_Set)
|
||||
{
|
||||
rd_watch_cell_list_push_new(arena, &info.cells, RD_WatchCellKind_Eval, row->eval,
|
||||
@@ -1539,8 +1539,8 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
|
||||
//////////////////////////////
|
||||
//- rjf: unpack evaluation
|
||||
//
|
||||
E_Type *block_type = e_type_from_key__cached(row->block->eval.irtree.type_key);
|
||||
E_Type *cell_type = e_type_from_key__cached(cell->eval.irtree.type_key);
|
||||
E_Type *block_type = e_type_from_key(row->block->eval.irtree.type_key);
|
||||
E_Type *cell_type = e_type_from_key(cell->eval.irtree.type_key);
|
||||
MD_NodePtrList cell_schemas = rd_schemas_from_name(cell_type->name);
|
||||
if(cell->eval.space.u64s[1] == 0 && cell_schemas.count != 0)
|
||||
{
|
||||
@@ -1554,7 +1554,7 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
|
||||
result.file_path = rd_file_path_from_eval(arena, cell->eval);
|
||||
for(E_Type *type = cell_type;
|
||||
type->kind == E_TypeKind_Lens;
|
||||
type = e_type_from_key__cached(type->direct_type_key))
|
||||
type = e_type_from_key(type->direct_type_key))
|
||||
{
|
||||
RD_ViewUIRule *view_ui_rule = rd_view_ui_rule_from_string(type->name);
|
||||
if(view_ui_rule != &rd_nil_view_ui_rule)
|
||||
@@ -1569,7 +1569,7 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
|
||||
//
|
||||
for(E_Type *type = cell_type;
|
||||
type->kind != E_TypeKind_Null;
|
||||
type = e_type_from_key__cached(type->direct_type_key))
|
||||
type = e_type_from_key(type->direct_type_key))
|
||||
{
|
||||
if(type->kind == E_TypeKind_MetaDescription)
|
||||
{
|
||||
@@ -1696,9 +1696,9 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
|
||||
// rjf: if this cell has a meta-display-name, then use that
|
||||
if(expr_string.size == 0)
|
||||
{
|
||||
for(E_Type *t = e_type_from_key__cached(cell->eval.irtree.type_key);
|
||||
for(E_Type *t = e_type_from_key(cell->eval.irtree.type_key);
|
||||
t != &e_type_nil;
|
||||
t = e_type_from_key__cached(t->direct_type_key))
|
||||
t = e_type_from_key(t->direct_type_key))
|
||||
{
|
||||
if(t->kind == E_TypeKind_MetaDisplayName)
|
||||
{
|
||||
@@ -1837,7 +1837,7 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
|
||||
// rjf: determine if code
|
||||
B32 is_code = 1;
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(e_type_key_unwrap(cell->eval.irtree.type_key, E_TypeUnwrapFlag_Meta));
|
||||
E_Type *type = e_type_from_key(e_type_key_unwrap(cell->eval.irtree.type_key, E_TypeUnwrapFlag_Meta));
|
||||
if(type->flags & (E_TypeFlag_IsPlainText|E_TypeFlag_IsPathText))
|
||||
{
|
||||
is_code = 0;
|
||||
@@ -3744,7 +3744,7 @@ rd_eval_color_from_eval(E_Eval eval)
|
||||
LeafTask *last_task = first_task;
|
||||
for(LeafTask *t = first_task; t != 0 && num_components_left > 0; t = t->next)
|
||||
{
|
||||
E_Type *type = e_type_from_key__cached(e_type_key_unwrap(t->eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative));
|
||||
E_Type *type = e_type_from_key(e_type_key_unwrap(t->eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative));
|
||||
switch(type->kind)
|
||||
{
|
||||
default:{}break;
|
||||
@@ -3779,8 +3779,8 @@ rd_eval_color_from_eval(E_Eval eval)
|
||||
// (the lens implicitly tells us the format)
|
||||
RD_EvalColor result = {0};
|
||||
{
|
||||
E_Type *lens_type = e_type_from_key__cached(eval.irtree.type_key);
|
||||
for(E_Type *t = lens_type; t->kind == E_TypeKind_Lens; t = e_type_from_key__cached(t->direct_type_key))
|
||||
E_Type *lens_type = e_type_from_key(eval.irtree.type_key);
|
||||
for(E_Type *t = lens_type; t->kind == E_TypeKind_Lens; t = e_type_from_key(t->direct_type_key))
|
||||
{
|
||||
if(str8_match(t->name, str8_lit("color"), 0))
|
||||
{
|
||||
@@ -3940,7 +3940,7 @@ RD_VIEW_UI_FUNCTION_DEF(color)
|
||||
if(ui_dragging(h_sig) || ui_dragging(sv_sig) || ui_dragging(a_sig))
|
||||
{
|
||||
// TODO(rjf): hard-coding U32 committing for now
|
||||
E_Type *type = e_type_from_key__cached(e_type_key_unwrap(eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative));
|
||||
E_Type *type = e_type_from_key(e_type_key_unwrap(eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative));
|
||||
if(type->kind == E_TypeKind_U32 ||
|
||||
type->kind == E_TypeKind_S32 ||
|
||||
type->kind == E_TypeKind_U64 ||
|
||||
|
||||
Reference in New Issue
Block a user