[gdb/tdep] Remove includes of gdbsupport/common-defs.h

Message ID 20241204194059.4872-1-tdevries@suse.de
State Committed
Headers
Series [gdb/tdep] Remove includes of gdbsupport/common-defs.h |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Tom de Vries Dec. 4, 2024, 7:40 p.m. UTC
  In commit 18d2988e5da ("gdb, gdbserver, gdbsupport: remove includes of early
headers") all includes of gdbsupport/common-defs.h where removed, but
commit c1cdee0e2c1 ("gdb: LoongArch: Add support for hardware watchpoint")
reintroduced some.

Fix this by removing them.

Tested by doing this on x86_64-linux:
...
$ make \
    nat/loongarch-hw-point.o \
    nat/loongarch-linux.o \
    nat/loongarch-linux-hw-point.o
  CXX    nat/loongarch-hw-point.o
  CXX    nat/loongarch-linux.o
  CXX    nat/loongarch-linux-hw-point.o
...
---
 gdb/nat/loongarch-hw-point.c       | 1 -
 gdb/nat/loongarch-linux-hw-point.c | 1 -
 gdb/nat/loongarch-linux.c          | 1 -
 3 files changed, 3 deletions(-)


base-commit: e477cdc412a251fb16ce1f1327889a6e0b7b87ed
  

Comments

Simon Marchi Dec. 4, 2024, 8:19 p.m. UTC | #1
On 2024-12-04 14:40, Tom de Vries wrote:
> In commit 18d2988e5da ("gdb, gdbserver, gdbsupport: remove includes of early
> headers") all includes of gdbsupport/common-defs.h where removed, but
> commit c1cdee0e2c1 ("gdb: LoongArch: Add support for hardware watchpoint")
> reintroduced some.
> 
> Fix this by removing them.
> 
> Tested by doing this on x86_64-linux:
> ...
> $ make \
>     nat/loongarch-hw-point.o \
>     nat/loongarch-linux.o \
>     nat/loongarch-linux-hw-point.o
>   CXX    nat/loongarch-hw-point.o
>   CXX    nat/loongarch-linux.o
>   CXX    nat/loongarch-linux-hw-point.o
> ...
> ---
>  gdb/nat/loongarch-hw-point.c       | 1 -
>  gdb/nat/loongarch-linux-hw-point.c | 1 -
>  gdb/nat/loongarch-linux.c          | 1 -
>  3 files changed, 3 deletions(-)
> 
> diff --git a/gdb/nat/loongarch-hw-point.c b/gdb/nat/loongarch-hw-point.c
> index 089f3bd49a9..cf5ddb68d78 100644
> --- a/gdb/nat/loongarch-hw-point.c
> +++ b/gdb/nat/loongarch-hw-point.c
> @@ -18,7 +18,6 @@
>     You should have received a copy of the GNU General Public License
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
> -#include "gdbsupport/common-defs.h"
>  #include "gdbsupport/break-common.h"
>  #include "gdbsupport/common-regcache.h"
>  #include "loongarch-hw-point.h"
> diff --git a/gdb/nat/loongarch-linux-hw-point.c b/gdb/nat/loongarch-linux-hw-point.c
> index fbc80fdc2a1..002553a5b51 100644
> --- a/gdb/nat/loongarch-linux-hw-point.c
> +++ b/gdb/nat/loongarch-linux-hw-point.c
> @@ -18,7 +18,6 @@
>     You should have received a copy of the GNU General Public License
>     along with this program.  If not, see <http://www.gnu.org/licenses/>. */
>  
> -#include "gdbsupport/common-defs.h"
>  #include "gdbsupport/break-common.h"
>  #include "gdbsupport/common-regcache.h"
>  #include "nat/linux-nat.h"
> diff --git a/gdb/nat/loongarch-linux.c b/gdb/nat/loongarch-linux.c
> index 03a0aaf9fd9..9486785a01c 100644
> --- a/gdb/nat/loongarch-linux.c
> +++ b/gdb/nat/loongarch-linux.c
> @@ -18,7 +18,6 @@
>     You should have received a copy of the GNU General Public License
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>  
> -#include "gdbsupport/common-defs.h"
>  #include "gdbsupport/break-common.h"
>  #include "nat/linux-nat.h"
>  #include "nat/loongarch-linux-hw-point.h"
> 
> base-commit: e477cdc412a251fb16ce1f1327889a6e0b7b87ed

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon
  

Patch

diff --git a/gdb/nat/loongarch-hw-point.c b/gdb/nat/loongarch-hw-point.c
index 089f3bd49a9..cf5ddb68d78 100644
--- a/gdb/nat/loongarch-hw-point.c
+++ b/gdb/nat/loongarch-hw-point.c
@@ -18,7 +18,6 @@ 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "gdbsupport/common-defs.h"
 #include "gdbsupport/break-common.h"
 #include "gdbsupport/common-regcache.h"
 #include "loongarch-hw-point.h"
diff --git a/gdb/nat/loongarch-linux-hw-point.c b/gdb/nat/loongarch-linux-hw-point.c
index fbc80fdc2a1..002553a5b51 100644
--- a/gdb/nat/loongarch-linux-hw-point.c
+++ b/gdb/nat/loongarch-linux-hw-point.c
@@ -18,7 +18,6 @@ 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
-#include "gdbsupport/common-defs.h"
 #include "gdbsupport/break-common.h"
 #include "gdbsupport/common-regcache.h"
 #include "nat/linux-nat.h"
diff --git a/gdb/nat/loongarch-linux.c b/gdb/nat/loongarch-linux.c
index 03a0aaf9fd9..9486785a01c 100644
--- a/gdb/nat/loongarch-linux.c
+++ b/gdb/nat/loongarch-linux.c
@@ -18,7 +18,6 @@ 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "gdbsupport/common-defs.h"
 #include "gdbsupport/break-common.h"
 #include "nat/linux-nat.h"
 #include "nat/loongarch-linux-hw-point.h"