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:
parent
51e4d9609a
commit
5bd058f701
3 changed files with 23 additions and 3 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ public class CRegisterGroup extends CDebugElement implements IRegisterGroup
|
|||
}
|
||||
}
|
||||
|
||||
protected void preserve()
|
||||
protected void resetChangeFlags()
|
||||
{
|
||||
if ( fRegisters == null )
|
||||
return;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue