From 629f88f80a8ffc795c69773ff576861ea75d6205 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 15 Nov 2021 22:04:21 -0500 Subject: [PATCH] gdb: move AIX_TEXT_SEGMENT_BASE to rs6000-aix-tdep.c, remove rs6000-tdep.h 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. 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 5e6d74e455e..af8f1ccbdc1 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 c266c50777f..72e59e5e484 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 11cae6ad4bc..ce5afb78450 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 ecebac9950d..00000000000 --- 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 . */ - -#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.30.2