Using the M68K RTEMS 4.9 tool set from the RTEMS repo installed with yum the following occurs for the m68k target: $ m68k-rtems4.9-gcc -g -c -o hello.o hello.c $ m68k-rtems4.9-objdump -g hello.o hello.o: file format elf32-m68k m68k-rtems4.9-objdump: hello.o: no recognized debugging information The object file can be linked into an RTEMS application that can be debugged with gdb and objdump can disassemble the object with source. The objdump -W displays the DWARF info. The RTEMS tools can be located here: http://www.rtems.org/wiki/index.php/APT/Yum_Repository
Created attachment 2724 [details] Test case with command line instructions.
Created attachment 2747 [details] Allow -g to fall back on -W.
Hi Chris, I assume that your objection is that you feel that the -g command line option should fall back on displaying DWARF debug information if no STABS debug information is found ? If so then please could you try out the uploaded patch and let me know what you think ? Cheers Nick
I have now checked this patch in, along with this changelog entry. binutils/ChangeLog PR binutils/6483 * objdump.c (dump_bfd): If the -g option found no STABS or IEEE debug information to display, try dumping DWARF information instead. * rddbg.c (read_debugging_info): Add a parameter to suppress the display of a warning message when no debug information is found. * budbg.h (read_debugging_info): Update prototype. * objcopy.c (copy_object): Continue to allow read_debugging_info to produce warning messages. * doc/binutils.texi (--debugging): Document new behaviour of the -g/--debugging option.
Hi Nick, Please excuse the delay in getting back to this bug. We looked into this bug more and found the i386 tools worked fine while the m68k do not. Further it seems -g works and -e does not. If I build RTEMS with --target=i386-rtems4.9 using the RTEMS tools obtained by yum on a Fedora Core 8 64bit box, install RTEMS I can extract the debug symbols with : $ i386-rtems4.9-objdump -e librtemsbsp.a In archive librtemsbsp.a: !_TAG_FILE_FORMAT 2 /extended format/ !_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted/ !_TAG_PROGRAM_AUTHOR Ian Lance Taylor, Salvador E. Tropea and others // !_TAG_PROGRAM_NAME objdump /From GNU binutils/ New compilation unit: /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c int /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:int32 char /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:int8 long int /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:int32 unsigned int /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:uint32 long unsigned int /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:uint32 long long int /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:int64 long long unsigned int /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:uint64 short int /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:int16 short unsigned int /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:uint16 signed char /opt/work/sw/rtems/src/head/c/src/lib/libbsp/i386/pc386/../../shared/bootcard.c 0;" kind:t type:int8 Same command run with m68k tools on a --target=m68k-rtems4.9 build of RTEMS I get: $ m68k-rtems4.9-objdump -e librtemsbsp.a In archive librtemsbsp.a: m68k-rtems4.9-objdump: bootcard.o: no recognized debugging information m68k-rtems4.9-objdump: bspclean.o: no recognized debugging information m68k-rtems4.9-objdump: bsplibc.o: no recognized debugging information m68k-rtems4.9-objdump: bsppost.o: no recognized debugging information m68k-rtems4.9-objdump: bsppredriverhook.o: no recognized debugging information m68k-rtems4.9-objdump: bspstart.o: no recognized debugging information [snipped] Regards Chris
Please try the latest sources from CVS.
No feedback after 7 years.