This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH 1/3] Avoid find_thread_ptid with null_ptid


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> This patch prepares for the change, by avoiding passing down null_ptid
Pedro> to find_thread_ptid or to functions that naturally use it

Should find_thread_ptid assert this?

Pedro>    if (print_inferior_events)
Pedro> -    printf_unfiltered (_("[New inferior %d (%s)]\n"),
Pedro> -		       inf->num,
Pedro> -		       target_pid_to_str (ptid_t (pid)));
Pedro> +    {
Pedro> +      if (pid != 0)
Pedro> +	printf_unfiltered (_("[New inferior %d (%s)]\n"),
Pedro> +			   inf->num,
Pedro> +			   target_pid_to_str (ptid_t (pid)));
Pedro> +      else
Pedro> +	printf_unfiltered (_("[New inferior %d]\n"), inf->num);

I wonder if it is possible for an RSP implementation to say that the
inferior has PID 0.

Tom


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