artifact_cache: fix leak of old-generation artifacts, when those artifacts are replaced by newer generation computations. artifacts can opaquely hold things like arena pointers, and so when we replace them in the cache, we need to respect the lookup api's provision of create/destroy hooks for the cache, such that the artifacts can be released correctly (using the destroy hook) before being replaced. this is separate from regular eviction.

This commit is contained in:
Ryan Fleury
2026-05-11 11:49:15 -07:00
parent 6a95da35e0
commit 52da228efe
8 changed files with 157 additions and 24 deletions
+43 -15
View File
@@ -4,19 +4,45 @@
////////////////////////////////
//~ rjf: post-0.9.25 TODO notes
//
// [ ] "autos" collection, which can be evaluated
// [ ] show "autos" inline in source code near thread?
// [ ] step out of scopes / loops
// [ ] memory_size(...) view for quickly evaluating memory sizes
// [ ] value coloring view in watch window, so you can quickly scroll & see values outside of a threshold
//
// [ ] project/user file improvements
// [ ] "default" -> "untitled"
// [ ] should clear default project data every time the program starts
// [ ] new project / user should not require picking a path; should just
// by default go to "untitled" in default user path
// [ ] more things should move to user data, but project-tagged - like
// recent files, watches?, etc.
//
// [ ] killing/restarting thread performance (#780)
// [ ] codebase-internal barrier impl (win7/linux support)
// [ ] PDB -> RDI conversion memory usage
// [ ] policy for closing debug info which is no longer relevant?
// [ ] external window focusing bugs
//
// [ ] linux/dwarf fixes
// [ ] excessive CPU usage on async threads - barrier impl?
// [ ] step-over/step-into doesn't step successfully in many cases, just causes a continue
// [ ] rd_frame has no type info, should be (void -> void) - type should be generated but it
// [x] rd_frame has no type info, should be (void -> void) - type should be generated but it
// is not being hooked up correctly
// [ ] type views for `MyByte *` example do not match correctly
//
// [ ] many threads hitting conditional breakpoints -> causes 0x8000003 exception!
// [ ] string conditional breakpoints -> size != 0 check seems to fail, can test w/ "rd_init" subprogram type gen in d2r2
// [ ] no selected thread -> causing evaluation failures, e.g. with go-to-definition
//
//- evaluation space coverage pass
// [ ] eval space reads/writes -> needs staleness/badness info - replace ctrl layer, to apply to all spaces
// [ ] need concrete ways of referring into a space at any offset - e.g. `process.memory + 0x1234`, `file:"foo".data + 0x1234`, `thread.regs + 0x80`, etc.
// [ ] memory view needs to take advantage of above when peeking; ensure peeking works on files etc.
// [ ] need to eliminate accelerators from evaluation context, and build them on the fly instead -
// this is necessary because, for instance, the correct locals_map varies by expression, if we
// want to (we do) support features like "look up call stack to find local"
// [ ] unit / module name qualification
//
//- memory view pass
// [ ] toggleable ascii column
@@ -31,10 +57,10 @@
// [ ] signify empty watch window "expression" slot more as a text field?
//
//- jeff notes
// [ ] option to prefer addresses first with string ptrs
// [ ] focus changing on f10/f11? may be related to auto_run/auto_step - look at a bin/jeffr
// [ ] option to turn off transient tabs altogether
// [ ] single-line viz for pointers w/ bad (unmapped) addresses
// [ ] option to prefer addresses first with string ptrs
// [x] option to turn off transient tabs altogether
//
//- namespace/locations/variables RDI pass
// [x] RDI_Local, RDI_GlobalVariable, RDI_ThreadVariable -> RDI_Variable
@@ -58,12 +84,12 @@
//- urgent fixes
// [ ] (use msvc assert as an example) show fastfail exception info (code, name, etc.) - comes from ExceptionInformation @fastfail
// [ ] stepping w/ spoofs & shadow stack enabled - writing spoof will send a stack buffer overrun event @shadow_stack_step
// [ ] hardware breakpoints regression (global eval in ctrl)
// [ ] native filesystem dialog, resizing raddbg window -> crash!
// [ ] stdout/stderr path target setting is now busted >:(
// [ ] stdout/stderr path target setting is now busted >:( (i think this is because of path confusion? check working dir)
// [ ] target ui entry point should override built-in entry point
// [ ] list of all tabs in palette
// [ ] u64 + (ptr - ptr) seems to produce unexpected results - double check with C rules?
// [x] hardware breakpoints regression (global eval in ctrl)
//
//- flow notes
// [ ] "skip breakpoint, run to source", when stopped at a non-source location
@@ -74,9 +100,9 @@
//- memory view
// [ ] have smaller visible range than entire memory space, within some bounds (e.g. 64KB)
// [ ] dynamically expand memory space, based on scrolling
// [ ] fix clicking through occluded panels etc.
// [ ] disambiguate . character in ASCII columns
// [ ] fix type intepretations of cursor in bottom pane
// [x] fix type intepretations of cursor in bottom pane
// [x] fix clicking through occluded panels etc.
//
//- watch improvements
// [ ] *ALL* expressions in watch windows need to be editable.
@@ -203,21 +229,21 @@
// [ ] search-in-all-files
// [ ] automatically snap to search matches when searching source files
// [ ] memory view
// [ ] memory view mutation controls
// [ ] memory view user-made annotations
// [ ] memory view searching
// [x] memory view mutation controls
// [ ] disasm view
// [ ] visualize jump destinations in disasm
//
//- longer-term future features
// [ ] long-term future notes from martins
// [ ] core dump saving/loading
// [ ] parallel call stacks view
// [ ] parallel watch view
// [ ] mixed native/interpreted/jit debugging
// - it seems python has a top-level linked list of interpreter states,
// which should allow the debugger to map native callstacks to python
// code
// [ ] core dump saving/loading
// [ ] parallel call stacks view
// [ ] parallel watch view
// [ ] mixed native/interpreted/jit debugging
// - it seems python has a top-level linked list of interpreter states,
// which should allow the debugger to map native callstacks to python
// code
//
//- code cleanup
// [ ] eliminate explicit font parameters in the various ui paths (e.g.
@@ -257,6 +283,8 @@
#define FNT_INIT_MANUAL 1
#define RD_INIT_MANUAL 1
#define ARENA_TABLE_DEBUG BUILD_DEBUG
////////////////////////////////
//~ rjf: Includes