From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25024 invoked by alias); 9 Jan 2003 00:56:50 -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 25017 invoked from network); 9 Jan 2003 00:56:49 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by 209.249.29.67 with SMTP; 9 Jan 2003 00:56:49 -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 h090SrB03951 for ; Wed, 8 Jan 2003 19:28:53 -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 h090uan29238; Wed, 8 Jan 2003 19:56:37 -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 h090uaE08213; Wed, 8 Jan 2003 16:56:36 -0800 Message-ID: <3E1CC8C4.600442A9@redhat.com> Date: Thu, 09 Jan 2003 00:56:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: threads and target-function-calls References: <3E1B7829.6B6E8BAF@redhat.com> <3E1C4F29.2070003@redhat.com> <3E1CC6AA.465581D@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00355.txt.bz2 Michael Snyder wrote: > > Andrew Cagney wrote: > > > > > Hey folks, > > > > > > Did you know that (at least on x86 linux), if you have a multi-thread > > > program and you execute a target function call, all the threads get to > > > run? Doesn't that seem like a bad thing? Wouldn't we really rather > > > only run the thread that is executing the target function call? > > > > Ha! That's just the start. Doing nested inferior function calls on > > alternative threads scrables the dummy frame cache: > > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=468 > > But... that's just sick. ;-( > Wait -- you can't do that. It isn't meaningful to change threads > and then continue/whatever. It assumes gdb has more control over > scheduling than it actually has. Oh, I think I misunderstood. You have in mind this: (gdb) print foo() [switching thread to xyz] Breakpoint 2 in foo () (gdb) print bar() not this: (gdb) print foo () breakpoint 2 in foo() (gdb) thread xyz (gdb) print bar() right?