Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] AbstractEvent

Greg,

In debug.core/debug.external, I only maintain 2 lists: a list of
registered debug targets (an array of objects) and a list of process
groups (an array of objects). No other lists.

About getProcesses().... I wrote it as a helper method. The only
caller is in debug.ui where it must update the processes with
appropriate icons. Of course, getProcesses() can be moved to debug.ui
to avoid double iterations (iterating the bitset and iterating the int
array).


Donny



On 8/14/05, Greg Watson <gwatson@xxxxxxxx> wrote:
> Donny,
> 
> I noticed that AbstractEvent provides the method:
> 
>      public int[] getProcesses() {
>          int[] retValue = new int[sources.cardinality()];
>          for(int i = sources.nextSetBit(0), j = 0; i >= 0; i =
> sources.nextSetBit(i+1), j++) {
>              retValue[j] = i;
>          }
>          return retValue;
>      }
> 
> 
> Using a bitset is a good idea (that's what I'm using in the external
> debugger) but I'm not sure that converting this to an array of
> integers is a good idea. An array of integers applies you're going to
> iterate over it at some point. Is there any way we can maintain the
> process list as a bitset throughout the debug.core code? We could
> have a class that provides the appropriate accessors, and even
> maintains the TID->Element ID mapping.
> 
> Greg
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>


Back to the top