mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
Changed the 'hasStackFrames' method of the 'CThread' class to return true regardless if the thread contains stack frames or not. This method is only used by UI to update the thread label.
This commit is contained in:
parent
ef856ea3e1
commit
66859771be
2 changed files with 18 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-10-23 Mikhail Khodjaiants
|
||||
Changed the 'hasStackFrames' method of the 'CThread' class to return true regardless if
|
||||
the thread contains stack frames or not. This method is only used by UI to update the thread label.
|
||||
* CThread.java
|
||||
|
||||
2003-10-17 Mikhail Khodjaiants
|
||||
Temporary fix for PR 39061: Attach source does not work for applications compiled in CygWin.
|
||||
* CDirectorySourceLocation.java
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
package org.eclipse.cdt.debug.internal.core.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -140,7 +141,16 @@ public class CThread extends CDebugElement
|
|||
*/
|
||||
public IStackFrame[] getStackFrames() throws DebugException
|
||||
{
|
||||
List list = computeStackFrames();
|
||||
List list = Collections.EMPTY_LIST;
|
||||
try
|
||||
{
|
||||
list = computeStackFrames();
|
||||
}
|
||||
catch( DebugException e )
|
||||
{
|
||||
setStatus( ICDebugElementErrorStatus.ERROR, e.getStatus().getMessage() );
|
||||
throw e;
|
||||
}
|
||||
return (IStackFrame[])list.toArray( new IStackFrame[list.size()] );
|
||||
}
|
||||
|
||||
|
@ -149,16 +159,8 @@ public class CThread extends CDebugElement
|
|||
*/
|
||||
public boolean hasStackFrames() throws DebugException
|
||||
{
|
||||
try
|
||||
{
|
||||
return computeStackFrames().size() > 0;
|
||||
}
|
||||
catch( DebugException e )
|
||||
{
|
||||
// do not throw an exception if the thread resumed while determining
|
||||
// whether stack frames are present
|
||||
}
|
||||
return false;
|
||||
// Always return true to postpone the stack frames request
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue