Bug found in .rst file:
signed variables (signed char or signed int f.e.) do not show up in .rst file at all
not in allocation for the registers and not later in info of C source code line.
rst line number 487: missing register info, here: r1 r2
missing source code line numbers:13 and 14 from test2.c in rst file
correct assignment on rst line number 515 for signed variable, but wrong source code line number mentioned or info missing at all
sdcc --debug test2.c
Line 13 isn’t signed and there is no reason for
unsigned char d;to show up..lstand.rstare just listings for the assembly. If something does not translate into assembly or if gets optimized away, it will not show up..cdbis the more interesting file for tracking variables, but with optimizations enabled even this one will lack what got optimized away.But it still optimizes, rewrites and rearranges the assembly, which can break line assignments, the more optimizations you turn off, the better your results should be:
sdcc --debug --no-peep --nooverlay --nogcse --noinvariant --nolabelopt --noloopreverse --noinduction test2.