[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] "ATTACHED" and "attached" in MIInferior
|
>
> Hi,
>
> I noticed yesterday that MIInferior has a boolean "attached" and a state
> flag "ATTACHED". Why two different mechanisms? They are both
> set/cleared/tested at the same times (except in isAttached, where only
> the boolean is tested).
>
> Doesn't MIInferior.isAttached need to also be synchronized?
>
> isTerminated, isSuspended, and isRunning will never evaluate true if
> isAttached is true: the expressions all need to be changed from "return
> state == STATE" to "return (state & STATE) == STATE" or something to mask
> out the other bits.
>
There are 3 type of sessions:
- program
- attached to a prog.
- core file
they can be in different state and depending on the type(core, attach, etc..)
some commands are not allowed. For example destroy() a program
that has been detach etc ...
I'll take a second pass at MIInferior.java to clear this out.
Thanks.