From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32292 invoked by alias); 6 Nov 2003 14:32:32 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 32284 invoked from network); 6 Nov 2003 14:32:32 -0000 Received: from unknown (HELO mailgw3a.lmco.com) (192.35.35.7) by sources.redhat.com with SMTP; 6 Nov 2003 14:32:32 -0000 Received: from emss04g01.ems.lmco.com ([166.17.13.122]) by mailgw3a.lmco.com (8.11.6p2/8.11.6) with ESMTP id hA6EWU810161; Thu, 6 Nov 2003 09:32:30 -0500 (EST) Received: from CONVERSION-DAEMON.lmco.com by lmco.com (PMDF V6.1-1X6 #30760) id <0HNX00G01PQ1DC@lmco.com>; Thu, 06 Nov 2003 09:32:25 -0500 (EST) Received: from EMSS04I00.us.lmco.com ([166.17.13.135]) by lmco.com (PMDF V6.1-1X6 #30760) with ESMTP id <0HNX00BU0PQ0SY@lmco.com>; Thu, 06 Nov 2003 09:32:24 -0500 (EST) Received: from EMSS04M11.us.lmco.com ([144.219.10.27]) by EMSS04I00.us.lmco.com with Microsoft SMTPSVC(5.0.2195.2966); Thu, 06 Nov 2003 09:32:24 -0500 Date: Thu, 06 Nov 2003 14:32:00 -0000 From: "Newman, Mark (N-Superior Technical Resource Inc)" Subject: RE: filtering of commands during async operation To: Elena Zannoni , Grant Edwards Cc: Doug Evans , gdb@sources.redhat.com Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft Exchange V6.0.6487.1 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 06 Nov 2003 14:32:24.0771 (UTC) FILETIME=[CBBA3130:01C3A472] X-SW-Source: 2003-11/txt/msg00049.txt.bz2 Three things To answer your question about async native I am working on all aspects of async - however at the current time I am concentrating on remote with tracepoints. Next a request - Could you add "tfind", "tdump", "tstart", and "tstop" to the list of acceptable commands? I know that if I am using tracepoints to monitor what is going on in a system I don't want to wait and hope that whatever event I am monitoring for occurs. I want to be able to look at the tracepoints while they are occurring. Finally - would it be better to place a flag in command_list_element and avoid all of the strcmp's altogether? Mark Newman > -----Original Message----- > From: Elena Zannoni [mailto:ezannoni@redhat.com] > Sent: Wednesday, November 05, 2003 6:12 PM > To: Grant Edwards > Cc: Doug Evans; Newman, Mark (N-Superior Technical Resource Inc); > gdb@sources.redhat.com > Subject: Re: filtering of commands during async operation > > > Grant Edwards writes: > > > > > Good example of why it's useful to avoid using ! with strcmp. > > > > > > > The code should be: > > > > > > > > if (event_loop_p && target_can_async_p () && > target_executing) { > > > > if (!(strcmp (c->name, "help") == 0) > > > > && !(strcmp (c->name, "pwd") == 0) > > > > && !(strcmp (c->name, "show") == 0) > > > > && !(strcmp (c->name, "stop") == 0)) { > > > > error ("Cannot execute this command while the > target is running."); > > > > } > > > > } > > > > > > > > Unless someone objects I am going to put in a bug > report and a patch. > > > > > > Why not just strcmp () != 0 > > > > Why not just strcmp() ? > > > > if (strcmp() > > && strcmp() > > && strcmp()) > > > > Whoops. I agree, this is screwed up. I'll just make the fix now, no > need to file a bug report. I am curious, did somebody get async > native to work? So far there is only the remote async target. I do > remember testing this, back 4 years ago, maybe the logic got turned > around at some point. > > I think strcmp != 0 is ok. It is the preferred form in gdb. Is > this in the ARI? mmmm... partially it is. It is not flagged in the > counts though. > > elena > >