From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0g4w-0002H2-Tm for qemu-devel@nongnu.org; Wed, 21 Oct 2009 14:38:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0g4t-0002Ej-Cy for qemu-devel@nongnu.org; Wed, 21 Oct 2009 14:38:34 -0400 Received: from [199.232.76.173] (port=42265 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0g4s-0002Ee-07 for qemu-devel@nongnu.org; Wed, 21 Oct 2009 14:38:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39771) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0g4r-0001D3-Fl for qemu-devel@nongnu.org; Wed, 21 Oct 2009 14:38:29 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9LIcSA0007831 for ; Wed, 21 Oct 2009 14:38:28 -0400 Message-ID: <4ADF5516.9070301@redhat.com> Date: Wed, 21 Oct 2009 20:38:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20091008203740.GA20727@redhat.com> <1256063981.27918.6.camel@blaa> <4ADE0809.2050500@redhat.com> <20091021154234.GA24913@redhat.com> <4ADF44D6.5040207@redhat.com> <20091021173516.GA25112@redhat.com> <4ADF486E.9080807@redhat.com> <20091021174651.GA25166@redhat.com> In-Reply-To: <20091021174651.GA25166@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] qemu: work around for "posix-aio-compat" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Mark McLoughlin , qemu-devel@nongnu.org >> At every word of the sigset (using gdb commands to disable/enable the >> watchpoints around the sigfillset, you avoid spurious triggers). > > Not sure how do you mean. When would I enable the watchpoint? 301 static void *aio_thread(void *unused) 302 { 303 pid_t pid; 304 static sigset_t set; 305 306 /* block all signals */ ... 312 if (sigfillset(&set)) die("sigfillset"); .... 315 pid = getpid(); 316 317 while (1) { b 312 // sets bp 1 p ((long *)&set // prints $1 watch $1[0] // sets bp 2..9 watch $1[1] watch $1[2] watch $1[3] watch $1[4] watch $1[5] watch $1[6] watch $1[7] // only 1/4 of the sigset! // stop earlier if it starts // assigning non-hardware watchpoints // try again with 8..15 if not enough // up to $1[31] commands 1 // don't break on next sigfillset dis 2 dis 3 dis 4 dis 5 dis 6 dis 7 dis 8 dis 9 c // and continue end b 315 // sets bp 10 commands 10 // re-enable after sigfillset ena 2 ena 3 ena 4 ena 5 ena 6 ena 7 ena 8 ena 9 c // run body of aio_thread end c // run into aio_thread Paolo