From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10765 invoked by alias); 5 Nov 2002 22:10:38 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10758 invoked from network); 5 Nov 2002 22:10:37 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 5 Nov 2002 22:10:37 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gA5Lm4w26390 for ; Tue, 5 Nov 2002 16:48:04 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gA5MAXl23653; Tue, 5 Nov 2002 17:10:34 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id gA5MASD16721; Tue, 5 Nov 2002 14:10:28 -0800 Message-ID: <3DC841D4.E575221F@redhat.com> Date: Tue, 05 Nov 2002 14:10:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Andrew Cagney CC: gdb-patches@sources.redhat.com Subject: Re: Stand resume() on its head References: <3DC829E3.4090603@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-11/txt/msg00067.txt.bz2 Andrew Cagney wrote: > > Hello, > > There have now been several discussion threads that lead to the > conclusion that > > target->resume (ptid_t, int, enum target_signal) > > needs changing. At present the suggestion is to add a parameter to > indicate schedule locking and similar operations. > > I'd like to propose a different approach. Instead of passing to > resume() what to do, have resume() iterate over all the threads asking > each what it should do - suspend, step, run, signal, ... > > I think, in the end, GDB will need to do something like this any way > (how else is GDB going to handle suspended threads?) so might as well > start earlier rather than later :-) > > (thinking out loud) > Andrew That's probably a good idea. Difficult to know how else to handle large numbers of threads, if we eventually have some sort of suspend/resume functionality. If we do this, though, we should pay attention to efficiency, since it's fairly important that all threads be activated as close to simultaneously as possible.