ASM-TLINK无符号表问题:COM程序调试时符号表缺失求助
Hey Juanjo, let's break down why you're missing the symbol table when debugging your .COM executable—there are a few key oversights in your workflow that are likely causing this:
You're missing the debug flag in your TLINK command
The/tflag tells TLINK to output a .COM file instead of a .EXE, but it doesn’t handle preserving debug symbols on its own. To include symbolic debug info, you need to add the/vflag to your link command. Your corrected TLINK line should be:tlink /t /v program.obj
The/vflag enables full symbolic debug support, which links the symbols from your assembled object file into the debug setup.Verify TASM actually generated debug symbols
Yourtasm /zi program.asmcommand is correct (the/ziflag generates full symbolic info in the .obj file), but you need to make sure TASM didn’t encounter errors during assembly. If there were warnings or errors, it might have skipped creating the.tds(Turbo Debugger Symbol) file, which is critical for loading symbols later. Check the assembly output for any issues that might have blocked this file from being created.Ensure the .tds file is in the same directory as your .COM
When you load your .COM file into Turbo Debugger (TD), it looks for the matching.tdsfile in the same folder. If this file is missing or moved, TD won’t be able to pull in the symbol table. Double-check that bothprogram.comandprogram.tdsare present in the directory where you launch the debugger.Double-check for command line typos
It’s easy to miss a flag or mistype a command. Confirm your full workflow is:- Assemble:
tasm /zi program.asm - Link:
tlink /t /v program.obj
Even a small typo (like forgetting/v) will result in no debug symbols being available.
- Assemble:
One quick note: If you're using a debugger other than Turbo Debugger, it might not support TASM's .tds symbol format—Turbo Debugger is the tool specifically designed to work with the debug info generated by TASM and TLINK.
内容的提问来源于stack exchange,提问作者Juanjo Daza

