This is the mail archive of the mailing list for the GDB 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: merge src and gcc copies of dwarf2.h

It has bothered me a bit that the gcc and src repositories have
separate copies of dwarf2.h.  This patch merges them.

A few oddities arose while I was looking at this:

* Files in include/ are still GPLv2.
  I made the new dwarf2.h GPLv3, but GCC's copy has the exception text
  as well.

* gcc's dwarf2.h defines INTERNAL_DW_OP_tls_addr.
  I left this in there, but IMO it is somewhat of a hack.
  Perhaps it should be local to gcc, like:

    #define INTERNAL_DW_OP_tls_addr (enum dwarf_location_atom) 0x103

  Or maybe be made an explicit flag somewhere instead of abusing an

* There are a number of DW_*_GNU constants in dwarf2.h.  I would like
  to ask that all future GNU extensions to Dwarf be required to come
  with some dwarf-standard-ese that can be added to dwarf2.h.  AFAICT
  the existing extensions are undocumented and at least one
  (DW_OP_GNU_uninit) seems to have weird, un-dwarfy semantics.

I've also built binutils+gdb with the new dwarf2.h.  I've attached
this patch as well.  I haven't run these regression tests yet.

I did not copy over include/elf/dwarf.h from the src repository,
because that is not used anywhere by gcc.

Bootstrapped and regtested on x86-64 (compile farm).
Ok?  And for src, assuming that there are no regressions?


2009-06-19  Tom Tromey  <>

	* dwarf2.h: Remove.
	* (DWARF2_H): New variable.
	(except.o): Use it.
	(dwarf2out.o): Likewise.
	(dwarf2asm.o): Likewise.
	* config/i386/t-i386: Use DWARF2_H.
	* except.c: Include elf/dwarf2.h.
	* unwind-dw2.c: Include elf/dwarf2.h.
	* dwarf2out.c: Include elf/dwarf2.h.
	* unwind-dw2-fde-glibc.c: Include elf/dwarf2.h.
	* unwind-dw2-fde.c: Include elf/dwarf2.h.
	* dwarf2asm.c: Include elf/dwarf2.h.
	* unwind-dw2-fde-darwin.c: Include elf/dwarf2.h.
	* config/mmix/mmix.c: Include elf/dwarf2.h.
	* config/rs6000/darwin-fallback.c: Include elf/dwarf2.h.
	* config/xtensa/unwind-dw2-xtensa.c: Include elf/dwarf2.h.
	* config/sh/sh.c: Include elf/dwarf2.h.
	* config/i386/i386.c: Include elf/dwarf2.h.

2009-06-19  Tom Tromey  <>

	* raise-gcc.c: Include elf/dwarf2.h.

2009-06-19  Tom Tromey  <>

	* elf/dwarf2.h: New file.  Merged with gdb.

Attachment: P
Description: gcc patch

Attachment: Q
Description: src patch

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