mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +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();
|
Iterator it = fRegisterGroups.iterator();
|
||||||
while( it.hasNext() )
|
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
|
public void setCurrentThread( IThread thread ) throws DebugException
|
||||||
{
|
{
|
||||||
if ( !isAvailable() )
|
if ( !isAvailable() || thread == null || !(thread instanceof CThread) )
|
||||||
{
|
{
|
||||||
return;
|
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 )
|
if ( fRegisters == null )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -963,5 +963,17 @@ public class CThread extends CDebugElement
|
||||||
*/
|
*/
|
||||||
public void switchToFrame( IStackFrame frame ) throws DebugException
|
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