Menu

debugging info.

Help
Santiago
2015-10-17
2015-10-18
  • Santiago

    Santiago - 2015-10-17

    Hello.

    I'm compiling gcb files with /F:L option to get source line numbers in the asm file.
    I get somethinglike this:

    ;Source:F2L28S0I2

    Looks like it means:
    F2 - file 2
    L28 - line 28

    Is there any way to know wich file is "file 2" ??
    And.. what does mean the remain part: ...S0I2 ??

    Thank you in advance.

     
  • Anobium

    Anobium - 2015-10-17

    Hello,

    So, I can help. Please provide.

    Can you post the whole command line please?

    What version ?

    Where did you see those switches? Which document?

    Thanks

     
  • Santiago

    Santiago - 2015-10-17

    Hi Anobium.

    Version:
    Great Cow BASIC (0.94 2015-08-05)

    Command:
    gcbasic -NP -A:GCASM -K:L -O:file.asm file.gcb

    I don't remember where i found that option, it was a few years ago when i was working in a GcBasic debugger. Now i'm working on it again and i would like to debugg through the included files.

     
  • Hugh Considine

    Hugh Considine - 2015-10-18

    I'd completely forgotten about that option!

    /K: (or -K:) will cause some things from the original source to be kept in the generated assembly. /K:C will keep comments, /K:A will keep all source code, and /K:L will keep line numbers.

    In the case of /K:L, line numbers are inserted above the code generated for that line. In the example, you posted, "F2L28S0I2" means:
    - File 2 (File 1 is the main file, next are include files in the order found, then those included from lowlevel.dat).
    - Line 28 in that file
    - Subroutine 0 - which is the main subroutine. I just had a look at the compiler source and this hasn't been set correctly since 2009. I will correct this. Subroutine 0 is the main subroutine, then other subroutines are numbered in the order that they are found by the compiler.
    - Line 2 of the subroutine.

     
  • Santiago

    Santiago - 2015-10-18

    Hi Hugh.
    Thank you very much for the information. It will be very useful.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.