1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Implementation of 'setCurrentThread' and 'switchToFrame' functions.

This commit is contained in:
Mikhail Khodjaiants 2002-09-20 20:05:27 +00:00
parent 51e4d9609a
commit 5bd058f701
3 changed files with 23 additions and 3 deletions

View file

@ -1751,7 +1751,7 @@ public class CDebugTarget extends CDebugElement
Iterator it = fRegisterGroups.iterator();
while( it.hasNext() )
{
((CRegisterGroup)it.next()).preserve();
((CRegisterGroup)it.next()).resetChangeFlags();
}
}
@ -1832,9 +1832,17 @@ public class CDebugTarget extends CDebugElement
*/
public void setCurrentThread( IThread thread ) throws DebugException
{
if ( !isAvailable() )
if ( !isAvailable() || thread == null || !(thread instanceof CThread) )
{
return;
}
try
{
getCDITarget().setCurrentThread( ((CThread)thread).getCDIThread() );
}
catch( CDIException e )
{
targetRequestFailed( e.getMessage(), null );
}
}
}

View file

@ -151,7 +151,7 @@ public class CRegisterGroup extends CDebugElement implements IRegisterGroup
}
}
protected void preserve()
protected void resetChangeFlags()
{
if ( fRegisters == null )
return;

View file

@ -963,5 +963,17 @@ public class CThread extends CDebugElement
*/
public void switchToFrame( IStackFrame frame ) throws DebugException
{
if ( frame == null && !(frame instanceof CStackFrame) )
{
return;
}
try
{
getCDIThread().setCurrentStackFrame( ((CStackFrame)frame).getCDIStackFrame() );
}
catch( CDIException e )
{
targetRequestFailed( e.getMessage(), null );
}
}
}