Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#line directive interferes with disassembly. #1337

Closed
WestfW opened this issue Mar 30, 2013 · 4 comments
Closed

#line directive interferes with disassembly. #1337

WestfW opened this issue Mar 30, 2013 · 4 comments
Labels
Component: Preprocessor The Arduino sketch preprocessor converts .ino files into C++ code before compilation
Milestone

Comments

@WestfW
Copy link
Contributor

WestfW commented Mar 30, 2013

Sometime recently (77ed2f4 ) "#line" directives were added to the pre-processed code to make error messages better reflect the actual source code, instead of the pre-processed source code.
However, since the "#line" directives refer to the original file ("#line 1 Blink.ino"), which is not actually present in the build directory, dissassembly using "avr-objdump -S" cannot find the source to do a proper mixed source/assembly listing.
There are a couple of possible solutions:

  1. copy the .ino files into the build directory.
  2. use full paths to the original files in the "#line" directives.
  3. insist that the user use -I in the avr-objdump (change or add documentation.)
WestfW referenced this issue Mar 30, 2013
This patch places #line preprocessor directives into the generated code
file so that the compiler reports the correct location for error
messages.

http://code.google.com/p/arduino/issues/detail?id=907
@ffissore ffissore added the New label Feb 27, 2014
@ffissore ffissore added the Component: Preprocessor The Arduino sketch preprocessor converts .ino files into C++ code before compilation label Apr 8, 2015
@ffissore
Copy link
Contributor

@WestfW as #3303 and #3435 are merged, now object files from core and libraries are split into separate subfolders of the build folder. Plus, sketch source code is in its own folder, together with some of its source files (everything but .ino). Can you update your issue with the latest hourly build? I would like to have this fixed for 1.6.6

@ffissore ffissore added this to the Release 1.6.6 milestone Jun 30, 2015
@ffissore ffissore self-assigned this Jun 30, 2015
@ffissore
Copy link
Contributor

@WestfW with latest hourly we added the full path to the original source file in #line directives. Can you give it a spin a see if this issue is solved?

@ffissore ffissore added the Waiting for feedback More information must be provided before we can proceed label Sep 25, 2015
@ffissore
Copy link
Contributor

Also see #3746

@WestfW
Copy link
Contributor Author

WestfW commented Nov 10, 2015

I can confirm that 1.6.6 seems to be working correctly.

@cmaglie cmaglie removed the Waiting for feedback More information must be provided before we can proceed label Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Preprocessor The Arduino sketch preprocessor converts .ino files into C++ code before compilation
Projects
None yet
Development

No branches or pull requests

4 participants