Description
Arduino IDE compiler generates wrong path information for .ino file in .elf and GDB shows incorrect path. Actually there's no path at all in the .elf file for .ino. This results the path to be resolved relative to 'arduino.exe' process. The path to .ino should probably be hardcoded in the generated (.ino to .cpp) .cpp file.
I am using Arduino IDE 1.6.5 but I tried this with Arduino Nightly build and it has the same problem
Looking at generated .elf file with GBD shows that path is: C:\Program Files (x86)\Arduino/Blink.ino
This results in error when debugging the file in Eclipse
C:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2014q3\bin>arm-none-eabi-gdb d:\Users\me\AppData\Local\Temp\build321087032653580089.tmp\Blink.cpp.elf
GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20140731-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from d:\Users\me\AppData\Local\Temp\build321087032653580089.tmp\Blink.cpp.elf...done.
(gdb) info source
No current source file.
(gdb) info sources
Source files for which symbols have been read in:
Source files for which symbols will be read in on demand:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\hooks.c, C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\main.cpp,
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_digital.c,
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring.c, C:\Program Files (x86)\Arduino/Blink.ino,
D:\Users\me\AppData\Local\Temp\build321087032653580089.tmp\Blink.cpp
(gdb)