diff mbox

[11/38] Move DWARF code to dwarf2/ subdirectory

Message ID 20200123005710.7978-12-tom@tromey.com
State New
Headers show

Commit Message

Tom Tromey Jan. 23, 2020, 12:56 a.m. UTC
This moves all the remaining DWARF code to the new dwarf2
subdirectory.  This is just a simple renaming, with updates to
includes as needed.

gdb/ChangeLog
2020-01-22  Tom Tromey  <tom@tromey.com>

	* dwarf2/expr.c: Rename from dwarf2expr.c.
	* dwarf2/expr.h: Rename from dwarf2expr.h.
	* dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
	* dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
	* dwarf2/frame.c: Rename from dwarf2-frame.c.
	* dwarf2/frame.h: Rename from dwarf2-frame.h.
	* dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
	* dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
	* dwarf2/index-common.c: Rename from dwarf-index-common.c.
	* dwarf2/index-common.h: Rename from dwarf-index-common.h.
	* dwarf2/index-write.c: Rename from dwarf-index-write.c.
	* dwarf2/index-write.h: Rename from dwarf-index-write.h.
	* dwarf2/loc.c: Rename from dwarf2loc.c.
	* dwarf2/loc.h: Rename from dwarf2loc.h.
	* dwarf2/read.c: Rename from dwarf2read.c.
	* dwarf2/read.h: Rename from dwarf2read.h.
	* dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
	amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
	compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
	compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
	gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
	hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
	i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
	m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
	msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
	riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
	s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
	sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
	tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
	Update.
	* Makefile.in (COMMON_SFILES): Update.
	(HFILES_NO_SRCDIR): Update.

Change-Id: Ied9ce1436cd27ac4a4cffef10ec92e396f181928
---
 gdb/ChangeLog                                 | 35 +++++++++++++++++++
 gdb/Makefile.in                               | 30 ++++++++--------
 gdb/aarch64-tdep.c                            |  2 +-
 gdb/alpha-tdep.c                              |  2 +-
 gdb/amd64-darwin-tdep.c                       |  2 +-
 gdb/arc-tdep.c                                |  2 +-
 gdb/arm-tdep.c                                |  2 +-
 gdb/bfin-tdep.c                               |  2 +-
 gdb/compile/compile-c-symbols.c               |  2 +-
 gdb/compile/compile-cplus-symbols.c           |  2 +-
 gdb/compile/compile-loc2c.c                   |  6 ++--
 gdb/cris-tdep.c                               |  2 +-
 gdb/csky-tdep.c                               |  2 +-
 gdb/dwarf2/abbrev.c                           |  2 +-
 gdb/{dwarf2expr.c => dwarf2/expr.c}           |  4 +--
 gdb/{dwarf2expr.h => dwarf2/expr.h}           |  0
 .../frame-tailcall.c}                         |  6 ++--
 .../frame-tailcall.h}                         |  0
 gdb/{dwarf2-frame.c => dwarf2/frame.c}        | 10 +++---
 gdb/{dwarf2-frame.h => dwarf2/frame.h}        |  0
 .../index-cache.c}                            |  6 ++--
 .../index-cache.h}                            |  2 +-
 .../index-common.c}                           |  2 +-
 .../index-common.h}                           |  0
 .../index-write.c}                            |  6 ++--
 .../index-write.h}                            |  2 +-
 gdb/{dwarf2loc.c => dwarf2/loc.c}             |  8 ++---
 gdb/{dwarf2loc.h => dwarf2/loc.h}             |  2 +-
 gdb/{dwarf2read.c => dwarf2/read.c}           | 10 +++---
 gdb/{dwarf2read.h => dwarf2/read.h}           |  2 +-
 gdb/findvar.c                                 |  2 +-
 gdb/gdbtypes.c                                |  2 +-
 gdb/guile/scm-type.c                          |  2 +-
 gdb/h8300-tdep.c                              |  2 +-
 gdb/hppa-bsd-tdep.c                           |  2 +-
 gdb/hppa-linux-tdep.c                         |  2 +-
 gdb/i386-darwin-tdep.c                        |  2 +-
 gdb/i386-linux-tdep.c                         |  2 +-
 gdb/i386-tdep.c                               |  2 +-
 gdb/iq2000-tdep.c                             |  2 +-
 gdb/m32c-tdep.c                               |  4 +--
 gdb/m68hc11-tdep.c                            |  2 +-
 gdb/m68k-tdep.c                               |  2 +-
 gdb/microblaze-tdep.c                         |  2 +-
 gdb/mips-tdep.c                               |  2 +-
 gdb/mn10300-tdep.c                            |  2 +-
 gdb/msp430-tdep.c                             |  2 +-
 gdb/nds32-tdep.c                              |  2 +-
 gdb/nios2-tdep.c                              |  2 +-
 gdb/or1k-tdep.c                               |  2 +-
 gdb/riscv-tdep.c                              |  2 +-
 gdb/rl78-tdep.c                               |  2 +-
 gdb/rs6000-tdep.c                             |  2 +-
 gdb/rx-tdep.c                                 |  2 +-
 gdb/s12z-tdep.c                               |  2 +-
 gdb/s390-tdep.c                               |  2 +-
 gdb/score-tdep.c                              |  2 +-
 gdb/sh-tdep.c                                 |  2 +-
 gdb/sparc-linux-tdep.c                        |  2 +-
 gdb/sparc-tdep.c                              |  2 +-
 gdb/sparc64-linux-tdep.c                      |  2 +-
 gdb/sparc64-tdep.c                            |  2 +-
 gdb/tic6x-tdep.c                              |  2 +-
 gdb/tilegx-tdep.c                             |  2 +-
 gdb/v850-tdep.c                               |  2 +-
 gdb/xstormy16-tdep.c                          |  2 +-
 gdb/xtensa-tdep.c                             |  4 +--
 67 files changed, 133 insertions(+), 98 deletions(-)
 rename gdb/{dwarf2expr.c => dwarf2/expr.c} (99%)
 rename gdb/{dwarf2expr.h => dwarf2/expr.h} (100%)
 rename gdb/{dwarf2-frame-tailcall.c => dwarf2/frame-tailcall.c} (99%)
 rename gdb/{dwarf2-frame-tailcall.h => dwarf2/frame-tailcall.h} (100%)
 rename gdb/{dwarf2-frame.c => dwarf2/frame.c} (99%)
 rename gdb/{dwarf2-frame.h => dwarf2/frame.h} (100%)
 rename gdb/{dwarf-index-cache.c => dwarf2/index-cache.c} (99%)
 rename gdb/{dwarf-index-cache.h => dwarf2/index-cache.h} (98%)
 rename gdb/{dwarf-index-common.c => dwarf2/index-common.c} (97%)
 rename gdb/{dwarf-index-common.h => dwarf2/index-common.h} (100%)
 rename gdb/{dwarf-index-write.c => dwarf2/index-write.c} (99%)
 rename gdb/{dwarf-index-write.h => dwarf2/index-write.h} (98%)
 rename gdb/{dwarf2loc.c => dwarf2/loc.c} (99%)
 rename gdb/{dwarf2loc.h => dwarf2/loc.h} (99%)
 rename gdb/{dwarf2read.c => dwarf2/read.c} (99%)
 rename gdb/{dwarf2read.h => dwarf2/read.h} (99%)

Comments

Doug Evans via gdb-patches Jan. 27, 2020, 1:27 p.m. UTC | #1
On Thu, Jan 23, 2020, 01:59 Tom Tromey <tom@tromey.com> wrote:

> This moves all the remaining DWARF code to the new dwarf2
> subdirectory.  This is just a simple renaming, with updates to
> includes as needed.
>

Two questions:
- Why dwarf2 instead of something more generic, since this supports dwarf
2-5?
- thoughts on renaming the files to .cc?


> gdb/ChangeLog
> 2020-01-22  Tom Tromey  <tom@tromey.com>
>
>         * dwarf2/expr.c: Rename from dwarf2expr.c.
>         * dwarf2/expr.h: Rename from dwarf2expr.h.
>         * dwarf2/frame-tailcall.c: Rename from dwarf2-frame-tailcall.c.
>         * dwarf2/frame-tailcall.h: Rename from dwarf2-frame-tailcall.h.
>         * dwarf2/frame.c: Rename from dwarf2-frame.c.
>         * dwarf2/frame.h: Rename from dwarf2-frame.h.
>         * dwarf2/index-cache.c: Rename from dwarf-index-cache.c.
>         * dwarf2/index-cache.h: Rename from dwarf-index-cache.h.
>         * dwarf2/index-common.c: Rename from dwarf-index-common.c.
>         * dwarf2/index-common.h: Rename from dwarf-index-common.h.
>         * dwarf2/index-write.c: Rename from dwarf-index-write.c.
>         * dwarf2/index-write.h: Rename from dwarf-index-write.h.
>         * dwarf2/loc.c: Rename from dwarf2loc.c.
>         * dwarf2/loc.h: Rename from dwarf2loc.h.
>         * dwarf2/read.c: Rename from dwarf2read.c.
>         * dwarf2/read.h: Rename from dwarf2read.h.
>         * dwarf2/abbrev.c, aarch64-tdep.c, alpha-tdep.c,
>         amd64-darwin-tdep.c, arc-tdep.c, arm-tdep.c, bfin-tdep.c,
>         compile/compile-c-symbols.c, compile/compile-cplus-symbols.c,
>         compile/compile-loc2c.c, cris-tdep.c, csky-tdep.c, findvar.c,
>         gdbtypes.c, guile/scm-type.c, h8300-tdep.c, hppa-bsd-tdep.c,
>         hppa-linux-tdep.c, i386-darwin-tdep.c, i386-linux-tdep.c,
>         i386-tdep.c, iq2000-tdep.c, m32c-tdep.c, m68hc11-tdep.c,
>         m68k-tdep.c, microblaze-tdep.c, mips-tdep.c, mn10300-tdep.c,
>         msp430-tdep.c, nds32-tdep.c, nios2-tdep.c, or1k-tdep.c,
>         riscv-tdep.c, rl78-tdep.c, rs6000-tdep.c, rx-tdep.c, s12z-tdep.c,
>         s390-tdep.c, score-tdep.c, sh-tdep.c, sparc-linux-tdep.c,
>         sparc-tdep.c, sparc64-linux-tdep.c, sparc64-tdep.c, tic6x-tdep.c,
>         tilegx-tdep.c, v850-tdep.c, xstormy16-tdep.c, xtensa-tdep.c:
>         Update.
>         * Makefile.in (COMMON_SFILES): Update.
>         (HFILES_NO_SRCDIR): Update.
>
> Change-Id: Ied9ce1436cd27ac4a4cffef10ec92e396f181928
> ---
>  gdb/ChangeLog                                 | 35 +++++++++++++++++++
>  gdb/Makefile.in                               | 30 ++++++++--------
>  gdb/aarch64-tdep.c                            |  2 +-
>  gdb/alpha-tdep.c                              |  2 +-
>  gdb/amd64-darwin-tdep.c                       |  2 +-
>  gdb/arc-tdep.c                                |  2 +-
>  gdb/arm-tdep.c                                |  2 +-
>  gdb/bfin-tdep.c                               |  2 +-
>  gdb/compile/compile-c-symbols.c               |  2 +-
>  gdb/compile/compile-cplus-symbols.c           |  2 +-
>  gdb/compile/compile-loc2c.c                   |  6 ++--
>  gdb/cris-tdep.c                               |  2 +-
>  gdb/csky-tdep.c                               |  2 +-
>  gdb/dwarf2/abbrev.c                           |  2 +-
>  gdb/{dwarf2expr.c => dwarf2/expr.c}           |  4 +--
>  gdb/{dwarf2expr.h => dwarf2/expr.h}           |  0
>  .../frame-tailcall.c}                         |  6 ++--
>  .../frame-tailcall.h}                         |  0
>  gdb/{dwarf2-frame.c => dwarf2/frame.c}        | 10 +++---
>  gdb/{dwarf2-frame.h => dwarf2/frame.h}        |  0
>  .../index-cache.c}                            |  6 ++--
>  .../index-cache.h}                            |  2 +-
>  .../index-common.c}                           |  2 +-
>  .../index-common.h}                           |  0
>  .../index-write.c}                            |  6 ++--
>  .../index-write.h}                            |  2 +-
>  gdb/{dwarf2loc.c => dwarf2/loc.c}             |  8 ++---
>  gdb/{dwarf2loc.h => dwarf2/loc.h}             |  2 +-
>  gdb/{dwarf2read.c => dwarf2/read.c}           | 10 +++---
>  gdb/{dwarf2read.h => dwarf2/read.h}           |  2 +-
>  gdb/findvar.c                                 |  2 +-
>  gdb/gdbtypes.c                                |  2 +-
>  gdb/guile/scm-type.c                          |  2 +-
>  gdb/h8300-tdep.c                              |  2 +-
>  gdb/hppa-bsd-tdep.c                           |  2 +-
>  gdb/hppa-linux-tdep.c                         |  2 +-
>  gdb/i386-darwin-tdep.c                        |  2 +-
>  gdb/i386-linux-tdep.c                         |  2 +-
>  gdb/i386-tdep.c                               |  2 +-
>  gdb/iq2000-tdep.c                             |  2 +-
>  gdb/m32c-tdep.c                               |  4 +--
>  gdb/m68hc11-tdep.c                            |  2 +-
>  gdb/m68k-tdep.c                               |  2 +-
>  gdb/microblaze-tdep.c                         |  2 +-
>  gdb/mips-tdep.c                               |  2 +-
>  gdb/mn10300-tdep.c                            |  2 +-
>  gdb/msp430-tdep.c                             |  2 +-
>  gdb/nds32-tdep.c                              |  2 +-
>  gdb/nios2-tdep.c                              |  2 +-
>  gdb/or1k-tdep.c                               |  2 +-
>  gdb/riscv-tdep.c                              |  2 +-
>  gdb/rl78-tdep.c                               |  2 +-
>  gdb/rs6000-tdep.c                             |  2 +-
>  gdb/rx-tdep.c                                 |  2 +-
>  gdb/s12z-tdep.c                               |  2 +-
>  gdb/s390-tdep.c                               |  2 +-
>  gdb/score-tdep.c                              |  2 +-
>  gdb/sh-tdep.c                                 |  2 +-
>  gdb/sparc-linux-tdep.c                        |  2 +-
>  gdb/sparc-tdep.c                              |  2 +-
>  gdb/sparc64-linux-tdep.c                      |  2 +-
>  gdb/sparc64-tdep.c                            |  2 +-
>  gdb/tic6x-tdep.c                              |  2 +-
>  gdb/tilegx-tdep.c                             |  2 +-
>  gdb/v850-tdep.c                               |  2 +-
>  gdb/xstormy16-tdep.c                          |  2 +-
>  gdb/xtensa-tdep.c                             |  4 +--
>  67 files changed, 133 insertions(+), 98 deletions(-)
>  rename gdb/{dwarf2expr.c => dwarf2/expr.c} (99%)
>  rename gdb/{dwarf2expr.h => dwarf2/expr.h} (100%)
>  rename gdb/{dwarf2-frame-tailcall.c => dwarf2/frame-tailcall.c} (99%)
>  rename gdb/{dwarf2-frame-tailcall.h => dwarf2/frame-tailcall.h} (100%)
>  rename gdb/{dwarf2-frame.c => dwarf2/frame.c} (99%)
>  rename gdb/{dwarf2-frame.h => dwarf2/frame.h} (100%)
>  rename gdb/{dwarf-index-cache.c => dwarf2/index-cache.c} (99%)
>  rename gdb/{dwarf-index-cache.h => dwarf2/index-cache.h} (98%)
>  rename gdb/{dwarf-index-common.c => dwarf2/index-common.c} (97%)
>  rename gdb/{dwarf-index-common.h => dwarf2/index-common.h} (100%)
>  rename gdb/{dwarf-index-write.c => dwarf2/index-write.c} (99%)
>  rename gdb/{dwarf-index-write.h => dwarf2/index-write.h} (98%)
>  rename gdb/{dwarf2loc.c => dwarf2/loc.c} (99%)
>  rename gdb/{dwarf2loc.h => dwarf2/loc.h} (99%)
>  rename gdb/{dwarf2read.c => dwarf2/read.c} (99%)
>  rename gdb/{dwarf2read.h => dwarf2/read.h} (99%)
>
> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> index e652e4f971a..37c5d250ff0 100644
> --- a/gdb/Makefile.in
> +++ b/gdb/Makefile.in
> @@ -994,17 +994,17 @@ COMMON_SFILES = \
>         disasm.c \
>         disasm-selftests.c \
>         dummy-frame.c \
> -       dwarf-index-cache.c \
> -       dwarf-index-common.c \
> -       dwarf-index-write.c \
> -       dwarf2-frame.c \
> -       dwarf2-frame-tailcall.c \
> -       dwarf2expr.c \
> -       dwarf2loc.c \
> -       dwarf2read.c \
>         dwarf2/abbrev.c \
>         dwarf2/attribute.c \
> +       dwarf2/expr.c \
> +       dwarf2/frame-tailcall.c \
> +       dwarf2/frame.c \
> +       dwarf2/index-cache.c \
> +       dwarf2/index-common.c \
> +       dwarf2/index-write.c \
>         dwarf2/leb.c \
> +       dwarf2/loc.c \
> +       dwarf2/read.c \
>         dwarf2/section.c \
>         eval.c \
>         event-loop.c \
> @@ -1234,13 +1234,13 @@ HFILES_NO_SRCDIR = \
>         dictionary.h \
>         disasm.h \
>         dummy-frame.h \
> -       dwarf-index-cache.h \
> -       dwarf-index-common.h \
> -       dwarf2-frame.h \
> -       dwarf2-frame-tailcall.h \
> -       dwarf2expr.h \
> -       dwarf2loc.h \
> -       dwarf2read.h \
> +       dwarf2/frame-tailcall.h \
> +       dwarf2/frame.h \
> +       dwarf2/expr.h \
> +       dwarf2/index-cache.h \
> +       dwarf2/index-common.h \
> +       dwarf2/loc.h \
> +       dwarf2/read.h \
>         event-loop.h \
>         event-top.h \
>         exceptions.h \
> diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
> index 1631178f8c2..6d099fbf35d 100644
> --- a/gdb/aarch64-tdep.c
> +++ b/gdb/aarch64-tdep.c
> @@ -34,7 +34,7 @@
>  #include "trad-frame.h"
>  #include "objfiles.h"
>  #include "dwarf2.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "gdbtypes.h"
>  #include "prologue-value.h"
>  #include "target-descriptions.h"
> diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
> index 390f865edad..aabd202b1cc 100644
> --- a/gdb/alpha-tdep.c
> +++ b/gdb/alpha-tdep.c
> @@ -21,7 +21,7 @@
>  #include "frame.h"
>  #include "frame-unwind.h"
>  #include "frame-base.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "inferior.h"
>  #include "symtab.h"
>  #include "value.h"
> diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c
> index 5e8f352ffc9..447e272f4ea 100644
> --- a/gdb/amd64-darwin-tdep.c
> +++ b/gdb/amd64-darwin-tdep.c
> @@ -36,7 +36,7 @@
>  #include "i386-darwin-tdep.h"
>  #include "solib.h"
>  #include "solib-darwin.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>
>  /* Offsets into the struct x86_thread_state64 where we'll find the saved
> regs.
>     From <mach/i386/thread_status.h> and amd64-tdep.h.  */
> diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
> index 13da0226f78..ac98f03efc1 100644
> --- a/gdb/arc-tdep.c
> +++ b/gdb/arc-tdep.c
> @@ -22,7 +22,7 @@
>  #include "defs.h"
>  #include "arch-utils.h"
>  #include "disasm.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
>  #include "gdbcore.h"
> diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
> index 0e72bcc651a..d4fed8977e7 100644
> --- a/gdb/arm-tdep.c
> +++ b/gdb/arm-tdep.c
> @@ -38,7 +38,7 @@
>  #include "frame-base.h"
>  #include "trad-frame.h"
>  #include "objfiles.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "gdbtypes.h"
>  #include "prologue-value.h"
>  #include "remote.h"
> diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
> index 23591d4a5f0..55fb6a61d6d 100644
> --- a/gdb/bfin-tdep.c
> +++ b/gdb/bfin-tdep.c
> @@ -31,7 +31,7 @@
>  #include "dis-asm.h"
>  #include "sim-regno.h"
>  #include "gdb/sim-bfin.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "symtab.h"
>  #include "elf-bfd.h"
>  #include "elf/bfin.h"
> diff --git a/gdb/compile/compile-c-symbols.c
> b/gdb/compile/compile-c-symbols.c
> index 7af85d62cd4..eb5af8e015f 100644
> --- a/gdb/compile/compile-c-symbols.c
> +++ b/gdb/compile/compile-c-symbols.c
> @@ -29,7 +29,7 @@
>  #include "value.h"
>  #include "exceptions.h"
>  #include "gdbtypes.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/loc.h"
>
>
>
> diff --git a/gdb/compile/compile-cplus-symbols.c
> b/gdb/compile/compile-cplus-symbols.c
> index 34cae4a6d8f..fee2651e47f 100644
> --- a/gdb/compile/compile-cplus-symbols.c
> +++ b/gdb/compile/compile-cplus-symbols.c
> @@ -30,7 +30,7 @@
>  #include "value.h"
>  #include "exceptions.h"
>  #include "gdbtypes.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/loc.h"
>  #include "cp-support.h"
>  #include "gdbcmd.h"
>  #include "compile-c.h"
> diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c
> index 0f911821115..636c929b022 100644
> --- a/gdb/compile/compile-loc2c.c
> +++ b/gdb/compile/compile-loc2c.c
> @@ -19,15 +19,15 @@
>
>  #include "defs.h"
>  #include "dwarf2.h"
> -#include "dwarf2expr.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/expr.h"
> +#include "dwarf2/loc.h"
>  #include "ui-file.h"
>  #include "utils.h"
>  #include "compile-internal.h"
>  #include "compile-c.h"
>  #include "compile.h"
>  #include "block.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "gdbsupport/gdb_vecs.h"
>  #include "value.h"
>  #include "gdbarch.h"
> diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
> index 6885d237f3a..cc45a7f8ebf 100644
> --- a/gdb/cris-tdep.c
> +++ b/gdb/cris-tdep.c
> @@ -25,7 +25,7 @@
>  #include "frame-unwind.h"
>  #include "frame-base.h"
>  #include "trad-frame.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "symtab.h"
>  #include "inferior.h"
>  #include "gdbtypes.h"
> diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
> index 583298ce74c..955238bb014 100644
> --- a/gdb/csky-tdep.c
> +++ b/gdb/csky-tdep.c
> @@ -49,7 +49,7 @@
>  #include "floatformat.h"
>  #include "remote.h"
>  #include "target-descriptions.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "user-regs.h"
>  #include "valprint.h"
>  #include "csky-tdep.h"
> diff --git a/gdb/dwarf2/abbrev.c b/gdb/dwarf2/abbrev.c
> index 6bd455f012b..544d5793add 100644
> --- a/gdb/dwarf2/abbrev.c
> +++ b/gdb/dwarf2/abbrev.c
> @@ -25,7 +25,7 @@
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.
> */
>
>  #include "defs.h"
> -#include "dwarf2read.h"
> +#include "dwarf2/read.h"
>  #include "dwarf2/abbrev.h"
>  #include "dwarf2/leb.h"
>  #include "bfd.h"
> diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2/expr.c
> similarity index 99%
> rename from gdb/dwarf2expr.c
> rename to gdb/dwarf2/expr.c
> index ad82cbec2f7..243f493084b 100644
> --- a/gdb/dwarf2expr.c
> +++ b/gdb/dwarf2/expr.c
> @@ -25,8 +25,8 @@
>  #include "value.h"
>  #include "gdbcore.h"
>  #include "dwarf2.h"
> -#include "dwarf2expr.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/expr.h"
> +#include "dwarf2/loc.h"
>  #include "gdbsupport/underlying.h"
>  #include "gdbarch.h"
>
> diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2/expr.h
> similarity index 100%
> rename from gdb/dwarf2expr.h
> rename to gdb/dwarf2/expr.h
> diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2/frame-tailcall.c
> similarity index 99%
> rename from gdb/dwarf2-frame-tailcall.c
> rename to gdb/dwarf2/frame-tailcall.c
> index fca1d3d0235..3dc300df60a 100644
> --- a/gdb/dwarf2-frame-tailcall.c
> +++ b/gdb/dwarf2/frame-tailcall.c
> @@ -19,15 +19,15 @@
>
>  #include "defs.h"
>  #include "frame.h"
> -#include "dwarf2-frame-tailcall.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/frame-tailcall.h"
> +#include "dwarf2/loc.h"
>  #include "frame-unwind.h"
>  #include "block.h"
>  #include "hashtab.h"
>  #include "gdbtypes.h"
>  #include "regcache.h"
>  #include "value.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "gdbarch.h"
>
>  /* Contains struct tailcall_cache indexed by next_bottom_frame.  */
> diff --git a/gdb/dwarf2-frame-tailcall.h b/gdb/dwarf2/frame-tailcall.h
> similarity index 100%
> rename from gdb/dwarf2-frame-tailcall.h
> rename to gdb/dwarf2/frame-tailcall.h
> diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2/frame.c
> similarity index 99%
> rename from gdb/dwarf2-frame.c
> rename to gdb/dwarf2/frame.c
> index 9daa66b0a29..7f57c28be2c 100644
> --- a/gdb/dwarf2-frame.c
> +++ b/gdb/dwarf2/frame.c
> @@ -20,7 +20,7 @@
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.
> */
>
>  #include "defs.h"
> -#include "dwarf2expr.h"
> +#include "dwarf2/expr.h"
>  #include "dwarf2.h"
>  #include "dwarf2/leb.h"
>  #include "frame.h"
> @@ -35,11 +35,11 @@
>  #include "record.h"
>
>  #include "complaints.h"
> -#include "dwarf2-frame.h"
> -#include "dwarf2read.h"
> +#include "dwarf2/frame.h"
> +#include "dwarf2/read.h"
>  #include "ax.h"
> -#include "dwarf2loc.h"
> -#include "dwarf2-frame-tailcall.h"
> +#include "dwarf2/loc.h"
> +#include "dwarf2/frame-tailcall.h"
>  #include "gdbsupport/gdb_binary_search.h"
>  #if GDB_SELF_TEST
>  #include "gdbsupport/selftest.h"
> diff --git a/gdb/dwarf2-frame.h b/gdb/dwarf2/frame.h
> similarity index 100%
> rename from gdb/dwarf2-frame.h
> rename to gdb/dwarf2/frame.h
> diff --git a/gdb/dwarf-index-cache.c b/gdb/dwarf2/index-cache.c
> similarity index 99%
> rename from gdb/dwarf-index-cache.c
> rename to gdb/dwarf2/index-cache.c
> index 977fcc1b20c..7b4d9975905 100644
> --- a/gdb/dwarf-index-cache.c
> +++ b/gdb/dwarf2/index-cache.c
> @@ -18,15 +18,15 @@
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.
> */
>
>  #include "defs.h"
> -#include "dwarf-index-cache.h"
> +#include "dwarf2/index-cache.h"
>
>  #include "build-id.h"
>  #include "cli/cli-cmds.h"
>  #include "command.h"
>  #include "gdbsupport/scoped_mmap.h"
>  #include "gdbsupport/pathstuff.h"
> -#include "dwarf-index-write.h"
> -#include "dwarf2read.h"
> +#include "dwarf2/index-write.h"
> +#include "dwarf2/read.h"
>  #include "objfiles.h"
>  #include "gdbsupport/selftest.h"
>  #include <string>
> diff --git a/gdb/dwarf-index-cache.h b/gdb/dwarf2/index-cache.h
> similarity index 98%
> rename from gdb/dwarf-index-cache.h
> rename to gdb/dwarf2/index-cache.h
> index bc1b30aa45f..07e93fa853c 100644
> --- a/gdb/dwarf-index-cache.h
> +++ b/gdb/dwarf2/index-cache.h
> @@ -20,7 +20,7 @@
>  #ifndef DWARF_INDEX_CACHE_H
>  #define DWARF_INDEX_CACHE_H
>
> -#include "dwarf-index-common.h"
> +#include "dwarf2/index-common.h"
>  #include "gdbsupport/array-view.h"
>  #include "symfile.h"
>
> diff --git a/gdb/dwarf-index-common.c b/gdb/dwarf2/index-common.c
> similarity index 97%
> rename from gdb/dwarf-index-common.c
> rename to gdb/dwarf2/index-common.c
> index 0baf869e41e..13c6f0f8ab9 100644
> --- a/gdb/dwarf-index-common.c
> +++ b/gdb/dwarf2/index-common.c
> @@ -18,7 +18,7 @@
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.
> */
>
>  #include "defs.h"
> -#include "dwarf-index-common.h"
> +#include "dwarf2/index-common.h"
>
>  /* See dwarf-index-common.h.  */
>
> diff --git a/gdb/dwarf-index-common.h b/gdb/dwarf2/index-common.h
> similarity index 100%
> rename from gdb/dwarf-index-common.h
> rename to gdb/dwarf2/index-common.h
> diff --git a/gdb/dwarf-index-write.c b/gdb/dwarf2/index-write.c
> similarity index 99%
> rename from gdb/dwarf-index-write.c
> rename to gdb/dwarf2/index-write.c
> index c43a4817b97..6744e1a44db 100644
> --- a/gdb/dwarf-index-write.c
> +++ b/gdb/dwarf2/index-write.c
> @@ -19,7 +19,7 @@
>
>  #include "defs.h"
>
> -#include "dwarf-index-write.h"
> +#include "dwarf2/index-write.h"
>
>  #include "addrmap.h"
>  #include "cli/cli-decode.h"
> @@ -29,9 +29,9 @@
>  #include "gdbsupport/pathstuff.h"
>  #include "gdbsupport/scoped_fd.h"
>  #include "complaints.h"
> -#include "dwarf-index-common.h"
> +#include "dwarf2/index-common.h"
>  #include "dwarf2.h"
> -#include "dwarf2read.h"
> +#include "dwarf2/read.h"
>  #include "gdb/gdb-index.h"
>  #include "gdbcmd.h"
>  #include "objfiles.h"
> diff --git a/gdb/dwarf-index-write.h b/gdb/dwarf2/index-write.h
> similarity index 98%
> rename from gdb/dwarf-index-write.h
> rename to gdb/dwarf2/index-write.h
> index d78ff2ac073..5ba17251a9f 100644
> --- a/gdb/dwarf-index-write.h
> +++ b/gdb/dwarf2/index-write.h
> @@ -21,7 +21,7 @@
>  #define DWARF_INDEX_WRITE_H
>
>  #include "symfile.h"
> -#include "dwarf2read.h"
> +#include "dwarf2/read.h"
>
>  /* Create index files for OBJFILE in the directory DIR.
>
> diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2/loc.c
> similarity index 99%
> rename from gdb/dwarf2loc.c
> rename to gdb/dwarf2/loc.c
> index 9cfc852c9e1..03333602820 100644
> --- a/gdb/dwarf2loc.c
> +++ b/gdb/dwarf2/loc.c
> @@ -34,10 +34,10 @@
>  #include "gdbcmd.h"
>  #include "complaints.h"
>  #include "dwarf2.h"
> -#include "dwarf2expr.h"
> -#include "dwarf2loc.h"
> -#include "dwarf2read.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/expr.h"
> +#include "dwarf2/loc.h"
> +#include "dwarf2/read.h"
> +#include "dwarf2/frame.h"
>  #include "dwarf2/leb.h"
>  #include "compile/compile.h"
>  #include "gdbsupport/selftest.h"
> diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2/loc.h
> similarity index 99%
> rename from gdb/dwarf2loc.h
> rename to gdb/dwarf2/loc.h
> index d0bc23b37d8..a49a9903b11 100644
> --- a/gdb/dwarf2loc.h
> +++ b/gdb/dwarf2/loc.h
> @@ -20,7 +20,7 @@
>  #if !defined (DWARF2LOC_H)
>  #define DWARF2LOC_H
>
> -#include "dwarf2expr.h"
> +#include "dwarf2/expr.h"
>
>  struct symbol_computed_ops;
>  struct objfile;
> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2/read.c
> similarity index 99%
> rename from gdb/dwarf2read.c
> rename to gdb/dwarf2/read.c
> index 99b0551cd5a..c4879865532 100644
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2/read.c
> @@ -29,11 +29,11 @@
>     E.g., load_partial_dies, read_partial_die.  */
>
>  #include "defs.h"
> -#include "dwarf2read.h"
> +#include "dwarf2/read.h"
>  #include "dwarf2/abbrev.h"
>  #include "dwarf2/attribute.h"
> -#include "dwarf-index-cache.h"
> -#include "dwarf-index-common.h"
> +#include "dwarf2/index-cache.h"
> +#include "dwarf2/index-common.h"
>  #include "dwarf2/leb.h"
>  #include "bfd.h"
>  #include "elf-bfd.h"
> @@ -48,8 +48,8 @@
>  #include "macrotab.h"
>  #include "language.h"
>  #include "complaints.h"
> -#include "dwarf2expr.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/expr.h"
> +#include "dwarf2/loc.h"
>  #include "cp-support.h"
>  #include "hashtab.h"
>  #include "command.h"
> diff --git a/gdb/dwarf2read.h b/gdb/dwarf2/read.h
> similarity index 99%
> rename from gdb/dwarf2read.h
> rename to gdb/dwarf2/read.h
> index a2228200257..9752abc5e4c 100644
> --- a/gdb/dwarf2read.h
> +++ b/gdb/dwarf2/read.h
> @@ -21,7 +21,7 @@
>  #define DWARF2READ_H
>
>  #include <unordered_map>
> -#include "dwarf-index-cache.h"
> +#include "dwarf2/index-cache.h"
>  #include "dwarf2/section.h"
>  #include "filename-seen-cache.h"
>  #include "gdb_obstack.h"
> diff --git a/gdb/findvar.c b/gdb/findvar.c
> index 5cf1cd4137b..a836c63dc5d 100644
> --- a/gdb/findvar.c
> +++ b/gdb/findvar.c
> @@ -31,7 +31,7 @@
>  #include "block.h"
>  #include "objfiles.h"
>  #include "language.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/loc.h"
>  #include "gdbsupport/selftest.h"
>
>  /* Basic byte-swapping routines.  All 'extract' functions return a
> diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
> index 1d5bfd4bc20..85758930491 100644
> --- a/gdb/gdbtypes.c
> +++ b/gdb/gdbtypes.c
> @@ -36,7 +36,7 @@
>  #include "hashtab.h"
>  #include "cp-support.h"
>  #include "bcache.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/loc.h"
>  #include "gdbcore.h"
>  #include "floatformat.h"
>
> diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c
> index 52817ea4ede..bf2f751ce4d 100644
> --- a/gdb/guile/scm-type.c
> +++ b/gdb/guile/scm-type.c
> @@ -27,7 +27,7 @@
>  #include "objfiles.h"
>  #include "language.h"
>  #include "bcache.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/loc.h"
>  #include "typeprint.h"
>  #include "guile-internal.h"
>
> diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
> index 5e8ba94b72f..79c74001bc8 100644
> --- a/gdb/h8300-tdep.c
> +++ b/gdb/h8300-tdep.c
> @@ -29,7 +29,7 @@
>  #include "gdbcore.h"
>  #include "objfiles.h"
>  #include "dis-asm.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
>
> diff --git a/gdb/hppa-bsd-tdep.c b/gdb/hppa-bsd-tdep.c
> index 34dec20298f..2a00a27dbbd 100644
> --- a/gdb/hppa-bsd-tdep.c
> +++ b/gdb/hppa-bsd-tdep.c
> @@ -26,7 +26,7 @@
>
>  #include "hppa-tdep.h"
>  #include "hppa-bsd-tdep.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "solib-svr4.h"
>
>  static CORE_ADDR
> diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
> index 51c84d8e4f0..6a38d7200be 100644
> --- a/gdb/hppa-linux-tdep.c
> +++ b/gdb/hppa-linux-tdep.c
> @@ -26,7 +26,7 @@
>  #include "glibc-tdep.h"
>  #include "frame-unwind.h"
>  #include "trad-frame.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "value.h"
>  #include "regset.h"
>  #include "regcache.h"
> diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c
> index a1c226ba66f..a796a8544f0 100644
> --- a/gdb/i386-darwin-tdep.c
> +++ b/gdb/i386-darwin-tdep.c
> @@ -34,7 +34,7 @@
>  #include "i386-darwin-tdep.h"
>  #include "solib.h"
>  #include "solib-darwin.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include <algorithm>
>
>  /* Offsets into the struct i386_thread_state where we'll find the saved
> regs.
> diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
> index 6f702b59e7f..f4a5f0a7616 100644
> --- a/gdb/i386-linux-tdep.c
> +++ b/gdb/i386-linux-tdep.c
> @@ -26,7 +26,7 @@
>  #include "inferior.h"
>  #include "osabi.h"
>  #include "reggroups.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "i386-tdep.h"
>  #include "i386-linux-tdep.h"
>  #include "linux-tdep.h"
> diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
> index f120438081d..f71444f6528 100644
> --- a/gdb/i386-tdep.c
> +++ b/gdb/i386-tdep.c
> @@ -22,7 +22,7 @@
>  #include "arch-utils.h"
>  #include "command.h"
>  #include "dummy-frame.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
> index 4b3419ead7b..7864d810d75 100644
> --- a/gdb/iq2000-tdep.c
> +++ b/gdb/iq2000-tdep.c
> @@ -24,7 +24,7 @@
>  #include "frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "gdbtypes.h"
>  #include "value.h"
>  #include "dis-asm.h"
> diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
> index 31f4d24cac5..585fa337745 100644
> --- a/gdb/m32c-tdep.c
> +++ b/gdb/m32c-tdep.c
> @@ -27,8 +27,8 @@
>  #include "arch-utils.h"
>  #include "frame.h"
>  #include "frame-unwind.h"
> -#include "dwarf2-frame.h"
> -#include "dwarf2expr.h"
> +#include "dwarf2/frame.h"
> +#include "dwarf2/expr.h"
>  #include "symtab.h"
>  #include "gdbcore.h"
>  #include "value.h"
> diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
> index 4e63c2f2fa0..fb3b18ac718 100644
> --- a/gdb/m68hc11-tdep.c
> +++ b/gdb/m68hc11-tdep.c
> @@ -24,7 +24,7 @@
>  #include "frame.h"
>  #include "frame-unwind.h"
>  #include "frame-base.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "trad-frame.h"
>  #include "symtab.h"
>  #include "gdbtypes.h"
> diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
> index ec754a62af9..5ed5087da1f 100644
> --- a/gdb/m68k-tdep.c
> +++ b/gdb/m68k-tdep.c
> @@ -18,7 +18,7 @@
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.
> */
>
>  #include "defs.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
> index a05088c36a1..5c804133040 100644
> --- a/gdb/microblaze-tdep.c
> +++ b/gdb/microblaze-tdep.c
> @@ -31,7 +31,7 @@
>  #include "target.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "osabi.h"
>  #include "target-descriptions.h"
>  #include "opcodes/microblaze-opcm.h"
> diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
> index 90ec3707c5d..2599f825e83 100644
> --- a/gdb/mips-tdep.c
> +++ b/gdb/mips-tdep.c
> @@ -51,7 +51,7 @@
>  #include "infcall.h"
>  #include "remote.h"
>  #include "target-descriptions.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "user-regs.h"
>  #include "valprint.h"
>  #include "ax.h"
> diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
> index d779ad1dd0d..8e487241e70 100644
> --- a/gdb/mn10300-tdep.c
> +++ b/gdb/mn10300-tdep.c
> @@ -28,7 +28,7 @@
>  #include "frame-unwind.h"
>  #include "frame-base.h"
>  #include "symtab.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "osabi.h"
>  #include "infcall.h"
>  #include "prologue-value.h"
> diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
> index 0893274686e..88597660b53 100644
> --- a/gdb/msp430-tdep.c
> +++ b/gdb/msp430-tdep.c
> @@ -32,7 +32,7 @@
>  #include "frame-base.h"
>  #include "value.h"
>  #include "gdbcore.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "reggroups.h"
>
>  #include "elf/msp430.h"
> diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c
> index 5238fe54a71..220ad1e968d 100644
> --- a/gdb/nds32-tdep.c
> +++ b/gdb/nds32-tdep.c
> @@ -34,7 +34,7 @@
>  #include "dis-asm.h"
>  #include "user-regs.h"
>  #include "elf-bfd.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "remote.h"
>  #include "target-descriptions.h"
>
> diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c
> index cb669da2480..02cdaea738e 100644
> --- a/gdb/nios2-tdep.c
> +++ b/gdb/nios2-tdep.c
> @@ -24,7 +24,7 @@
>  #include "frame-unwind.h"
>  #include "frame-base.h"
>  #include "trad-frame.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "symtab.h"
>  #include "inferior.h"
>  #include "gdbtypes.h"
> diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c
> index 772ecff3349..61901a7689e 100644
> --- a/gdb/or1k-tdep.c
> +++ b/gdb/or1k-tdep.c
> @@ -35,7 +35,7 @@
>  #include "arch-utils.h"
>  #include "frame-unwind.h"
>  #include "frame-base.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "trad-frame.h"
>  #include "regset.h"
>  #include "remote.h"
> diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
> index d585b0be5ab..a14ef4db083 100644
> --- a/gdb/riscv-tdep.c
> +++ b/gdb/riscv-tdep.c
> @@ -47,7 +47,7 @@
>  #include "floatformat.h"
>  #include "remote.h"
>  #include "target-descriptions.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "user-regs.h"
>  #include "valprint.h"
>  #include "gdbsupport/common-defs.h"
> diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c
> index 3705efdbe89..aca7649fe06 100644
> --- a/gdb/rl78-tdep.c
> +++ b/gdb/rl78-tdep.c
> @@ -32,7 +32,7 @@
>  #include "frame-base.h"
>  #include "value.h"
>  #include "gdbcore.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "reggroups.h"
>
>  #include "elf/rl78.h"
> diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
> index ccffc39508a..919bebc71b2 100644
> --- a/gdb/rs6000-tdep.c
> +++ b/gdb/rs6000-tdep.c
> @@ -37,7 +37,7 @@
>  #include "sim-regno.h"
>  #include "gdb/sim-ppc.h"
>  #include "reggroups.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "target-descriptions.h"
>  #include "user-regs.h"
>  #include "record-full.h"
> diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
> index 766eaa06ed3..c14ce20282c 100644
> --- a/gdb/rx-tdep.c
> +++ b/gdb/rx-tdep.c
> @@ -32,7 +32,7 @@
>  #include "frame-base.h"
>  #include "value.h"
>  #include "gdbcore.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "remote.h"
>  #include "target-descriptions.h"
>
> diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c
> index 922268d1ef2..4d2febadc9b 100644
> --- a/gdb/s12z-tdep.c
> +++ b/gdb/s12z-tdep.c
> @@ -21,7 +21,7 @@
>  #include "defs.h"
>
>  #include "arch-utils.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "gdbsupport/errors.h"
>  #include "frame-unwind.h"
>  #include "gdbcore.h"
> diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
> index e01505549e6..5f3cb7e81e7 100644
> --- a/gdb/s390-tdep.c
> +++ b/gdb/s390-tdep.c
> @@ -21,7 +21,7 @@
>
>  #include "arch-utils.h"
>  #include "ax-gdb.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "elf/s390.h"
>  #include "elf-bfd.h"
>  #include "frame-base.h"
> diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
> index 14eeee9eb8c..c5c183628ab 100644
> --- a/gdb/score-tdep.c
> +++ b/gdb/score-tdep.c
> @@ -34,7 +34,7 @@
>  #include "frame-unwind.h"
>  #include "frame-base.h"
>  #include "trad-frame.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "score-tdep.h"
>
>  #define G_FLD(_i,_ms,_ls) \
> diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
> index b69313d050f..9e831fb42e0 100644
> --- a/gdb/sh-tdep.c
> +++ b/gdb/sh-tdep.c
> @@ -24,7 +24,7 @@
>  #include "frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "symtab.h"
>  #include "gdbtypes.h"
>  #include "gdbcmd.h"
> diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c
> index 1c4adb83674..247fde21657 100644
> --- a/gdb/sparc-linux-tdep.c
> +++ b/gdb/sparc-linux-tdep.c
> @@ -18,7 +18,7 @@
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.
> */
>
>  #include "defs.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "frame.h"
>  #include "frame-unwind.h"
>  #include "gdbtypes.h"
> diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
> index e048f872c2a..a0c41722440 100644
> --- a/gdb/sparc-tdep.c
> +++ b/gdb/sparc-tdep.c
> @@ -21,7 +21,7 @@
>  #include "arch-utils.h"
>  #include "dis-asm.h"
>  #include "dwarf2.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
> index de6c0479009..a7f439fbb04 100644
> --- a/gdb/sparc64-linux-tdep.c
> +++ b/gdb/sparc64-linux-tdep.c
> @@ -20,7 +20,7 @@
>  #include "defs.h"
>  #include "frame.h"
>  #include "frame-unwind.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "regset.h"
>  #include "regcache.h"
>  #include "gdbarch.h"
> diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
> index a11da6ab2e8..ac915d468fd 100644
> --- a/gdb/sparc64-tdep.c
> +++ b/gdb/sparc64-tdep.c
> @@ -19,7 +19,7 @@
>
>  #include "defs.h"
>  #include "arch-utils.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
> index a05675c570c..50031c100a5 100644
> --- a/gdb/tic6x-tdep.c
> +++ b/gdb/tic6x-tdep.c
> @@ -24,7 +24,7 @@
>  #include "frame-unwind.h"
>  #include "frame-base.h"
>  #include "trad-frame.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "symtab.h"
>  #include "inferior.h"
>  #include "gdbtypes.h"
> diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
> index 9290bc3878b..70c4add90b1 100644
> --- a/gdb/tilegx-tdep.c
> +++ b/gdb/tilegx-tdep.c
> @@ -21,7 +21,7 @@
>  #include "frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "trad-frame.h"
>  #include "symtab.h"
>  #include "gdbtypes.h"
> diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
> index 9b2e9b62e71..fd5a9ff4587 100644
> --- a/gdb/v850-tdep.c
> +++ b/gdb/v850-tdep.c
> @@ -22,7 +22,7 @@
>  #include "frame-base.h"
>  #include "trad-frame.h"
>  #include "frame-unwind.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "gdbtypes.h"
>  #include "inferior.h"
>  #include "gdbcore.h"
> diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
> index 0206af8bebc..1715dc81e38 100644
> --- a/gdb/xstormy16-tdep.c
> +++ b/gdb/xstormy16-tdep.c
> @@ -21,7 +21,7 @@
>  #include "frame.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
> -#include "dwarf2-frame.h"
> +#include "dwarf2/frame.h"
>  #include "symtab.h"
>  #include "gdbtypes.h"
>  #include "gdbcmd.h"
> diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
> index bbd92d5cf8f..2ea11212601 100644
> --- a/gdb/xtensa-tdep.c
> +++ b/gdb/xtensa-tdep.c
> @@ -35,8 +35,8 @@
>
>  #include "dummy-frame.h"
>  #include "dwarf2.h"
> -#include "dwarf2-frame.h"
> -#include "dwarf2loc.h"
> +#include "dwarf2/frame.h"
> +#include "dwarf2/loc.h"
>  #include "frame-base.h"
>  #include "frame-unwind.h"
>
> --
> 2.17.2
>
>
Tom Tromey Jan. 28, 2020, 12:54 a.m. UTC | #2
>>>>> "Christian" == Christian Biesinger <cbiesinger@google.com> writes:

>  This moves all the remaining DWARF code to the new dwarf2
>  subdirectory.  This is just a simple renaming, with updates to
>  includes as needed.

Christian> Two questions:
Christian> - Why dwarf2 instead of something more generic, since this supports dwarf 2-5?

I suppose everything was named "dwarf2" historically because v2 was a
big change from v1.  However, there doesn't seem to be a need to
preserve this distinction any more.

Christian> - thoughts on renaming the files to .cc?

I'm personally ambivalent.  I would do it if there's consensus though.

Tom
diff mbox

Patch

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index e652e4f971a..37c5d250ff0 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -994,17 +994,17 @@  COMMON_SFILES = \
 	disasm.c \
 	disasm-selftests.c \
 	dummy-frame.c \
-	dwarf-index-cache.c \
-	dwarf-index-common.c \
-	dwarf-index-write.c \
-	dwarf2-frame.c \
-	dwarf2-frame-tailcall.c \
-	dwarf2expr.c \
-	dwarf2loc.c \
-	dwarf2read.c \
 	dwarf2/abbrev.c \
 	dwarf2/attribute.c \
+	dwarf2/expr.c \
+	dwarf2/frame-tailcall.c \
+	dwarf2/frame.c \
+	dwarf2/index-cache.c \
+	dwarf2/index-common.c \
+	dwarf2/index-write.c \
 	dwarf2/leb.c \
+	dwarf2/loc.c \
+	dwarf2/read.c \
 	dwarf2/section.c \
 	eval.c \
 	event-loop.c \
@@ -1234,13 +1234,13 @@  HFILES_NO_SRCDIR = \
 	dictionary.h \
 	disasm.h \
 	dummy-frame.h \
-	dwarf-index-cache.h \
-	dwarf-index-common.h \
-	dwarf2-frame.h \
-	dwarf2-frame-tailcall.h \
-	dwarf2expr.h \
-	dwarf2loc.h \
-	dwarf2read.h \
+	dwarf2/frame-tailcall.h \
+	dwarf2/frame.h \
+	dwarf2/expr.h \
+	dwarf2/index-cache.h \
+	dwarf2/index-common.h \
+	dwarf2/loc.h \
+	dwarf2/read.h \
 	event-loop.h \
 	event-top.h \
 	exceptions.h \
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index 1631178f8c2..6d099fbf35d 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -34,7 +34,7 @@ 
 #include "trad-frame.h"
 #include "objfiles.h"
 #include "dwarf2.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "gdbtypes.h"
 #include "prologue-value.h"
 #include "target-descriptions.h"
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index 390f865edad..aabd202b1cc 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -21,7 +21,7 @@ 
 #include "frame.h"
 #include "frame-unwind.h"
 #include "frame-base.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "inferior.h"
 #include "symtab.h"
 #include "value.h"
diff --git a/gdb/amd64-darwin-tdep.c b/gdb/amd64-darwin-tdep.c
index 5e8f352ffc9..447e272f4ea 100644
--- a/gdb/amd64-darwin-tdep.c
+++ b/gdb/amd64-darwin-tdep.c
@@ -36,7 +36,7 @@ 
 #include "i386-darwin-tdep.h"
 #include "solib.h"
 #include "solib-darwin.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 
 /* Offsets into the struct x86_thread_state64 where we'll find the saved regs.
    From <mach/i386/thread_status.h> and amd64-tdep.h.  */
diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c
index 13da0226f78..ac98f03efc1 100644
--- a/gdb/arc-tdep.c
+++ b/gdb/arc-tdep.c
@@ -22,7 +22,7 @@ 
 #include "defs.h"
 #include "arch-utils.h"
 #include "disasm.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
 #include "gdbcore.h"
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 0e72bcc651a..d4fed8977e7 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -38,7 +38,7 @@ 
 #include "frame-base.h"
 #include "trad-frame.h"
 #include "objfiles.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "gdbtypes.h"
 #include "prologue-value.h"
 #include "remote.h"
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index 23591d4a5f0..55fb6a61d6d 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -31,7 +31,7 @@ 
 #include "dis-asm.h"
 #include "sim-regno.h"
 #include "gdb/sim-bfin.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "symtab.h"
 #include "elf-bfd.h"
 #include "elf/bfin.h"
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c
index 7af85d62cd4..eb5af8e015f 100644
--- a/gdb/compile/compile-c-symbols.c
+++ b/gdb/compile/compile-c-symbols.c
@@ -29,7 +29,7 @@ 
 #include "value.h"
 #include "exceptions.h"
 #include "gdbtypes.h"
-#include "dwarf2loc.h"
+#include "dwarf2/loc.h"
 
 
 
diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c
index 34cae4a6d8f..fee2651e47f 100644
--- a/gdb/compile/compile-cplus-symbols.c
+++ b/gdb/compile/compile-cplus-symbols.c
@@ -30,7 +30,7 @@ 
 #include "value.h"
 #include "exceptions.h"
 #include "gdbtypes.h"
-#include "dwarf2loc.h"
+#include "dwarf2/loc.h"
 #include "cp-support.h"
 #include "gdbcmd.h"
 #include "compile-c.h"
diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c
index 0f911821115..636c929b022 100644
--- a/gdb/compile/compile-loc2c.c
+++ b/gdb/compile/compile-loc2c.c
@@ -19,15 +19,15 @@ 
 
 #include "defs.h"
 #include "dwarf2.h"
-#include "dwarf2expr.h"
-#include "dwarf2loc.h"
+#include "dwarf2/expr.h"
+#include "dwarf2/loc.h"
 #include "ui-file.h"
 #include "utils.h"
 #include "compile-internal.h"
 #include "compile-c.h"
 #include "compile.h"
 #include "block.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "gdbsupport/gdb_vecs.h"
 #include "value.h"
 #include "gdbarch.h"
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 6885d237f3a..cc45a7f8ebf 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -25,7 +25,7 @@ 
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "trad-frame.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "symtab.h"
 #include "inferior.h"
 #include "gdbtypes.h"
diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c
index 583298ce74c..955238bb014 100644
--- a/gdb/csky-tdep.c
+++ b/gdb/csky-tdep.c
@@ -49,7 +49,7 @@ 
 #include "floatformat.h"
 #include "remote.h"
 #include "target-descriptions.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "user-regs.h"
 #include "valprint.h"
 #include "csky-tdep.h"
diff --git a/gdb/dwarf2/abbrev.c b/gdb/dwarf2/abbrev.c
index 6bd455f012b..544d5793add 100644
--- a/gdb/dwarf2/abbrev.c
+++ b/gdb/dwarf2/abbrev.c
@@ -25,7 +25,7 @@ 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "dwarf2read.h"
+#include "dwarf2/read.h"
 #include "dwarf2/abbrev.h"
 #include "dwarf2/leb.h"
 #include "bfd.h"
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2/expr.c
similarity index 99%
rename from gdb/dwarf2expr.c
rename to gdb/dwarf2/expr.c
index ad82cbec2f7..243f493084b 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2/expr.c
@@ -25,8 +25,8 @@ 
 #include "value.h"
 #include "gdbcore.h"
 #include "dwarf2.h"
-#include "dwarf2expr.h"
-#include "dwarf2loc.h"
+#include "dwarf2/expr.h"
+#include "dwarf2/loc.h"
 #include "gdbsupport/underlying.h"
 #include "gdbarch.h"
 
diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2/expr.h
similarity index 100%
rename from gdb/dwarf2expr.h
rename to gdb/dwarf2/expr.h
diff --git a/gdb/dwarf2-frame-tailcall.c b/gdb/dwarf2/frame-tailcall.c
similarity index 99%
rename from gdb/dwarf2-frame-tailcall.c
rename to gdb/dwarf2/frame-tailcall.c
index fca1d3d0235..3dc300df60a 100644
--- a/gdb/dwarf2-frame-tailcall.c
+++ b/gdb/dwarf2/frame-tailcall.c
@@ -19,15 +19,15 @@ 
 
 #include "defs.h"
 #include "frame.h"
-#include "dwarf2-frame-tailcall.h"
-#include "dwarf2loc.h"
+#include "dwarf2/frame-tailcall.h"
+#include "dwarf2/loc.h"
 #include "frame-unwind.h"
 #include "block.h"
 #include "hashtab.h"
 #include "gdbtypes.h"
 #include "regcache.h"
 #include "value.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "gdbarch.h"
 
 /* Contains struct tailcall_cache indexed by next_bottom_frame.  */
diff --git a/gdb/dwarf2-frame-tailcall.h b/gdb/dwarf2/frame-tailcall.h
similarity index 100%
rename from gdb/dwarf2-frame-tailcall.h
rename to gdb/dwarf2/frame-tailcall.h
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2/frame.c
similarity index 99%
rename from gdb/dwarf2-frame.c
rename to gdb/dwarf2/frame.c
index 9daa66b0a29..7f57c28be2c 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2/frame.c
@@ -20,7 +20,7 @@ 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "dwarf2expr.h"
+#include "dwarf2/expr.h"
 #include "dwarf2.h"
 #include "dwarf2/leb.h"
 #include "frame.h"
@@ -35,11 +35,11 @@ 
 #include "record.h"
 
 #include "complaints.h"
-#include "dwarf2-frame.h"
-#include "dwarf2read.h"
+#include "dwarf2/frame.h"
+#include "dwarf2/read.h"
 #include "ax.h"
-#include "dwarf2loc.h"
-#include "dwarf2-frame-tailcall.h"
+#include "dwarf2/loc.h"
+#include "dwarf2/frame-tailcall.h"
 #include "gdbsupport/gdb_binary_search.h"
 #if GDB_SELF_TEST
 #include "gdbsupport/selftest.h"
diff --git a/gdb/dwarf2-frame.h b/gdb/dwarf2/frame.h
similarity index 100%
rename from gdb/dwarf2-frame.h
rename to gdb/dwarf2/frame.h
diff --git a/gdb/dwarf-index-cache.c b/gdb/dwarf2/index-cache.c
similarity index 99%
rename from gdb/dwarf-index-cache.c
rename to gdb/dwarf2/index-cache.c
index 977fcc1b20c..7b4d9975905 100644
--- a/gdb/dwarf-index-cache.c
+++ b/gdb/dwarf2/index-cache.c
@@ -18,15 +18,15 @@ 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "dwarf-index-cache.h"
+#include "dwarf2/index-cache.h"
 
 #include "build-id.h"
 #include "cli/cli-cmds.h"
 #include "command.h"
 #include "gdbsupport/scoped_mmap.h"
 #include "gdbsupport/pathstuff.h"
-#include "dwarf-index-write.h"
-#include "dwarf2read.h"
+#include "dwarf2/index-write.h"
+#include "dwarf2/read.h"
 #include "objfiles.h"
 #include "gdbsupport/selftest.h"
 #include <string>
diff --git a/gdb/dwarf-index-cache.h b/gdb/dwarf2/index-cache.h
similarity index 98%
rename from gdb/dwarf-index-cache.h
rename to gdb/dwarf2/index-cache.h
index bc1b30aa45f..07e93fa853c 100644
--- a/gdb/dwarf-index-cache.h
+++ b/gdb/dwarf2/index-cache.h
@@ -20,7 +20,7 @@ 
 #ifndef DWARF_INDEX_CACHE_H
 #define DWARF_INDEX_CACHE_H
 
-#include "dwarf-index-common.h"
+#include "dwarf2/index-common.h"
 #include "gdbsupport/array-view.h"
 #include "symfile.h"
 
diff --git a/gdb/dwarf-index-common.c b/gdb/dwarf2/index-common.c
similarity index 97%
rename from gdb/dwarf-index-common.c
rename to gdb/dwarf2/index-common.c
index 0baf869e41e..13c6f0f8ab9 100644
--- a/gdb/dwarf-index-common.c
+++ b/gdb/dwarf2/index-common.c
@@ -18,7 +18,7 @@ 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "dwarf-index-common.h"
+#include "dwarf2/index-common.h"
 
 /* See dwarf-index-common.h.  */
 
diff --git a/gdb/dwarf-index-common.h b/gdb/dwarf2/index-common.h
similarity index 100%
rename from gdb/dwarf-index-common.h
rename to gdb/dwarf2/index-common.h
diff --git a/gdb/dwarf-index-write.c b/gdb/dwarf2/index-write.c
similarity index 99%
rename from gdb/dwarf-index-write.c
rename to gdb/dwarf2/index-write.c
index c43a4817b97..6744e1a44db 100644
--- a/gdb/dwarf-index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -19,7 +19,7 @@ 
 
 #include "defs.h"
 
-#include "dwarf-index-write.h"
+#include "dwarf2/index-write.h"
 
 #include "addrmap.h"
 #include "cli/cli-decode.h"
@@ -29,9 +29,9 @@ 
 #include "gdbsupport/pathstuff.h"
 #include "gdbsupport/scoped_fd.h"
 #include "complaints.h"
-#include "dwarf-index-common.h"
+#include "dwarf2/index-common.h"
 #include "dwarf2.h"
-#include "dwarf2read.h"
+#include "dwarf2/read.h"
 #include "gdb/gdb-index.h"
 #include "gdbcmd.h"
 #include "objfiles.h"
diff --git a/gdb/dwarf-index-write.h b/gdb/dwarf2/index-write.h
similarity index 98%
rename from gdb/dwarf-index-write.h
rename to gdb/dwarf2/index-write.h
index d78ff2ac073..5ba17251a9f 100644
--- a/gdb/dwarf-index-write.h
+++ b/gdb/dwarf2/index-write.h
@@ -21,7 +21,7 @@ 
 #define DWARF_INDEX_WRITE_H
 
 #include "symfile.h"
-#include "dwarf2read.h"
+#include "dwarf2/read.h"
 
 /* Create index files for OBJFILE in the directory DIR.
 
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2/loc.c
similarity index 99%
rename from gdb/dwarf2loc.c
rename to gdb/dwarf2/loc.c
index 9cfc852c9e1..03333602820 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2/loc.c
@@ -34,10 +34,10 @@ 
 #include "gdbcmd.h"
 #include "complaints.h"
 #include "dwarf2.h"
-#include "dwarf2expr.h"
-#include "dwarf2loc.h"
-#include "dwarf2read.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/expr.h"
+#include "dwarf2/loc.h"
+#include "dwarf2/read.h"
+#include "dwarf2/frame.h"
 #include "dwarf2/leb.h"
 #include "compile/compile.h"
 #include "gdbsupport/selftest.h"
diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2/loc.h
similarity index 99%
rename from gdb/dwarf2loc.h
rename to gdb/dwarf2/loc.h
index d0bc23b37d8..a49a9903b11 100644
--- a/gdb/dwarf2loc.h
+++ b/gdb/dwarf2/loc.h
@@ -20,7 +20,7 @@ 
 #if !defined (DWARF2LOC_H)
 #define DWARF2LOC_H
 
-#include "dwarf2expr.h"
+#include "dwarf2/expr.h"
 
 struct symbol_computed_ops;
 struct objfile;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2/read.c
similarity index 99%
rename from gdb/dwarf2read.c
rename to gdb/dwarf2/read.c
index 99b0551cd5a..c4879865532 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2/read.c
@@ -29,11 +29,11 @@ 
    E.g., load_partial_dies, read_partial_die.  */
 
 #include "defs.h"
-#include "dwarf2read.h"
+#include "dwarf2/read.h"
 #include "dwarf2/abbrev.h"
 #include "dwarf2/attribute.h"
-#include "dwarf-index-cache.h"
-#include "dwarf-index-common.h"
+#include "dwarf2/index-cache.h"
+#include "dwarf2/index-common.h"
 #include "dwarf2/leb.h"
 #include "bfd.h"
 #include "elf-bfd.h"
@@ -48,8 +48,8 @@ 
 #include "macrotab.h"
 #include "language.h"
 #include "complaints.h"
-#include "dwarf2expr.h"
-#include "dwarf2loc.h"
+#include "dwarf2/expr.h"
+#include "dwarf2/loc.h"
 #include "cp-support.h"
 #include "hashtab.h"
 #include "command.h"
diff --git a/gdb/dwarf2read.h b/gdb/dwarf2/read.h
similarity index 99%
rename from gdb/dwarf2read.h
rename to gdb/dwarf2/read.h
index a2228200257..9752abc5e4c 100644
--- a/gdb/dwarf2read.h
+++ b/gdb/dwarf2/read.h
@@ -21,7 +21,7 @@ 
 #define DWARF2READ_H
 
 #include <unordered_map>
-#include "dwarf-index-cache.h"
+#include "dwarf2/index-cache.h"
 #include "dwarf2/section.h"
 #include "filename-seen-cache.h"
 #include "gdb_obstack.h"
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 5cf1cd4137b..a836c63dc5d 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -31,7 +31,7 @@ 
 #include "block.h"
 #include "objfiles.h"
 #include "language.h"
-#include "dwarf2loc.h"
+#include "dwarf2/loc.h"
 #include "gdbsupport/selftest.h"
 
 /* Basic byte-swapping routines.  All 'extract' functions return a
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 1d5bfd4bc20..85758930491 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -36,7 +36,7 @@ 
 #include "hashtab.h"
 #include "cp-support.h"
 #include "bcache.h"
-#include "dwarf2loc.h"
+#include "dwarf2/loc.h"
 #include "gdbcore.h"
 #include "floatformat.h"
 
diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c
index 52817ea4ede..bf2f751ce4d 100644
--- a/gdb/guile/scm-type.c
+++ b/gdb/guile/scm-type.c
@@ -27,7 +27,7 @@ 
 #include "objfiles.h"
 #include "language.h"
 #include "bcache.h"
-#include "dwarf2loc.h"
+#include "dwarf2/loc.h"
 #include "typeprint.h"
 #include "guile-internal.h"
 
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 5e8ba94b72f..79c74001bc8 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -29,7 +29,7 @@ 
 #include "gdbcore.h"
 #include "objfiles.h"
 #include "dis-asm.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
 
diff --git a/gdb/hppa-bsd-tdep.c b/gdb/hppa-bsd-tdep.c
index 34dec20298f..2a00a27dbbd 100644
--- a/gdb/hppa-bsd-tdep.c
+++ b/gdb/hppa-bsd-tdep.c
@@ -26,7 +26,7 @@ 
 
 #include "hppa-tdep.h"
 #include "hppa-bsd-tdep.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "solib-svr4.h"
 
 static CORE_ADDR
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
index 51c84d8e4f0..6a38d7200be 100644
--- a/gdb/hppa-linux-tdep.c
+++ b/gdb/hppa-linux-tdep.c
@@ -26,7 +26,7 @@ 
 #include "glibc-tdep.h"
 #include "frame-unwind.h"
 #include "trad-frame.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "value.h"
 #include "regset.h"
 #include "regcache.h"
diff --git a/gdb/i386-darwin-tdep.c b/gdb/i386-darwin-tdep.c
index a1c226ba66f..a796a8544f0 100644
--- a/gdb/i386-darwin-tdep.c
+++ b/gdb/i386-darwin-tdep.c
@@ -34,7 +34,7 @@ 
 #include "i386-darwin-tdep.h"
 #include "solib.h"
 #include "solib-darwin.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include <algorithm>
 
 /* Offsets into the struct i386_thread_state where we'll find the saved regs.
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 6f702b59e7f..f4a5f0a7616 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -26,7 +26,7 @@ 
 #include "inferior.h"
 #include "osabi.h"
 #include "reggroups.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "i386-tdep.h"
 #include "i386-linux-tdep.h"
 #include "linux-tdep.h"
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index f120438081d..f71444f6528 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -22,7 +22,7 @@ 
 #include "arch-utils.h"
 #include "command.h"
 #include "dummy-frame.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index 4b3419ead7b..7864d810d75 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -24,7 +24,7 @@ 
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "gdbtypes.h"
 #include "value.h"
 #include "dis-asm.h"
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 31f4d24cac5..585fa337745 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -27,8 +27,8 @@ 
 #include "arch-utils.h"
 #include "frame.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
-#include "dwarf2expr.h"
+#include "dwarf2/frame.h"
+#include "dwarf2/expr.h"
 #include "symtab.h"
 #include "gdbcore.h"
 #include "value.h"
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 4e63c2f2fa0..fb3b18ac718 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -24,7 +24,7 @@ 
 #include "frame.h"
 #include "frame-unwind.h"
 #include "frame-base.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "trad-frame.h"
 #include "symtab.h"
 #include "gdbtypes.h"
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index ec754a62af9..5ed5087da1f 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -18,7 +18,7 @@ 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index a05088c36a1..5c804133040 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -31,7 +31,7 @@ 
 #include "target.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "osabi.h"
 #include "target-descriptions.h"
 #include "opcodes/microblaze-opcm.h"
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 90ec3707c5d..2599f825e83 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -51,7 +51,7 @@ 
 #include "infcall.h"
 #include "remote.h"
 #include "target-descriptions.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "user-regs.h"
 #include "valprint.h"
 #include "ax.h"
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index d779ad1dd0d..8e487241e70 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -28,7 +28,7 @@ 
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "symtab.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "osabi.h"
 #include "infcall.h"
 #include "prologue-value.h"
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index 0893274686e..88597660b53 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -32,7 +32,7 @@ 
 #include "frame-base.h"
 #include "value.h"
 #include "gdbcore.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "reggroups.h"
 
 #include "elf/msp430.h"
diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c
index 5238fe54a71..220ad1e968d 100644
--- a/gdb/nds32-tdep.c
+++ b/gdb/nds32-tdep.c
@@ -34,7 +34,7 @@ 
 #include "dis-asm.h"
 #include "user-regs.h"
 #include "elf-bfd.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "remote.h"
 #include "target-descriptions.h"
 
diff --git a/gdb/nios2-tdep.c b/gdb/nios2-tdep.c
index cb669da2480..02cdaea738e 100644
--- a/gdb/nios2-tdep.c
+++ b/gdb/nios2-tdep.c
@@ -24,7 +24,7 @@ 
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "trad-frame.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "symtab.h"
 #include "inferior.h"
 #include "gdbtypes.h"
diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c
index 772ecff3349..61901a7689e 100644
--- a/gdb/or1k-tdep.c
+++ b/gdb/or1k-tdep.c
@@ -35,7 +35,7 @@ 
 #include "arch-utils.h"
 #include "frame-unwind.h"
 #include "frame-base.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "trad-frame.h"
 #include "regset.h"
 #include "remote.h"
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index d585b0be5ab..a14ef4db083 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -47,7 +47,7 @@ 
 #include "floatformat.h"
 #include "remote.h"
 #include "target-descriptions.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "user-regs.h"
 #include "valprint.h"
 #include "gdbsupport/common-defs.h"
diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c
index 3705efdbe89..aca7649fe06 100644
--- a/gdb/rl78-tdep.c
+++ b/gdb/rl78-tdep.c
@@ -32,7 +32,7 @@ 
 #include "frame-base.h"
 #include "value.h"
 #include "gdbcore.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "reggroups.h"
 
 #include "elf/rl78.h"
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index ccffc39508a..919bebc71b2 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -37,7 +37,7 @@ 
 #include "sim-regno.h"
 #include "gdb/sim-ppc.h"
 #include "reggroups.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "target-descriptions.h"
 #include "user-regs.h"
 #include "record-full.h"
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index 766eaa06ed3..c14ce20282c 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -32,7 +32,7 @@ 
 #include "frame-base.h"
 #include "value.h"
 #include "gdbcore.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "remote.h"
 #include "target-descriptions.h"
 
diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c
index 922268d1ef2..4d2febadc9b 100644
--- a/gdb/s12z-tdep.c
+++ b/gdb/s12z-tdep.c
@@ -21,7 +21,7 @@ 
 #include "defs.h"
 
 #include "arch-utils.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "gdbsupport/errors.h"
 #include "frame-unwind.h"
 #include "gdbcore.h"
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index e01505549e6..5f3cb7e81e7 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -21,7 +21,7 @@ 
 
 #include "arch-utils.h"
 #include "ax-gdb.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "elf/s390.h"
 #include "elf-bfd.h"
 #include "frame-base.h"
diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c
index 14eeee9eb8c..c5c183628ab 100644
--- a/gdb/score-tdep.c
+++ b/gdb/score-tdep.c
@@ -34,7 +34,7 @@ 
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "trad-frame.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "score-tdep.h"
 
 #define G_FLD(_i,_ms,_ls) \
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index b69313d050f..9e831fb42e0 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -24,7 +24,7 @@ 
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "gdbcmd.h"
diff --git a/gdb/sparc-linux-tdep.c b/gdb/sparc-linux-tdep.c
index 1c4adb83674..247fde21657 100644
--- a/gdb/sparc-linux-tdep.c
+++ b/gdb/sparc-linux-tdep.c
@@ -18,7 +18,7 @@ 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "frame.h"
 #include "frame-unwind.h"
 #include "gdbtypes.h"
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index e048f872c2a..a0c41722440 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -21,7 +21,7 @@ 
 #include "arch-utils.h"
 #include "dis-asm.h"
 #include "dwarf2.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
diff --git a/gdb/sparc64-linux-tdep.c b/gdb/sparc64-linux-tdep.c
index de6c0479009..a7f439fbb04 100644
--- a/gdb/sparc64-linux-tdep.c
+++ b/gdb/sparc64-linux-tdep.c
@@ -20,7 +20,7 @@ 
 #include "defs.h"
 #include "frame.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "regset.h"
 #include "regcache.h"
 #include "gdbarch.h"
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index a11da6ab2e8..ac915d468fd 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -19,7 +19,7 @@ 
 
 #include "defs.h"
 #include "arch-utils.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c
index a05675c570c..50031c100a5 100644
--- a/gdb/tic6x-tdep.c
+++ b/gdb/tic6x-tdep.c
@@ -24,7 +24,7 @@ 
 #include "frame-unwind.h"
 #include "frame-base.h"
 #include "trad-frame.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "symtab.h"
 #include "inferior.h"
 #include "gdbtypes.h"
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index 9290bc3878b..70c4add90b1 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -21,7 +21,7 @@ 
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "trad-frame.h"
 #include "symtab.h"
 #include "gdbtypes.h"
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 9b2e9b62e71..fd5a9ff4587 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -22,7 +22,7 @@ 
 #include "frame-base.h"
 #include "trad-frame.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "gdbtypes.h"
 #include "inferior.h"
 #include "gdbcore.h"
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 0206af8bebc..1715dc81e38 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -21,7 +21,7 @@ 
 #include "frame.h"
 #include "frame-base.h"
 #include "frame-unwind.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "gdbcmd.h"
diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
index bbd92d5cf8f..2ea11212601 100644
--- a/gdb/xtensa-tdep.c
+++ b/gdb/xtensa-tdep.c
@@ -35,8 +35,8 @@ 
 
 #include "dummy-frame.h"
 #include "dwarf2.h"
-#include "dwarf2-frame.h"
-#include "dwarf2loc.h"
+#include "dwarf2/frame.h"
+#include "dwarf2/loc.h"
 #include "frame-base.h"
 #include "frame-unwind.h"