This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: infttrace.c for hp1.1-hp-hpux11.00


Kevin,

This really looks like tpid_t fall out.  Does the change make sense to you?

	Andrew

> The following patch permits gdb 20010713 to link on hppa1.1-hp-hpux11.00
> - it still doesn't work, hanging starting up the child process.
> Unlike on hpux10.20, a SIGHUP isn't enough for the child to continue.
> A SIGKILL was required to kill the child.
> Getting HP-UX going will need someone that knows what they're doing ...
> 
> 2001-07-22  Rodney Brown  <rbrown64@csc.com.au>
> 
> * infttrace.c (ptrace_wait): Match external declaration,
> 	and match target_post_wait declaration.
> 
> --- infttrace.c.orig	Sun Jul 22 21:48:17 2001
> +++ infttrace.c	Sun Jul 22 21:48:22 2001
> @@ -2596,7 +2596,8 @@ count_unhandled_events (int real_pid, lw
>   *
>   * Note: used by core gdb and so uses the pseudo-pid (really tid).
>   */
> -ptid_t
> +/* ptid_t */
> +int
>  ptrace_wait (ptid_t ptid, int *status)
>  {
>    ttstate_t tsp;
> @@ -2621,13 +2622,15 @@ ptrace_wait (ptid_t ptid, int *status)
>        if (errno == ESRCH)
>  	{
>  	  *status = 0;		/* WIFEXITED */
> -	  return inferior_ptid;
> +	  /* return inferior_ptid; */
> +	  return PIDGET (inferior_ptid);
>  	}
>  
>        warning ("Call of ttrace_wait returned with errno %d.",
>  	       errno);
>        *status = ttwait_return;
> -      return inferior_ptid;
> +      /* return inferior_ptid; */
> +      return PIDGET (inferior_ptid);
>      }
>  
>    real_pid = tsp.tts_pid;
> @@ -2888,7 +2891,7 @@ ptrace_wait (ptid_t ptid, int *status)
>        *status = _SIGTRAP;
>      }
>  
> -  target_post_wait (tsp.tts_pid, *status);
> +  target_post_wait (pid_to_ptid (tsp.tts_pid), *status);
>  
>  
>  #ifdef THREAD_DEBUG
> @@ -2914,7 +2917,8 @@ ptrace_wait (ptid_t ptid, int *status)
>        warning ("Internal error: process-wait failed.");
>      }
>  
> -  return pid_to_ptid (return_pid);
> +  /* return pid_to_ptid (return_pid); */
> +  return return_pid;
>  }
>  
>  
> 
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]