Understanding sccz80 list files

Other misc things
Post Reply
vmorilla
Member
Posts: 13
Joined: Sun Feb 11, 2024 7:15 pm

Understanding sccz80 list files

Post by vmorilla »

Hello,

A release candidate of DeZog has just been published with support to debug z88dk C files (see https://github.com/maziac/DeZog/release ... v3.6.0-rc1). However, currently it only supports sdcc.
The reason is that, while we have been able to easily parse sdcc list files to extract the source c file and line that correspond to assembler instructions (with the --c-code-in-asm flag), we are having a hard time trying to extract this information from sccz80 list files (see discussion here https://github.com/maziac/DeZog/pull/140).

Is there any information on how these files can be interpreted so that they can be parsed to extract the correspondence between ASM instructions and the source file?

Any help would be appreciated. Thanks!
User avatar
dom
Well known member
Posts: 2277
Joined: Sun Jul 15, 2007 10:01 pm

Re: Understanding sccz80 list files

Post by dom »

All the information you need (and more) is actually in the cdb files.

However since you’re working from .lis files that’s not much use!

I’m currently semi-afk for the next week (aka I won’t have much time until later this month). But if you can specify the format you want I’ll update sccz80 to match it.
User avatar
dom
Well known member
Posts: 2277
Joined: Sun Jul 15, 2007 10:01 pm

Re: Understanding sccz80 list files

Post by dom »

Some things to note:

- each sub expression on a line is dumped separately - you’ve spotted that already.
- the optimiser may throw away some of the annotations - likewise you’ve seen that.
- C_LINE can be extracted from the map file to provide an address to source code line mapping.

Code: Select all

             	C_LINE	8,"factorial.c::factorial::2::2"
 
* line in file
* file name
* function name
* current scope block depth within function (increments/decrements)
* current scope block within file (increments only)
Post Reply