This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] cleanup openbsd i386 elf, switches to dwarf2


Thx to Eric Botcazou, Andrew Pinski and Mark Kettenis for this one.

Turns out OpenBSD was mistakenly including an embedded system fragment,
and thus outputting stabs debug by default.

Once the only needed definition is saved from that file, we happily compile
with default dwarf2.   The rest of the toolchain is happy, and any recent
gdb works very well with that...

This obviously improves the stability of the compiler, since dwarf2 output
is so much more well-tested than stabs on elf platforms...

(note we still don't use dwarf2 C++ frame unwinders, it's next on my list
of things to check).

As usual, I need an okay for this patch...

2005-01-31  Marc Espie <espie@openbsd.org>

	* config.gcc: Don't include embedded systems fragment, switches default
	debugging format to ELF.
	* config/i386/openbsdelf.h: Add DBX_REGISTER_NUMBER since we no 
	longer pick it up there.

*** gcc/config.gcc.orig	Fri Jan 21 11:15:55 2005
--- gcc/config.gcc	Sun Jan 30 13:36:02 2005
*************** i[34567]86-*-openbsd2.*|i[34567]86-*open
*** 942,952 ****
  	use_collect2=yes
  	;;
  i[34567]86-*-openbsd*)
! 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
  	tm_file="${tm_file} openbsd.h i386/openbsdelf.h"
  	gas=yes
  	gnu_ld=yes
- 	stabs=yes
  	;;
  i[34567]86-*-coff*)
  	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
--- 942,951 ----
  	use_collect2=yes
  	;;
  i[34567]86-*-openbsd*)
! 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
  	tm_file="${tm_file} openbsd.h i386/openbsdelf.h"
  	gas=yes
  	gnu_ld=yes
  	;;
  i[34567]86-*-coff*)
  	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
*** gcc/config/i386/openbsdelf.h.orig	Tue Jan 18 12:05:39 2005
--- gcc/config/i386/openbsdelf.h	Sun Jan 30 13:36:02 2005
*************** Boston, MA 02111-1307, USA.  */
*** 27,32 ****
--- 27,34 ----
  #undef ASM_COMMENT_START
  #define ASM_COMMENT_START "#"
  
+ #undef DBX_REGISTER_NUMBER
+ #define DBX_REGISTER_NUMBER(n)  svr4_dbx_register_map[n]
  
  /* This goes away when the math-emulator is fixed */
  #undef TARGET_DEFAULT


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]