-
-
Notifications
You must be signed in to change notification settings - Fork 283
Retain unstripped ELF file for debugging #165
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
Conversation
@bbaltz505 @calvinatintel Is there any reason you can think of that the elf file should not be created every time a Sketch is compiled? I vote to merge the change into the main trunk. |
These files normally get deleted after flashing. In the Linux IDE, there is an option in preferences to keep the binaries. I don't think it hurts to always keep a debug binary around. |
@bbaltz505 Will that option in "Preferences" affects the elf file too? If so, the user has a choice. Let's merge it. |
Windows seems to always keep the temporary build folder (e.g., C:\Users\babaltz\AppData\Local\Temp\build5a12ec7801f914e3a9c773f3624a5617.tmp/BarometricPressureSensor.ino.elf) |
I think it is a new folder created and the old one deleted. Not the same folder. At least the number part of the folder is changed. Am I correct? |
I believe the folder location is created when the IDE starts up. If you close and reopen your browser, it will use a new temp folder. |
adding @bigdinotech for review |
looks good to me. @calvinatintel please merge |
I wonder if I should save the debug ELF somewhere more accessible - like the sketch folder? Otherwise the user has to have verbose compilation turned on and then copy the lengthy ELF path to use with the debugger. |
That's a good idea to place the elf file in the same folder where the user saved it. |
Yeah! Save it to the Sketch directory. Like it. If the user does save the Sketch... Well, the elf doesn't mean much to the user anyway. |
Sorry Sidney. Actually now I don't like the idea of ELF files being left around in the sketch folder. That could be confusing to beginning users. Only advanced users are going to be debugging so they'll know how to find the ELF (via compile messages in the console window). |
How about a sub-directory under the user sketch folder, say, gdb_info? |
According to Martino, the IDE does not have a pointer to the sketch folder. For now, I think its best to save the file in the build folder. |
@facchinm here is the config to save a debug ELF |
@SidLeung ready for review. This change saves the debug elf file as {build.path}/../arduino101_sketch.debug.elf |
@bbaltz505 @calvinatintel Looks good. BTW, what the location for Ubuntu? Please merge. |
I believe temporary build folders are in /tmp so the debug ELF file would be: |
Signed-off-by: Brian Baltz <[email protected]>
rebased onto latest master |
In order to debug with JTAG, an unstripped ELF file is needed. This change creates two ELF files: stripped and unstripped