Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2004 17:24:17 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        Marcel Moolenaar <marcel@FreeBSD.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 49829 for review
Message-ID:  <200403311724.17608.jhb@FreeBSD.org>
In-Reply-To: <200403280714.i2S7Ei6u003786@repoman.freebsd.org>
References:  <200403280714.i2S7Ei6u003786@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 28 March 2004 02:14 am, Marcel Moolenaar wrote:
> http://perforce.freebsd.org/chv.cgi?CH=49829
>
> Change 49829 by marcel@marcel_nfs on 2004/03/27 23:14:33
>
> 	Handle the T command. It's sent by gdb to check if a thread
> 	is alive. The command is sent prior to switching to that
> 	thread. This allows us to switch threads in gdb.
>
> Affected files ...
>
> .. //depot/projects/gdb/sys/gdb/gdb_main.c#10 edit
>
> Differences ...
>
> ==== //depot/projects/gdb/sys/gdb/gdb_main.c#10 (text+ko) ====
>
> @@ -193,6 +193,18 @@
>  			kdb_cpu_set_singlestep();
>  			return (1);
>  		}
> +		case 'T': {
> +			intmax_t tid;
> +			pid_t curtid;
> +			gdb_rx_varhex(&tid);
> +			curtid = kdb_thread->td_tid;
> +			if (kdb_set_thread(tid))
> +				gdb_tx_ok();
> +			else
> +				gdb_tx_err(ENOENT);
> +			kdb_set_thread(tid);
> +			break;
> +		}

Don't you want to switch back to curtid here?

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403311724.17608.jhb>