User Tools

Site Tools


blog:pushbx:2023:1115_early_november_work_on_extensions_for_ldebug

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

blog:pushbx:2023:1115_early_november_work_on_extensions_for_ldebug [2023-11-15 17:10:12 +0100 Nov Wed] (current)
ecm created
Line 1: Line 1:
 +====== Early November work on Extensions for lDebug ======
 +
 +**2023-11-12**
 +
 +This week some more work on ELDs got done. I also [[https://hg.pushbx.org/ecm/testfont|extracted a copylefted font]] from GLaBIOS.
 +
 +
 +===== Other linker ELDs =====
 +
 +Two ELDs using the "other link" feature got added. This means that when they are built with ELDOTHER=1 then they will link some specifically marked data links (using the ''otherlinkdatarelocation'') to a different debugger instance's data. The other link ELDs are completed by a few macros and two variables which refer to the data/stack segment of the other instance.
 +
 +This allows the two other link ELDs so far, ldmemoth.eld and instnoth.eld (variants of ldmem.eld and instnoun.eld respectively), to access a different debugger instance's data. This is particularly useful to access a debuggable debugger's data while it is being traced by an outer debugger.
 +
 +The additions to the ELDs individual sources [[https://hg.pushbx.org/ecm/ldebug/rev/d54844e0797e|are completed by macro changes to add the other link data relocation, linker changes to run yet another pass of data relocations]], and [[https://hg.pushbx.org/ecm/ldebug/rev/6a1db76af4f1|the amisoth ELD]] which exports the required link table and segments. This ELD must be run in the debugger to access as an other link, that is the debuggable debugger. The other link debugger must also install its AMIS interface, as the AMIS function 42h is used to provide the exported data.
 +
 +The conversion of the two original ELDs to their other link variants was straightforward and achieved without any mistakes. The ldmem ELD was extended to also show command injection handlers. The instnoun ELD had commands added to set (install), clear (uninstall), or toggle the install flags of the linked debugger, except for the AREAS install noun which is nontrivial. The primary use case for instnoth.eld is to set or clear the DCO7 flag that enables houdinis to run their breakpoints.
 +
 +The use is limited for other install flags, like the DCO4 flags for interrupt hooks, because these front-end DCO flags are only actually acted upon when the cmd3 command loop runs.
 +
 +Similarly, the ldmemoth ELD is limited in that it may be called when a memory structure is being modified by the other link debugger or one of its ELDs.
 +
 +Further, the other link ELDs do not detect when the other link debugger terminates. It is to be considered user error to attempt to use them past that point.
 +
 +
 +===== ldmem.eld =====
 +
 +Like mentioned, the ldmem ELD now displays a command inject handler. It also displays selector values in Protected Mode.
 +
 +
 +===== Copy Output ELD (co.eld) =====
 +
 +The Copy Output ELD [[https://hg.pushbx.org/ecm/ldebug/rev/74062eb8c1a0|was extended]] with [[https://hg.pushbx.org/ecm/ldebug/rev/60e6389b8c90|a new debugger hook]] which passes to it the complete input obtained from either the ''getinput'' function or the DOS interrupt 21h service 0Ah. It also uses [[https://hg.pushbx.org/ecm/ldebug/rev/a8fea1a00379|a new variable]] which indicates whether ''getinput'' is running currently.
 +
 +These changes result in two new modes of operation: GETINPUTMODE ALL (the prior behaviour) or GETINPUTMODE FULLONLY (ignore output during ''getinput'', only write the resulting full line). The service 0Ah change is unconditional, so that its input is now recorded at all rather than being skipped.
 +
 +The new hook in the debugger [[https://hg.pushbx.org/ecm/ldebug/rev/c44d8038368e|is called near]] from lineio.asm, and [[https://hg.pushbx.org/ecm/ldebug/rev/902d9a517069|uses a dispatch value in BL]]. This will potentially allow new values to be defined for this hook.
 +
 +Unrelated to these changes, the ELD gained a COPYOUTPUT TRUNCATE command.
 +
 +
 +===== dbitmap ELD =====
 +
 +This ELD allows to view as bitmaps data that represents 8-pixel-wide graphics with 1 bit per pixel. The data is dumped as text with configurable texts of up to 10 text bytes per pixel.
 +
 +The data to be dumped can be specified with an INTERNAL keyword to access a font embedded into the ELD, which was lifted from the GLaBIOS project.
 +
 +It is intended to add a mode where more than one bitmap can be displayed, with each bitmap occupying its own column. This is still to be added.
 +
 +
 +===== lineio.asm =====
 +
 +The ::empty:: keyword [[https://hg.pushbx.org/ecm/ldebug/rev/b38e38041fec|was added to inhibit automatic search]] in the ::scripts:: path.
 +
 +
 +===== DOS current directory and current drive ELDs =====
 +
 +dospwd.eld: Display current drive's or specified drive's current directory
 +
 +doscd.eld: Change current directory and/or current drive
 +
 +dosdrive.eld: Get current drive, or get a pathname's drive, or set current drive
 +
 +
 +===== dosdir.eld =====
 +
 +This ELD displays a DOS directory listing based on a pathname pattern specified to it. The listing can use either SFN search or LFN search. It can be verbose with SFN, attributes, size, last modified timestamp, and LFN, which is the default. It can also be WIDE, with just the SFN with brackets to indicate subdirectories, up to 5 filenames per line. Finally, the trailing SORT keyword will make the ELD use the auxiliary buffer to sort the filenames based on their text byte values, ignoring capitalisation. A SORTLFN keyword specifies to sort based on LFNs, which may take more memory, while a SORTSFN keyword specifies to sort based on SFNs (the default).
 +
 +
 +===== variable.eld =====
 +
 +This ELD gained a oneshot mode which displays or runs a command line tail passed to it, doing the expected variable substitution. This allows to use it without affecting all commands entered to the debugger.
 +
 +
 +===== path.eld =====
 +
 +This ELD ports the init's filename extension warning, filename extension guessing, and path search to work for N and K commands entered to the fully initialised debugger.
 +
 +
 +===== Misc =====
 +
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/0476a8c1d686|Move some variables]] to enable bootloaded-only build (_APPLICATION=0 _DEVICE=0)
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/f5aed230cbb9|Accept commas]] for N and K commands before the pathname, and for MSDebug-compatible N command [[https://hg.pushbx.org/ecm/ldebug/rev/b392101ebad2|include the comma in the command line tail]]
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/a7918eeea12b|Add examples]] of ELD techniques [[https://pushbx.org/ecm/doc/ldebug.htm#eld-examples|to the manual]]
 +  * Add a source/eld/makone.sh script [[https://hg.pushbx.org/ecm/ldebug/rev/4cf9f1adbcd1|to build a single ELD and its corresponding XLD]], greatly cutting down the time spent rebuilding all ELDs
 +
 +{{tag>ldebug eld}}
 +
 +
 +~~DISCUSSION~~
  
blog/pushbx/2023/1115_early_november_work_on_extensions_for_ldebug.txt ยท Last modified: 2023-11-15 17:10:12 +0100 Nov Wed by ecm