User Tools

Site Tools


blog:pushbx:2026:1122_late_mid_november_work_on_symbol_file_program

Late mid November work on symbol file program

2026-11-22

This week I mainly worked on the symscr ("symbolic support scripts") repo, adding what is for now called processt.py (process trace listing file to generate a symbol file).

ident86

tractest/convlist.pl

(The special dump contents have to be supported to properly resolve the offsets: they're otherwise not modified.)

scanptab

lDebug (experimental)

Symbolic support scripts

The remaining changes are all about processt.py, the program to process trace listing files into symbolic lDebug symbol files.

Conclusions

Yet to be done: The insbound.py base contains some code that isn't needed, such as keeping track of the size/type of instructions and the found labels. These could be deleted with a little effort.

In its current incarnation, the program finds more than 5300 labels for the -f obj build of lDDebug, all of which match labels found by process.pl for the -f bin build, except for a few labels that differ naturally. These include ..start and the various "behind" labels, as well as relocatedzero. The .start labels for the sections WLEMITALIGNINITEND and WLEMITALIGNRELOCZERO are unique too.

The letter caps of some section names differs as well. And the DATASTACKBASE section of -f obj corresponds to DATASTACK of -f bin.

The -f bin build finds more than 7600 labels, and in particular it includes equates (eg equ $ or equ anotherlabel) and the labels generated for @@ anonymous local labels (up to 1513 of which exist).

Scriptlets used to check the resulting symbol files

To rebuild lDDebug occasionally, both using the -f bin and -f obj builds:

use_build_make=0 ./makerd; ./makerd

To generate the -f obj symbol file and -d 3 -c outputs of processt.py (this takes a while, about 15s), and compare to a prior revision's output:

~/proj/symscr/processt.py ../lst/ddebugl.tls ddebugl12c.sym -o 256 -d 3 -c \
  | perl -pe 's/ddebugl..?c\.sym/ddebugl5c.sym/' > 12c.tmp \
  && (diff -u ddebugl11c.sym ddebugl12c.sym; diff -u 11c.tmp 12c.tmp)

To update the -f bin symbol file, and search for lines in the -f obj file not matching any in the -f bin symbol file. For the search, both files are forced to allcaps and DATASTACKBASE from the -f obj file is replaced by DATASTACK.

~/proj/symscr/process.pl ../lst/ddebug.map > ddebug.sym \
  && cat ddebug.sym | tr 'a-z' 'A-Z' > caps.tmp \
  && cat ddebugl12c.sym | tr 'a-z' 'A-Z' | perl -pe 's/(DATASTACK)BASE/$1/' > caps5.tmp \
  && grep -F -x -v -f caps.tmp caps5.tmp | less

Lines found in -f obj symbol file but not in -f bin symbol file

Output of the last scriptlet on the latest revisions:

;       2    DEBUG.LST
;   11449       AA.LST
;   65812     AMIS.LST
;   68325       BB.LST
;   72733       CC.LST
;   74889       DD.LST
;   80945       EE.LST
;   83294     EXPR.LST
;   91972       FF.LST
;   94032  FPTOSTR.LST
;   96432 HELPDEPK.LST
;   99128       HH.LST
;  101424     IIOO.LST
;  103742   IMMASM.LST
;  107186  INSTALL.LST
;  109433     INTS.LST
;  112097   LINEIO.LST
;  120464       LL.LST
;  123080       MM.LST
;  126483      MSG.LST
;  133905   PMDATA.LST
;  135960  PMENTRY.LST
;  138299   PMINIT.LST
;  140905       RR.LST
;  145973      RUN.LST
;  155746  SERIALP.LST
;  158548       SS.LST
;  161854  SYMBOLS.LST
;  167041       UU.LST
;  173794       VV.LST
;  176130       WW.LST
;  178350     BOOT.LST
;  187611     INIT.LST
Z ADD L=(01F5C0 + V1) O=3650 S='SECTION.WLEMITALIGNINITEND.START' F=0120
Z ADD L=(01F5F0 + V1) O=0000 S='SECTION.WLEMITALIGNRELOCZERO.START' F=0120
; TOTAL 11 SECTIONS
Z ADD L=(000000 + SL.SECTION.LDEBUG_DATA_ENTRY.START) O=0100 S='..START'
; 1222 SYMBOLS
; 22 SYMBOLS
; 1 SYMBOL
Z ADD L=(000000 + SL.SECTION.DATASTACK.START) O=81F0 S='BEHIND_PROGBITS_DATAENTRY'
; 66 SYMBOLS
; 48 SYMBOLS
Z ADD L=(000000 + SL.SECTION.LDEBUG_CODE.START) O=0000 S='BEHIND_MESSAGESEGMENT'
; 3400 SYMBOLS
Z ADD L=(000000 + SL.SECTION.LDEBUG_CODE2.START) O=0000 S='BEHIND_CODE'
; 1 SYMBOL
Z ADD L=(000000 + SL.SECTION.INIT.START) O=0000 S='BEHIND_CODE2'
; 529 SYMBOLS
; SECTION "WLEMITALIGNINITEND"
Z ADD L=(000000 + SL.SECTION.WLEMITALIGNINITEND.START) O=3650 S='BEHIND_INIT'
; 1 SYMBOL
; 10 SYMBOLS
; SECTION "WLEMITALIGNRELOCZERO"
Z ADD L=(000000 + SL.SECTION.WLEMITALIGNRELOCZERO.START) O=0000 S='BEHIND_DEVICESHIM'
Z ADD L=(000000 + SL.SECTION.WLEMITALIGNRELOCZERO.START) O=0000 S='RELOCATEDZERO'
; TOTAL 5302 SYMBOLS

(The -f bin symbol file ends with "; total 7650 symbols".)

You could leave a comment if you were logged in.
blog/pushbx/2026/1122_late_mid_november_work_on_symbol_file_program.txt · Last modified: by ecm