This shows you the differences between two versions of the page.
— |
blog:pushbx:2024:0408_ldebug_work_in_early_april [2024-04-08 19:51:40 +0200 Apr Mon] (current) ecm created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== lDebug work in early April ====== | ||
+ | |||
+ | |||
+ | **2024-04-07** | ||
+ | |||
+ | ===== Updates to the manual ===== | ||
+ | |||
+ | Only listing the most important changesets: | ||
+ | |||
+ | * [[https:// | ||
+ | * List more INSTALL nouns ([[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | |||
+ | ===== Code changes ===== | ||
+ | |||
+ | * init and qq [[https:// | ||
+ | * bb: Many comments added and updated | ||
+ | * bb: Various optimisations | ||
+ | * bb: [[https:// | ||
+ | * bb: [[https:// | ||
+ | * bb: [[https:// | ||
+ | * bb: [[https:// | ||
+ | * isstring: [[https:// | ||
+ | * expr: [[https:// | ||
+ | * expr: [[https:// | ||
+ | * expr: [[https:// | ||
+ | * expr: Several optimisations to operator dispatchers, | ||
+ | * [[https:// | ||
+ | * In rr.asm rr4 [[https:// | ||
+ | |||
+ | |||
+ | ==== In detail: Truncated tables ==== | ||
+ | |||
+ | The new bb dispatch table for the DI value as well as the optimised operator default index table for the DX value share one thing: These tables are truncated. That means when the dispatch occurs to a handler without a corresponding entry in the truncated table, the respective register is initialised to a randomly read value within the data/entry section. The table read thus can overflow the table. | ||
+ | |||
+ | This is not a problem for these handlers because they do not depend on any particular value in the register, and are themselves allowed to change it. (Eg the operator dispatchers have "CHG: dx".) | ||
+ | |||
+ | It does pose a small problem when debugging the debugger: If access variables are used to detect a read or access to a variable, the table overflow could register as an access to the variable despite actually accessing the truncated table. This is considered acceptable. | ||
+ | |||
+ | The truncation of the tables in both cases involved re-ordering the tables so that all the in-use entries are first. Previously, unused entries were filled with zeroes to pad out the tables up to the first in-use entry. | ||
+ | |||
+ | There is an alternative: | ||
+ | |||
+ | |||
+ | ==== Operator dispatchers ==== | ||
+ | |||
+ | The optimisations to the operator dispatchers used several facts. First, some of the used operator index values were right next to each other, allowing an '' | ||
+ | |||
+ | Second, some code pathes turned out to be duplicated for different operators. These were merged. | ||
+ | |||
+ | Third, the boolean and bitwise OR/AND/XOR operators using the non-keyword symbols all compared the next text byte with the matched symbol (conveniently passed in AL) and did a certain adjustment to the default operator index in case a match is found. The adjustment happens to match the same simple addition for every one of these operators. So the entire code for these three operator dispatchers is now shared. | ||
+ | |||
+ | (By re-ordering the bitwise and boolean operators the latter adjustment could be done using just an '' | ||
+ | |||
+ | |||
+ | ===== Consideration: | ||
+ | |||
+ | I idly wondered whether an Extension for lDebug being loaded into the debugger could extend the GNU GPL copyleft to the debugger. In practice this doesn' | ||
+ | |||
+ | I believe that the code links and data links that the ELD linker gets from the debugger constitute dynamic linking of the ELD to the debugger. Therefore if the ELD is under the GNU GPL, the debugger and likely all other ELDs used at the same time also need to be GPL-compatible. (As to the exact timing there was [[https:// | ||
+ | |||
+ | Moreover, if an ELD is under the GNU LGPL, then it (and/or the debugger) must follow a certain specification of the links and interfaces in order to enable swapping the LGPLed module by an independent implementation at link time (that is, run time of the ELD being loaded). | ||
+ | |||
+ | In addition to the earlier considerations, | ||
+ | |||
+ | {{tag> | ||
+ | |||
+ | |||
+ | ~~DISCUSSION~~ | ||