Menu

#1480 Wrong OFFSET generated in AOMF51 file for automatic vars

closed-duplicate
linker (61)
5
2013-05-25
2008-09-13
Ondrej Petr
No

I use
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.8.0 #5117 (Mar 23 2008) (MINGW32)
with
Silicon Laboratories IDE version 3.41
that takes debugging info from OMF file.
There are 3 problems:
1. Automatic variables and parameters are indicated with WRONG OFFSET value (0x00FF for all of such vars) in AOMF file. The consequence are heavy problems in debugging - watches of such vars show values from wrong address and I must guess correct address from disassebled code as such vars are NOT referenced even in .map file(!).
2. When compiled as reentrant, auto and parameter vars still appear in the list and have the same OFFSET of 0x00FF. I expect, that in that case these variables are places on stack and have no absolute address. Similarly, I expect that it is not possible to extract information to calculate current address of on-stack var. If this is true, it is better not to put records of such vars to AOMF file rather then present it with wrong address.
3. Symbols are presented in upper case in AOMF file, what is not comfortable and can cause potential problem with C case sensitivity.

I had a look in OMF file to problematic records and realize that Silicon Labs IDE shows exactly what it see in OMF.

I have no access to exact parameters used to call linker, I know only that
c:\Program files\SDCC\BIN\SDCC.EXE is called and
"--debug --use-stdout -V" is probably included in command line parameters.

Best regards,
Ondrej
ondrej.petr@rigaku.com
ondrej.petr@reflex-co.cz

P.S. SDCC 2.6.0 behaves same.

Discussion

  • Ondrej Petr

    Ondrej Petr - 2008-09-13

    All project, source and output files to demonstrate auto vars AOMF offset problem

     
  • Maarten Brock

    Maarten Brock - 2008-09-13

    Identical to BUG 1630751

    re. 3) The OMF specification states that all symbols must be uppercase :(

     
  • Maarten Brock

    Maarten Brock - 2011-04-25

    1) and 2) are fixed in SDCC 3.0.2 #6317.

     
  • Maarten Brock

    Maarten Brock - 2011-04-25
    • milestone: --> fixed
    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-duplicate
     

Log in to post a comment.