From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20282 invoked by alias); 15 Dec 2008 13:43:41 -0000 Received: (qmail 20209 invoked by uid 22791); 15 Dec 2008 13:43:40 -0000 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Dec 2008 13:43:05 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 6AF232900A4; Mon, 15 Dec 2008 14:43:02 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZYxDh49gNdYg; Mon, 15 Dec 2008 14:43:01 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.0.139]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 9CE3B290050; Mon, 15 Dec 2008 14:43:01 +0100 (CET) Cc: Pedro Alves Message-Id: <52A66C65-9D80-45DF-9610-3E7B8ACBC318@adacore.com> From: Tristan Gingold To: gdb-patches@sourceware.org In-Reply-To: <200812111702.32346.pedro@codesourcery.com> Content-Type: multipart/mixed; boundary=Apple-Mail-2--214202723 Mime-Version: 1.0 (Apple Message framework v929.2) Subject: [RFA]: Remove target_activity_function/target_activity_fd. Date: Mon, 15 Dec 2008 13:43:00 -0000 References: <9A0993B6-A696-4A2E-99B8-0112F0AF6089@adacore.com> <200812111702.32346.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00282.txt.bz2 --Apple-Mail-2--214202723 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1025 Hi, > In any case, given that at least two people have lost time trying > to understand what good was this for, I say we nuke it, and get rid > of *_sigio_trap in the process as well, which has calls that have been > propagated to several targets by now. the attached patch remove this unused piece of code. Recompiled on x86/gnu-linux and no more instances found by grep. Tristan. 2008-12-15 Tristan Gingold * inflow.c: Remove old_sigio, handle_sigio, old_fcntl_flags, set_sigio_trap, clear_sigio_trap definitions. * inferior.h: Remove set_sigio_trap and clear_sigio_trap declarations. * inf-ptrace.c (inf_ptrace_wait): Remove call to set_sigio_trap and clear_sigio_trap. * inf-ttrace.c (inf_ttrace_wait): Ditto. * linux-nat.c (linux_nat_wait): Ditto. * spu-linux-nat.c (spu_child_wait): Ditto. * rs6000-nat.c (rs6000_wait): Ditto. * target.c: Remove target_activity_function and target_activity_fd. * target.h: Remove target_activity_function and target_activity_fd declarations. --Apple-Mail-2--214202723 Content-Disposition: attachment; filename=sigio.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="sigio.diff" Content-Transfer-Encoding: quoted-printable Content-length: 9757 ? sigio.diff=0A= Index: inf-ptrace.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/inf-ptrace.c,v=0A= retrieving revision 1.51=0A= diff -u -p -r1.51 inf-ptrace.c=0A= --- inf-ptrace.c 11 Dec 2008 19:19:12 -0000 1.51=0A= +++ inf-ptrace.c 15 Dec 2008 13:28:44 -0000=0A= @@ -389,7 +389,6 @@ inf_ptrace_wait (ptid_t ptid, struct tar=0A= do=0A= {=0A= set_sigint_trap ();=0A= - set_sigio_trap ();=0A= =20=0A= do=0A= {=0A= @@ -398,7 +397,6 @@ inf_ptrace_wait (ptid_t ptid, struct tar=0A= }=0A= while (pid =3D=3D -1 && errno =3D=3D EINTR);=0A= =20=0A= - clear_sigio_trap ();=0A= clear_sigint_trap ();=0A= =20=0A= if (pid =3D=3D -1)=0A= Index: inf-ttrace.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/inf-ttrace.c,v=0A= retrieving revision 1.38=0A= diff -u -p -r1.38 inf-ttrace.c=0A= --- inf-ttrace.c 9 Nov 2008 11:27:17 -0000 1.38=0A= +++ inf-ttrace.c 15 Dec 2008 13:28:45 -0000=0A= @@ -930,7 +930,6 @@ inf_ttrace_wait (ptid_t ptid, struct tar=0A= do=0A= {=0A= set_sigint_trap ();=0A= - set_sigio_trap ();=0A= =20=0A= if (ttrace_wait (pid, lwpid, TTRACE_WAITOK, &tts, sizeof tts) =3D=3D= -1)=0A= perror_with_name (("ttrace_wait"));=0A= @@ -949,7 +948,6 @@ inf_ttrace_wait (ptid_t ptid, struct tar=0A= tts.tts_event =3D TTEVT_NONE;=0A= }=0A= =20=0A= - clear_sigio_trap ();=0A= clear_sigint_trap ();=0A= }=0A= while (tts.tts_event =3D=3D TTEVT_NONE);=0A= Index: inferior.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/inferior.h,v=0A= retrieving revision 1.116=0A= diff -u -p -r1.116 inferior.h=0A= --- inferior.h 20 Nov 2008 00:35:23 -0000 1.116=0A= +++ inferior.h 15 Dec 2008 13:28:45 -0000=0A= @@ -97,10 +97,6 @@ extern void set_sigint_trap (void);=0A= =20=0A= extern void clear_sigint_trap (void);=0A= =20=0A= -extern void set_sigio_trap (void);=0A= -=0A= -extern void clear_sigio_trap (void);=0A= -=0A= /* Set/get file name for default use for standard in/out in the inferior. = */=0A= =20=0A= extern void set_inferior_io_terminal (const char *terminal_name);=0A= Index: inflow.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/inflow.c,v=0A= retrieving revision 1.43=0A= diff -u -p -r1.43 inflow.c=0A= --- inflow.c 27 Oct 2008 22:37:20 -0000 1.43=0A= +++ inflow.c 15 Dec 2008 13:28:45 -0000=0A= @@ -651,68 +651,6 @@ clear_sigint_trap (void)=0A= }=0A= }=0A= =0C=0A= -#if defined (SIGIO) && defined (FASYNC) && defined (FD_SET) && defined (F_= SETOWN)=0A= -static void (*old_sigio) ();=0A= -=0A= -static void=0A= -handle_sigio (int signo)=0A= -{=0A= - int numfds;=0A= - fd_set readfds;=0A= -=0A= - signal (SIGIO, handle_sigio);=0A= -=0A= - FD_ZERO (&readfds);=0A= - FD_SET (target_activity_fd, &readfds);=0A= - numfds =3D gdb_select (target_activity_fd + 1, &readfds, NULL, NULL, NUL= L);=0A= - if (numfds >=3D 0 && FD_ISSET (target_activity_fd, &readfds))=0A= - {=0A= -#ifndef _WIN32=0A= - if ((*target_activity_function) ())=0A= - kill (PIDGET (inferior_ptid), SIGINT);=0A= -#endif=0A= - }=0A= -}=0A= -=0A= -static int old_fcntl_flags;=0A= -=0A= -void=0A= -set_sigio_trap (void)=0A= -{=0A= - if (target_activity_function)=0A= - {=0A= - old_sigio =3D (void (*)()) signal (SIGIO, handle_sigio);=0A= - fcntl (target_activity_fd, F_SETOWN, getpid ());=0A= - old_fcntl_flags =3D fcntl (target_activity_fd, F_GETFL, 0);=0A= - fcntl (target_activity_fd, F_SETFL, old_fcntl_flags | FASYNC);=0A= - }=0A= -}=0A= -=0A= -void=0A= -clear_sigio_trap (void)=0A= -{=0A= - if (target_activity_function)=0A= - {=0A= - signal (SIGIO, old_sigio);=0A= - fcntl (target_activity_fd, F_SETFL, old_fcntl_flags);=0A= - }=0A= -}=0A= -#else /* No SIGIO. */=0A= -void=0A= -set_sigio_trap (void)=0A= -{=0A= - if (target_activity_function)=0A= - internal_error (__FILE__, __LINE__, _("failed internal consistency che= ck"));=0A= -}=0A= -=0A= -void=0A= -clear_sigio_trap (void)=0A= -{=0A= - if (target_activity_function)=0A= - internal_error (__FILE__, __LINE__, _("failed internal consistency che= ck"));=0A= -}=0A= -#endif /* No SIGIO. */=0A= -=0C=0A= =20=0A= /* Create a new session if the inferior will run in a different tty.=0A= A session is UNIX's way of grouping processes that share a controlling= =0A= Index: linux-nat.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/linux-nat.c,v=0A= retrieving revision 1.111=0A= diff -u -p -r1.111 linux-nat.c=0A= --- linux-nat.c 2 Dec 2008 07:57:36 -0000 1.111=0A= +++ linux-nat.c 15 Dec 2008 13:28:45 -0000=0A= @@ -2868,7 +2868,6 @@ retry:=0A= {=0A= /* Causes SIGINT to be passed on to the attached process. */=0A= set_sigint_trap ();=0A= - set_sigio_trap ();=0A= }=0A= =20=0A= while (status =3D=3D 0)=0A= @@ -2937,10 +2936,7 @@ retry:=0A= }=0A= =20=0A= if (!target_can_async_p ())=0A= - {=0A= - clear_sigio_trap ();=0A= - clear_sigint_trap ();=0A= - }=0A= + clear_sigint_trap ();=0A= =20=0A= gdb_assert (lp);=0A= =20=0A= Index: rs6000-nat.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/rs6000-nat.c,v=0A= retrieving revision 1.82=0A= diff -u -p -r1.82 rs6000-nat.c=0A= --- rs6000-nat.c 11 Dec 2008 19:19:12 -0000 1.82=0A= +++ rs6000-nat.c 15 Dec 2008 13:28:45 -0000=0A= @@ -525,7 +525,6 @@ rs6000_wait (ptid_t ptid, struct target_=0A= do=0A= {=0A= set_sigint_trap ();=0A= - set_sigio_trap ();=0A= =20=0A= do=0A= {=0A= @@ -534,7 +533,6 @@ rs6000_wait (ptid_t ptid, struct target_=0A= }=0A= while (pid =3D=3D -1 && errno =3D=3D EINTR);=0A= =20=0A= - clear_sigio_trap ();=0A= clear_sigint_trap ();=0A= =20=0A= if (pid =3D=3D -1)=0A= Index: spu-linux-nat.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/spu-linux-nat.c,v=0A= retrieving revision 1.15=0A= diff -u -p -r1.15 spu-linux-nat.c=0A= --- spu-linux-nat.c 11 Dec 2008 19:19:12 -0000 1.15=0A= +++ spu-linux-nat.c 15 Dec 2008 13:28:45 -0000=0A= @@ -414,7 +414,6 @@ spu_child_wait (ptid_t ptid, struct targ=0A= {=0A= set_sigint_trap (); /* Causes SIGINT to be passed on to the=0A= attached process. */=0A= - set_sigio_trap ();=0A= =20=0A= pid =3D waitpid (PIDGET (ptid), &status, 0);=0A= if (pid =3D=3D -1 && errno =3D=3D ECHILD)=0A= @@ -431,7 +430,6 @@ spu_child_wait (ptid_t ptid, struct targ=0A= save_errno =3D EINTR;=0A= }=0A= =20=0A= - clear_sigio_trap ();=0A= clear_sigint_trap ();=0A= }=0A= while (pid =3D=3D -1 && save_errno =3D=3D EINTR);=0A= Index: target.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/target.c,v=0A= retrieving revision 1.192=0A= diff -u -p -r1.192 target.c=0A= --- target.c 2 Dec 2008 07:57:36 -0000 1.192=0A= +++ target.c 15 Dec 2008 13:28:46 -0000=0A= @@ -2475,10 +2475,6 @@ store_waitstatus (struct target_waitstat=0A= }=0A= }=0A= =0C=0A= -/* Returns zero to leave the inferior alone, one to interrupt it. */=0A= -int (*target_activity_function) (void);=0A= -int target_activity_fd;=0A= -=0C=0A= /* Convert a normal process ID to a string. Returns the string in a=0A= static buffer. */=0A= =20=0A= Index: target.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/target.h,v=0A= retrieving revision 1.137=0A= diff -u -p -r1.137 target.h=0A= --- target.h 2 Dec 2008 15:52:15 -0000 1.137=0A= +++ target.h 15 Dec 2008 13:28:46 -0000=0A= @@ -299,15 +299,6 @@ extern void get_target_memory (struct ta=0A= extern ULONGEST get_target_memory_unsigned (struct target_ops *ops,=0A= CORE_ADDR addr, int len);=0A= =0C=0A= -=0A= -/* If certain kinds of activity happen, target_wait should perform=0A= - callbacks. */=0A= -/* Right now we just call (*TARGET_ACTIVITY_FUNCTION) if I/O is possible= =0A= - on TARGET_ACTIVITY_FD. */=0A= -extern int target_activity_fd;=0A= -/* Returns zero to leave the inferior alone, one to interrupt it. */=0A= -extern int (*target_activity_function) (void);=0A= -=0C=0A= struct thread_info; /* fwd decl for parameter list below: */=0A= =20=0A= struct target_ops=0A= --Apple-Mail-2--214202723 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1 --Apple-Mail-2--214202723--