From owner-freebsd-threads@FreeBSD.ORG Tue Dec 5 06:52:26 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 391DE16A40F for ; Tue, 5 Dec 2006 06:52:26 +0000 (UTC) (envelope-from vaidehi.shukla@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AAC543C9D for ; Tue, 5 Dec 2006 06:51:48 +0000 (GMT) (envelope-from vaidehi.shukla@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so126309nfc for ; Mon, 04 Dec 2006 22:52:24 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=taSEXH0y4PePtD0twioT+Yum1nmeyusuyXAkVOlESKb7kHrxu6xFPt27Em86oOKAyQqWon03MRJKt4ZDDs0gHF8reVeiMZTlt4gjF6lSnSw7XgwVSwlxiXP5z3+xYooA4K5A4q9ZBeDXRa8VRfRjLwvQspDzKZAs5KlEr6hJ+Ls= Received: by 10.82.172.15 with SMTP id u15mr944339bue.1165301544277; Mon, 04 Dec 2006 22:52:24 -0800 (PST) Received: by 10.82.127.11 with HTTP; Mon, 4 Dec 2006 22:52:24 -0800 (PST) Message-ID: <90242b1f0612042252p25ccca99i54a19d0f288e826c@mail.gmail.com> Date: Tue, 5 Dec 2006 12:22:24 +0530 From: "Vaidehi Shukla" To: freebsd-threads MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Debugging threaded application X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2006 06:52:26 -0000 Hi, Here I've written following gdb macro: define thbt info threads set $_count=1 while ( $_count < 3 ) thread $_count bt set $_count++ end end document thbt Display backtrack of all the threads end 'thread $_count' command returns error: (gdb) thread $_count Thread ID 0 not known. Use the "info threads" command to see the IDs of currently known threads. Means 'thread' command doesn't understand shell variable. Other commands like 'print' works properly with shell variable. I'm using '4.18' gdb version. Let me know if anybody has some idea why it's not working and how to make it correct. Regards, Vaidehi