From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AD4LNLPJx2AYUQAAWB0awg (envelope-from ) for ; Mon, 14 Jun 2021 17:27:15 -0400 Received: by simark.ca (Postfix, from userid 112) id D33131F163; Mon, 14 Jun 2021 17:27:15 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D95BB1E54D for ; Mon, 14 Jun 2021 17:27:14 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A740E39730FC for ; Mon, 14 Jun 2021 21:27:14 +0000 (GMT) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by sourceware.org (Postfix) with ESMTPS id 12A2F3973007 for ; Mon, 14 Jun 2021 21:24:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 12A2F3973007 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f48.google.com with SMTP id f2so15976388wri.11 for ; Mon, 14 Jun 2021 14:24:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HjwoiOONOYvX4An0N+Aj7nt1K3qYQg5CK8ALIpgl9eQ=; b=KuOugc+6ErbNIm2jpqnILnmpf0ndVZT6BYslBltnZIC1nPw1Jjb57byZyCPWsVNVqO ifB/DDf+erAW/EHrtO4aO1fVC6JQa6GQcvAaLJR3gBodqNtx86fCNRJhOdpaA+3FBeSY ShRzvBXI97aUYuIxvemgsjpfcnSPsT3HEgAWIJDqi647iJIIgl/GSAaKjb6kk32bLqZ/ wFr02QlxGaBJ1wOB4o7s0T7M2QUwenhnb4spHptxF45MEwSEgfGoWuNjgp7gZXDFgzmx IUkL77cfppoj7NnssYQZYTezZtEtM9oMWydG3Sb9C7H0cTq/cJ5KpewSaSnl31qR/WOt h2Xw== X-Gm-Message-State: AOAM531kzvqxn34LtIX0i6X89f5VEvjid9DRg6wcRk47qK2wfiLiB/XB UUmSeZl+oM3c8zycDjRqVBVT5kvdrKITFw== X-Google-Smtp-Source: ABdhPJwNc/qKVY0mPjhpecD5bGCasbw1j720Kl3mTB2cQisfT2PeF5KOfxkEFln/l9+gnWHpStyNkw== X-Received: by 2002:a5d:5585:: with SMTP id i5mr20477922wrv.371.1623705874511; Mon, 14 Jun 2021 14:24:34 -0700 (PDT) Received: from localhost ([2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3]) by smtp.gmail.com with ESMTPSA id g12sm13255398wrm.47.2021.06.14.14.24.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Jun 2021 14:24:33 -0700 (PDT) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH v2 11/16] Move scoped_ignore_sigttou to gdbsupport/ Date: Mon, 14 Jun 2021 22:24:05 +0100 Message-Id: <20210614212410.1612666-12-pedro@palves.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210614212410.1612666-1-pedro@palves.net> References: <20210614212410.1612666-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" A following patch will want to use scoped_ignore_sigttou in code shared between GDB and GDBserver. Move it under gdbsupport/. Note that despite what inflow.h/inflow.c's first line says, inflow.c is no longer about ptrace, it is about terminal management. Some other files were unnecessarily including inflow.h, I guess a leftover from the days when inflow.c really was about ptrace. Those inclusions are simply dropped. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * Makefile.in (HFILES_NO_SRCDIR): Remove inflow.h. * inf-ptrace.c, inflow.c, procfs.c: Don't include "inflow.h". * inflow.h: Delete, moved to gdbsupport/ under a different name. * ser-unix.c: Don't include "inflow.h". Include "gdbsupport/scoped_ignore_sigttou.h". gdbsupport/ChangeLog: yyyy-mm-dd Pedro Alves * scoped_ignore_sigttou.h: New file, moved from gdb/ and renamed. Change-Id: Ie390abf42c3a78bec6d282ad2a63edd3e623559a --- gdb/Makefile.in | 1 - gdb/inf-ptrace.c | 1 - gdb/inflow.c | 2 +- gdb/procfs.c | 1 - gdb/ser-unix.c | 2 +- gdb/inflow.h => gdbsupport/scoped_ignore_sigttou.h | 8 ++++---- 6 files changed, 6 insertions(+), 9 deletions(-) rename gdb/inflow.h => gdbsupport/scoped_ignore_sigttou.h (90%) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index f664d964536..000d5f950c7 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1336,7 +1336,6 @@ HFILES_NO_SRCDIR = \ inf-ptrace.h \ infcall.h \ inferior.h \ - inflow.h \ inline-frame.h \ interps.h \ jit.h \ diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index b6fa71fd2c0..afa38de6ef7 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -20,7 +20,6 @@ #include "defs.h" #include "command.h" #include "inferior.h" -#include "inflow.h" #include "terminal.h" #include "gdbcore.h" #include "regcache.h" diff --git a/gdb/inflow.c b/gdb/inflow.c index 15f29dcd08e..0a9df6054b0 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -29,12 +29,12 @@ #include #include "gdbsupport/gdb_select.h" -#include "inflow.h" #include "gdbcmd.h" #ifdef HAVE_TERMIOS_H #include #endif #include "gdbsupport/job-control.h" +#include "gdbsupport/scoped_ignore_sigttou.h" #ifdef HAVE_SYS_IOCTL_H #include diff --git a/gdb/procfs.c b/gdb/procfs.c index 23c0aa22a7a..529ee33df90 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -40,7 +40,6 @@ #include #include #include "gdb_bfd.h" -#include "inflow.h" #include "auxv.h" #include "procfs.h" #include "observable.h" diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index e97dc2f925d..96d024eea3d 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -32,7 +32,7 @@ #include "gdbcmd.h" #include "gdbsupport/filestuff.h" #include -#include "inflow.h" +#include "gdbsupport/scoped_ignore_sigttou.h" struct hardwire_ttystate { diff --git a/gdb/inflow.h b/gdbsupport/scoped_ignore_sigttou.h similarity index 90% rename from gdb/inflow.h rename to gdbsupport/scoped_ignore_sigttou.h index 8a671c7c4c7..a31316460b4 100644 --- a/gdb/inflow.h +++ b/gdbsupport/scoped_ignore_sigttou.h @@ -1,4 +1,4 @@ -/* Low level interface to ptrace, for GDB when running under Unix. +/* Support for signoring SIGTTOU. Copyright (C) 2003-2021 Free Software Foundation, Inc. @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef INFLOW_H -#define INFLOW_H +#ifndef SCOPED_IGNORE_SIGTTOU_H +#define SCOPED_IGNORE_SIGTTOU_H #include #include @@ -53,4 +53,4 @@ class scoped_ignore_sigttou #endif }; -#endif /* inflow.h */ +#endif /* SCOPED_IGNORE_SIGTTOU_H */ -- 2.26.2