This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: filtering of commands during async operation


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
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]