Menu

#59 OnBC: Please add a goto button if the line is known

OnBoard_C
open
nobody
None
5
2008-04-07
2008-04-02
John Wilund
No

While compiling it is feels very stupid to having to leave OBC via the Launcher to goto the line with the error in SrcEdit. If OBC knows the line number, please add a Goto-button.

Discussion

  • John Wilund

    John Wilund - 2008-04-02

    Just a screen shot

     
  • Ryan Rix

    Ryan Rix - 2008-04-06

    Logged In: YES
    user_id=1727174
    Originator: NO

    John - I'm fairly sure CVS version at least (maybe release too) has this feature :)

    see sourceError on line 206, OnBoardC_Main.c; It looks to me like it does this.

     
  • John Wilund

    John Wilund - 2008-04-06

    Logged In: YES
    user_id=574706
    Originator: YES

    Not all cases! Please see the attached ScreenShot! from 2008-04-02.

     
  • Ryan Rix

    Ryan Rix - 2008-04-06

    Logged In: YES
    user_id=1727174
    Originator: NO

    I stand corrected. I looked at the code and don't know what to do with it -- It's out of my league I'm afraid!

     
  • Steve Little

    Steve Little - 2008-04-07

    Logged In: YES
    user_id=583634
    Originator: NO

    The problem is actually that the error is being thrown up from the code generation stage, at which point we no longer know exactly where in the code we are. Normally the "Goto" button uses the exact character offset into the file to launch the editor at (close to) the exact character on the line. By the time we get to code generation, we no longer have character offset information.

    (Not even sure if we have a real line number, it might just be giving you the number of the last line in the file)

    The options for fixing this are:
    1) Find out if the line number is genuine. If it is, add a Launch option to SrcEdit to take only a line number, and launch from that.
    2) Carry the line number and/or character offset infomation forward into the code generation stage, and use it to add a "Goto" (has the advantage of one day being useful for outputting symbolic debug info into object files, which would allow support of a C-level debugger for OnBC generated prc's)
    3) Catch the type mismatch problem earlier in the compilation process, at compile time rather than code generation, and throw the error there
    4) Change the error to something more like "internal compiler error", since really the problem should have been caught earlier.

    Do you still have the code that was causing this problem? That might help us track down how to catch it earlier in the compile process...

     
  • John Wilund

    John Wilund - 2008-04-07
     
  • John Wilund

    John Wilund - 2008-04-07

    Logged In: YES
    user_id=574706
    Originator: YES

    Attached a .c source for you.
    Just add it to any proj and hit Build...

    I am pretty sure the line number are correct.

    I'd say i dislike 4. But I am in favour of 3.

    /John
    File Added: NoGotoErrorButtonBug_c.PDB

     
  • John Wilund

    John Wilund - 2008-04-07
    • summary: OBC: Please add a goto button if the line is known --> OnBC: Please add a goto button if the line is known
     

Log in to post a comment.