From owner-p4-projects@FreeBSD.ORG Sat Mar 27 23:14:45 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 87FBA16A4D0; Sat, 27 Mar 2004 23:14:45 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BE1E16A4CE for ; Sat, 27 Mar 2004 23:14:45 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54FD243D3F for ; Sat, 27 Mar 2004 23:14:45 -0800 (PST) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i2S7EjGe003789 for ; Sat, 27 Mar 2004 23:14:45 -0800 (PST) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i2S7Ei6u003786 for perforce@freebsd.org; Sat, 27 Mar 2004 23:14:44 -0800 (PST) (envelope-from marcel@freebsd.org) Date: Sat, 27 Mar 2004 23:14:44 -0800 (PST) Message-Id: <200403280714.i2S7Ei6u003786@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 49829 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 07:14:46 -0000 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; + } case -1: /* Empty command. Treat as unknown command. */ /* FALLTHROUGH */