DWARF-4 .out from -gdwarf-3 build

Asked by Steve Stearns

Greetings,

I'm building on ubuntu 14.04 for Cortex-m4. My debugger is only compatible with DWARF-3 and so I've been building with: -gdwarf-3 -mthumb -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16, and linking with -Wl,--start-group -lgcc -lc -lm -Wl,--end-group. I have supplied a newlib_stubs.c. All was *was* working well until I added calls to previously un-called routines. This led to my debugger (EWARM) failing to start due to "ELF/DWARF Error: Unsupported .debug_info format version:4" Is there debug information hiding in some toolchain supplied lib routines? If not, any other clues as to where the DWARF-4 info is coming from?

My gcc is: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150303 (release) [ARM/embedded-4_9-branch revision 221220]

Thanks for any insight available,
Steve.

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Steve Stearns
Solved:
Last query:
Last reply:
Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#1

Hi Steve,

I checked in all .a and .o file of our 4.9 2015Q1 release and could not find any .debug_info section. I suggest you compile with -v which will list all the files linked. Then you can call arm-none-eabi-readelf -S on all of them and search for .debug_info. I hope this helps.

Best regards,

Thomas

Revision history for this message
Steve Stearns (sstearns) said :
#2

Thomas,

Thanks for confirming the offending DWARF-4 info is not in the libs and for providing additions info to help me chase down my issue.

The information I am missing is how to recognize and distinguish DWARF-3 content from DWARF-4 content. I expect all of my builds to include .debug_info sections as I need to debug using the DWARF-3 info. Although this request is out-of-scope for your responsibilities, maybe I'll get lucky... :-)

Does anyone know how to look at an appropriate dump to determine if DWARF content is -4 vs -3?

Hopefully yours,

Steve.

Revision history for this message
Steve Stearns (sstearns) said :
#3

Thomas,

Found the offending DWARF-4, addressed it and I'm back up and running.

Thanks for your help.

Steve.