public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c
@ 2021-11-16  3:04 Simon Marchi
  2021-11-16  3:04 ` [PATCH 2/2] gdb: move AIX_TEXT_SEGMENT_BASE to rs6000-aix-tdep.c, remove rs6000-tdep.h Simon Marchi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Simon Marchi @ 2021-11-16  3:04 UTC (permalink / raw)
  To: gdb-patches

This file seems to be AIX-specific, according to its contents and
configure.nat.  Rename it to rs6000-aix-nat.c, to make that clear (and
to follow the convention).

Change-Id: Ib418dddc6b79b2e28f64431121742b5e87f5f4f5
---
 gdb/Makefile.in                        | 2 +-
 gdb/configure.nat                      | 2 +-
 gdb/{rs6000-nat.c => rs6000-aix-nat.c} | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename gdb/{rs6000-nat.c => rs6000-aix-nat.c} (100%)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index a51d63755ef9..5e6d74e455e6 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2288,8 +2288,8 @@ ALLDEPFILES = \
 	riscv-ravenscar-thread.c \
 	riscv-tdep.c \
 	rl78-tdep.c \
+	rs6000-aix-nat.c \
 	rs6000-lynx178-tdep.c \
-	rs6000-nat.c \
 	rs6000-tdep.c \
 	rx-tdep.c \
 	s390-linux-nat.c \
diff --git a/gdb/configure.nat b/gdb/configure.nat
index d42cf13e691b..bdd05032602e 100644
--- a/gdb/configure.nat
+++ b/gdb/configure.nat
@@ -103,7 +103,7 @@ case ${gdb_host} in
 		# Host: IBM PowerPC running AIX aix-thread.o is not
 		# listed in NATDEPFILES as it is pulled in by
 		# configure.
-		NATDEPFILES="${NATDEPFILES} rs6000-nat.o"
+		NATDEPFILES="${NATDEPFILES} rs6000-aix-nat.o"
 
 		# When compiled with cc, for debugging, this argument
 		# should be passed.  We have no idea who our current
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-aix-nat.c
similarity index 100%
rename from gdb/rs6000-nat.c
rename to gdb/rs6000-aix-nat.c
-- 
2.33.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] gdb: move AIX_TEXT_SEGMENT_BASE to rs6000-aix-tdep.c, remove rs6000-tdep.h
  2021-11-16  3:04 [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c Simon Marchi
@ 2021-11-16  3:04 ` Simon Marchi
  2021-11-16 17:02 ` [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c John Baldwin
  2021-11-18 15:41 ` Tom Tromey
  2 siblings, 0 replies; 7+ messages in thread
From: Simon Marchi @ 2021-11-16  3:04 UTC (permalink / raw)
  To: gdb-patches

The contents of rs6000-tdep.h (AIX_TEXT_SEGMENT_BASE) is AIX-specific,
so I thought that this file should be named rs6000-aix-tdep.h.  But
there's already a rs6000-aix-tdep.h, so then I though
AIX_TEXT_SEGMENT_BASE should simply be moved there, and rs6000-tdep.h
deleted.  But then I realized that AIX_TEXT_SEGMENT_BASE is only used in
rs6000-aix-tdep.c, so move it to the beginning of that file.

I can't build-test this change, if somebody can do it I would greatly
appreciate it.

Change-Id: Ia212c6fae202f31aedb46575821cd642beeda7a3
---
 gdb/Makefile.in       |  1 -
 gdb/rs6000-aix-nat.c  |  1 -
 gdb/rs6000-aix-tdep.c |  4 +++-
 gdb/rs6000-tdep.h     | 24 ------------------------
 4 files changed, 3 insertions(+), 27 deletions(-)
 delete mode 100644 gdb/rs6000-tdep.h

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 5e6d74e455e6..af8f1ccbdc13 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1418,7 +1418,6 @@ HFILES_NO_SRCDIR = \
 	riscv-ravenscar-thread.h \
 	riscv-tdep.h \
 	rs6000-aix-tdep.h \
-	rs6000-tdep.h \
 	run-on-main-thread.h \
 	s390-linux-tdep.h \
 	s390-tdep.h \
diff --git a/gdb/rs6000-aix-nat.c b/gdb/rs6000-aix-nat.c
index c266c50777f2..72e59e5e4844 100644
--- a/gdb/rs6000-aix-nat.c
+++ b/gdb/rs6000-aix-nat.c
@@ -30,7 +30,6 @@
 #include "inf-child.h"
 #include "inf-ptrace.h"
 #include "ppc-tdep.h"
-#include "rs6000-tdep.h"
 #include "rs6000-aix-tdep.h"
 #include "exec.h"
 #include "observable.h"
diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c
index 11cae6ad4bce..ce5afb784502 100644
--- a/gdb/rs6000-aix-tdep.c
+++ b/gdb/rs6000-aix-tdep.c
@@ -30,7 +30,6 @@
 #include "infcall.h"
 #include "objfiles.h"
 #include "breakpoint.h"
-#include "rs6000-tdep.h"
 #include "ppc-tdep.h"
 #include "rs6000-aix-tdep.h"
 #include "xcoffread.h"
@@ -66,6 +65,9 @@
 /* STKMIN64+grp1 offset. 112+56=168 */
 #define SIG_FRAME_FP_OFFSET64 168
 
+/* Minimum possible text address in AIX.  */
+#define AIX_TEXT_SEGMENT_BASE 0x10000000
+
 static struct trad_frame_cache *
 aix_sighandle_frame_cache (struct frame_info *this_frame,
 			   void **this_cache)
diff --git a/gdb/rs6000-tdep.h b/gdb/rs6000-tdep.h
deleted file mode 100644
index ecebac9950d3..000000000000
--- a/gdb/rs6000-tdep.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 2006-2021 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef RS6000_TDEP_H
-#define RS6000_TDEP_H
-
-/* Minimum possible text address in AIX.  */
-#define AIX_TEXT_SEGMENT_BASE 0x10000000
-
-#endif /* RS6000_TDEP_H */
-- 
2.33.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c
  2021-11-16  3:04 [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c Simon Marchi
  2021-11-16  3:04 ` [PATCH 2/2] gdb: move AIX_TEXT_SEGMENT_BASE to rs6000-aix-tdep.c, remove rs6000-tdep.h Simon Marchi
@ 2021-11-16 17:02 ` John Baldwin
  2021-11-18 15:41 ` Tom Tromey
  2 siblings, 0 replies; 7+ messages in thread
From: John Baldwin @ 2021-11-16 17:02 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 11/15/21 7:04 PM, Simon Marchi via Gdb-patches wrote:
> This file seems to be AIX-specific, according to its contents and
> configure.nat.  Rename it to rs6000-aix-nat.c, to make that clear (and
> to follow the convention).

I can't test either of the patches in this series, but they both look
ok to me via the eyeball test.

-- 
John Baldwin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c
  2021-11-16  3:04 [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c Simon Marchi
  2021-11-16  3:04 ` [PATCH 2/2] gdb: move AIX_TEXT_SEGMENT_BASE to rs6000-aix-tdep.c, remove rs6000-tdep.h Simon Marchi
  2021-11-16 17:02 ` [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c John Baldwin
@ 2021-11-18 15:41 ` Tom Tromey
  2021-11-18 16:32   ` Simon Marchi
  2 siblings, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2021-11-18 15:41 UTC (permalink / raw)
  To: Simon Marchi via Gdb-patches

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> This file seems to be AIX-specific, according to its contents and
Simon> configure.nat.  Rename it to rs6000-aix-nat.c, to make that clear (and
Simon> to follow the convention).

I don't really mind but I think Ulrich should perhaps weigh in.

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c
  2021-11-18 15:41 ` Tom Tromey
@ 2021-11-18 16:32   ` Simon Marchi
  2021-11-18 19:40     ` Ulrich Weigand
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2021-11-18 16:32 UTC (permalink / raw)
  To: Tom Tromey, Simon Marchi via Gdb-patches; +Cc: Ulrich Weigand

On 2021-11-18 10:41 a.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> This file seems to be AIX-specific, according to its contents and
> Simon> configure.nat.  Rename it to rs6000-aix-nat.c, to make that clear (and
> Simon> to follow the convention).
> 
> I don't really mind but I think Ulrich should perhaps weigh in.
> 
> Tom
> 

CC-ing Ulrich then, there are more chances he'll see this.

Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c
  2021-11-18 16:32   ` Simon Marchi
@ 2021-11-18 19:40     ` Ulrich Weigand
  2021-11-18 21:36       ` Simon Marchi
  0 siblings, 1 reply; 7+ messages in thread
From: Ulrich Weigand @ 2021-11-18 19:40 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Simon Marchi via Gdb-patches, Tom Tromey



"Simon Marchi" <simon.marchi@polymtl.ca> wrote on 18.11.2021 17:32:45:

> On 2021-11-18 10:41 a.m., Tom Tromey wrote:
> >>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-
> patches@sourceware.org> writes:
> >
> > Simon> This file seems to be AIX-specific, according to its contents
and
> > Simon> configure.nat.  Rename it to rs6000-aix-nat.c, to make thatclear
(and
> > Simon> to follow the convention).
> >
> > I don't really mind but I think Ulrich should perhaps weigh in.
> >
> > Tom
> >
>
> CC-ing Ulrich then, there are more chances he'll see this.

Thanks!  I agree this renaming makes sense.

Bye,
Ulrich

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c
  2021-11-18 19:40     ` Ulrich Weigand
@ 2021-11-18 21:36       ` Simon Marchi
  0 siblings, 0 replies; 7+ messages in thread
From: Simon Marchi @ 2021-11-18 21:36 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: Simon Marchi via Gdb-patches, Tom Tromey

On 2021-11-18 2:40 p.m., Ulrich Weigand wrote:
> "Simon Marchi" <simon.marchi@polymtl.ca> wrote on 18.11.2021 17:32:45:
> 
>> On 2021-11-18 10:41 a.m., Tom Tromey wrote:
>> >>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-
>> patches@sourceware.org> writes:
>> >
>> > Simon> This file seems to be AIX-specific, according to its contents and
>> > Simon> configure.nat.  Rename it to rs6000-aix-nat.c, to make thatclear (and
>> > Simon> to follow the convention).
>> >
>> > I don't really mind but I think Ulrich should perhaps weigh in.
>> >
>> > Tom
>> >
>>
>> CC-ing Ulrich then, there are more chances he'll see this.
> 
> Thanks!  I agree this renaming makes sense.
> 
> Bye,
> Ulrich
> 
> 

Thanks, I pushed both patches.

Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-18 21:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  3:04 [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c Simon Marchi
2021-11-16  3:04 ` [PATCH 2/2] gdb: move AIX_TEXT_SEGMENT_BASE to rs6000-aix-tdep.c, remove rs6000-tdep.h Simon Marchi
2021-11-16 17:02 ` [PATCH 1/2] gdb: rename rs6000-nat.c to rs6000-aix-nat.c John Baldwin
2021-11-18 15:41 ` Tom Tromey
2021-11-18 16:32   ` Simon Marchi
2021-11-18 19:40     ` Ulrich Weigand
2021-11-18 21:36       ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).