This is the mail archive of the gdb-patches@sourceware.org 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]

Re: [PATCH] S390: Rename source files to *-linux-*.


On Wednesday, October 23 2013, Andreas Arnez wrote:

> As suggested before, rename the S390-related source files (tdep and nat)
> such that "-linux-" occurs in the file name, like with other GNU/Linux
> targets.  Since no other operating system is currently supported by GDB
> on this architecture, this isn't strictly necessary.  But the old names
> sometimes caused GDB contributors to miss these files when performing a
> change that affects all GNU/Linux targets.  The latest such incident was
> observed here:
>
>     https://sourceware.org/ml/gdb-patches/2013-09/msg00619.html

Thanks a lot for doing this, much appreciated indeed.  I do remember a
few headaches I had because of this naming scheme...

Anyway, looks good to me (just one little comment).  You'll have to wait
for a maintainer to approve, though.

> 2013-10-23  Andreas Arnez  <arnez@linux.vnet.ibm.com>
>
> 	* s390-tdep.h: Rename to...
> 	* s390-linux-tdep.h: ...here.
> 	* s390-tdep.c: Rename to...
> 	* s390-linux-tdep.c: ...here.  Adjust #include.
> 	* s390-nat.c: Rename to...
> 	* s390-linux-nat.c: ...here.  Adjust #include.
> 	* config/s390/s390.mh: Rename to...
> 	* config/s390/linux.mh: ...here.  Reflect rename s390-nat.o ->
> 	s390-linux-nat.o.
> 	* configure.host: Reflect host rename "s390" -> "linux".
> 	* configure.tgt: Reflect rename s390-tdep.o -> s390-linux-tdep.o.
> 	* Makefile.in (ALL_TARGET_OBS): Likewise.
> 	(HFILES_NO_SRCDIR): Reflect rename s390-tdep.h ->
> 	s390-linux-tdep.h.
> 	(ALLDEPFILES): Reflect rename of .c files.
> ---
>  gdb/Makefile.in          |    6 +-
>  gdb/config/s390/linux.mh |    8 +
>  gdb/config/s390/s390.mh  |    8 -
>  gdb/configure.host       |    2 +-
>  gdb/configure.tgt        |    2 +-
>  gdb/s390-linux-nat.c     |  695 ++++++++++
>  gdb/s390-linux-tdep.c    | 3390 ++++++++++++++++++++++++++++++++++++++++++++++
>  gdb/s390-linux-tdep.h    |  178 +++
>  gdb/s390-nat.c           |  695 ----------
>  gdb/s390-tdep.c          | 3390 ----------------------------------------------
>  gdb/s390-tdep.h          |  178 ---
>  11 files changed, 4276 insertions(+), 4276 deletions(-)
>  create mode 100644 gdb/config/s390/linux.mh
>  delete mode 100644 gdb/config/s390/s390.mh
>  create mode 100644 gdb/s390-linux-nat.c
>  create mode 100644 gdb/s390-linux-tdep.c
>  create mode 100644 gdb/s390-linux-tdep.h
>  delete mode 100644 gdb/s390-nat.c
>  delete mode 100644 gdb/s390-tdep.c
>  delete mode 100644 gdb/s390-tdep.h
>
> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> index fc2a3af..a9b3c64 100644
> --- a/gdb/Makefile.in
> +++ b/gdb/Makefile.in
> @@ -586,7 +586,7 @@ ALL_TARGET_OBS = \
>  	rs6000-aix-tdep.o rs6000-tdep.o solib-aix.o ppc-ravenscar-thread.o \
>  	rs6000-lynx178-tdep.o \
>  	rx-tdep.o \
> -	s390-tdep.o \
> +	s390-linux-tdep.o \
>  	score-tdep.o \
>  	sh64-tdep.o sh-linux-tdep.o shnbsd-tdep.o sh-tdep.o \
>  	sparc-linux-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
> @@ -802,7 +802,7 @@ cli/cli-script.h macrotab.h symtab.h common/version.h \
>  gnulib/import/string.in.h gnulib/import/str-two-way.h \
>  gnulib/import/stdint.in.h remote.h remote-notif.h gdb.h sparc-nat.h \
>  gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \
> -amd64-nat.h s390-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
> +amd64-nat.h s390-linux-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
>  gdbarch.h bsd-uthread.h common/gdb_stat.h memory-map.h	memrange.h \
>  mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
>  ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
> @@ -1551,7 +1551,7 @@ ALLDEPFILES = \
>  	rs6000-nat.c rs6000-tdep.c solib-aix.c ppc-ravenscar-thread.c \
>  	rs6000-lynx178-tdep.c \
>  	rx-tdep.c \
> -	s390-tdep.c s390-nat.c \
> +	s390-linux-tdep.c s390-linux-nat.c \
>  	score-tdep.c \
>  	ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
>  	sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
> diff --git a/gdb/config/s390/linux.mh b/gdb/config/s390/linux.mh
> new file mode 100644
> index 0000000..59bab83
> --- /dev/null
> +++ b/gdb/config/s390/linux.mh
> @@ -0,0 +1,8 @@
> +# Host: S390, running Linux
> +NAT_FILE= config/nm-linux.h
> +NATDEPFILES= inf-ptrace.o fork-child.o s390-linux-nat.o \
> +	linux-thread-db.o proc-service.o \
> +	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o linux-ptrace.o \
> +	linux-waitpid.o
> +NAT_CDEPS = $(srcdir)/proc-service.list
> +LOADLIBES = -ldl $(RDYNAMIC)
> diff --git a/gdb/config/s390/s390.mh b/gdb/config/s390/s390.mh
> deleted file mode 100644
> index 76d82e5..0000000
> --- a/gdb/config/s390/s390.mh
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -# Host: S390, running Linux
> -NAT_FILE= config/nm-linux.h
> -NATDEPFILES= inf-ptrace.o fork-child.o s390-nat.o \
> -	linux-thread-db.o proc-service.o \
> -	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o linux-ptrace.o \
> -	linux-waitpid.o
> -NAT_CDEPS = $(srcdir)/proc-service.list
> -LOADLIBES = -ldl $(RDYNAMIC)
> diff --git a/gdb/configure.host b/gdb/configure.host
> index f522376..79c28d2 100644
> --- a/gdb/configure.host
> +++ b/gdb/configure.host
> @@ -149,7 +149,7 @@ powerpc64*-*-linux*)	gdb_host=ppc64-linux
>  			;;
>  powerpc*-*-linux*)	gdb_host=linux ;;
>  
> -s390*-*-*)		gdb_host=s390 ;;
> +s390*-*-*)		gdb_host=linux ;;

Pedantically, maybe you should explicitly match "linux*", as powerpc
does?

>  
>  sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
>  			gdb_host=nbsd ;;
> diff --git a/gdb/configure.tgt b/gdb/configure.tgt
> index ea0faf1..1329edb 100644
> --- a/gdb/configure.tgt
> +++ b/gdb/configure.tgt
> @@ -466,7 +466,7 @@ powerpc*-*-*)
>  
>  s390*-*-*)

Same here.

>  	# Target: S390 running Linux
> -	gdb_target_obs="s390-tdep.o solib-svr4.o linux-tdep.o"
> +	gdb_target_obs="s390-linux-tdep.o solib-svr4.o linux-tdep.o"
>  	build_gdbserver=yes
>  	;;

The rest is OK.

Thanks,

-- 
Sergio


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