This is the mail archive of the gdb-patches@sourceware.org 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: [commit] Fix compile error (Re: [RFA] Async mode fixes.)


On Mon, Mar 17, 2008 at 03:10:32PM +0100, Ulrich Weigand wrote:
> > +  long time_at_cmd_start;
> [snip]
> > +  if (target_can_async_p ())
> > +    {
> > +      time_at_cmd_start = get_run_time ();
> [snip]
> > +  if (target_can_async_p () && target_executing)
> > +    {

> and the compiler error seems somewhat justified as the compiler cannot
> know that target_can_async_p () always returns the same value ...
> 
> Fixed by adding a dummy initializer, as already done for space_at_cmd_start.

Thanks, I was just looking at this.  But it made me wonder: what if
target_can_async_p changes when we execute the command?  For instance,
a "target" command?

Also, it looks like an async command which starts the target will
print out the time it took twice.

-- 
Daniel Jacobowitz
CodeSourcery


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