Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/27/07 15:08
Read: times


 
#133821 - what???
Responding to: ???'s previous message
Andy Neil said:
Jan Waclawek said:
you should probably pester Metalink for a proper solution.

If I were Metalink, I would say that the "proper" way to do it is to have proper, separate translation units and use the Linker to join them together.

That way, the tools will generate proper debug information that will include the file names (like Erik said).


If I were Metalink, I would like to avoid the shame which is involved in explaining that I don't know to display an information which is TRIVIAL to display. If I were Metalink, I'd say honestly "sorry, we did not think on this case" and issue an upgrade. If I were Metalink, I would come HERE with this announcement. If I were Metalink, I would try to turn this into a feature other emulators might not to have.

No matter what the "proper way" (=textbook convention) is.

Andy Neil said:
The reason is, as already described, because #include, $INCLUDE, or whatever are literally just text pasting operators - so the compiler/assembler really can't tell what file the included lines actually came from!


This is absolutely irrelevant for the emulator software.

What you said above might be true in case the assembler/compiler does not know the file from which the include comes - if the assembler/compiler is given a file already chewed by the preprocessor (the same way as if it would be an external program such as copy). Even this is not always the case, but let's for simplicity assume just this. But this still tells nothing on the emulator/simulator software behaviour.

The emulator/simulator has two choices: it either works with the debug file output by the assembler, or it works directly with the sources.

In the first case, the debug file inevitably does contain the included source - simply because it was already there when compiled/assembled and the compiler/assembler could not tell that it is NOT a part of the compiled/assembled file (after being chewed by the preprocessor). So, the emulator/simulator software has no choice but to display it. Only the information on "this part has been included from that file" might get lost; but the source itself IS there.

In the second case, the original source file DOES STILL CONTAIN the include statement. There is NOTHING which would prevent the simulator program from parsing it and discovering the file which has been included and displaying it properly.

If the emulator software does not work like this, it simply means, that it's authors assumed that the "textbook proper way" is the only way, which is bad, bad, bad.

Jan Waclawek


List of 53 messages in thread
TopicAuthorDate
lame linker related question            01/01/70 00:00      
   How else will they know?            01/01/70 00:00      
      why the **** not???            01/01/70 00:00      
         I so disagree            01/01/70 00:00      
            Small addition            01/01/70 00:00      
            how do you know?            01/01/70 00:00      
         Not the only reason!            01/01/70 00:00      
            Can I throw in another problem here...            01/01/70 00:00      
               it is IS a plain include...            01/01/70 00:00      
                  Thanks Jan...            01/01/70 00:00      
                  Proper Solution            01/01/70 00:00      
                     the problem is ...            01/01/70 00:00      
                     what???            01/01/70 00:00      
                        corrections            01/01/70 00:00      
                           path???? Which path?????            01/01/70 00:00      
                              do you REALLY think that a compiler/linker maker w            01/01/70 00:00      
                                 1 experiment > 3e8h words            01/01/70 00:00      
                                    experiment #2: SDCC            01/01/70 00:00      
                                    very hard            01/01/70 00:00      
                                       but it does not matter!            01/01/70 00:00      
                                          you suffer from a gross misconception            01/01/70 00:00      
               a common issue            01/01/70 00:00      
      i'm looking for something much simpler....            01/01/70 00:00      
         Well, that's fairly simple ... ?            01/01/70 00:00      
         Sure.            01/01/70 00:00      
         Contradiction!            01/01/70 00:00      
            not really.....            01/01/70 00:00      
               give an example            01/01/70 00:00      
                  example            01/01/70 00:00      
                     include ?            01/01/70 00:00      
                        Jon, I didn't know...            01/01/70 00:00      
                           I did not build a truck            01/01/70 00:00      
                     no            01/01/70 00:00      
                        Jan, please read my question            01/01/70 00:00      
                           chop it with axe            01/01/70 00:00      
                              chop & glue            01/01/70 00:00      
                                 ok ok ok            01/01/70 00:00      
                     You need to understand            01/01/70 00:00      
   Not quite the right question.            01/01/70 00:00      
   On modular programming            01/01/70 00:00      
      an example, please            01/01/70 00:00      
         \"Lead us not into temptation\"            01/01/70 00:00      
            the temptation is there anyway            01/01/70 00:00      
               Use all the help the tools can give you!            01/01/70 00:00      
                  if there ARE reasons NOT to use the \"tools\"...            01/01/70 00:00      
                     Famous last words.            01/01/70 00:00      
               A real life analogy:            01/01/70 00:00      
                  thin ice            01/01/70 00:00      
               Remove the Temptation            01/01/70 00:00      
                  Do you want less temptation?            01/01/70 00:00      
                     Thank you            01/01/70 00:00      
                     Cohesion & Coupling            01/01/70 00:00      
         Christoph put it nicely            01/01/70 00:00      

Back to Subject List