mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for bug 48682: IThread.getBreakpoints() stubbed out.
This commit is contained in:
parent
2e53b260f0
commit
020ee8aeea
3 changed files with 48 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-01-15 Mikhail Khodjaiants
|
||||
Fix for bug 48682: IThread.getBreakpoints() stubbed out.
|
||||
* CDebugTarget.java
|
||||
* CThread.java
|
||||
|
||||
2003-12-23 Mikhail Khodjaiants
|
||||
Fix for bug 49294: Source file doesn't change when switching between stack frames.
|
||||
Do not use the breakpoint's markers for source lookup.
|
||||
|
|
|
@ -249,6 +249,11 @@ public class CDebugTarget extends CDebugElement
|
|||
*/
|
||||
private boolean fIsDebuggerProcessDefault = false;
|
||||
|
||||
/**
|
||||
* The suspension thread.
|
||||
*/
|
||||
private ICDIThread fSuspensionThread;
|
||||
|
||||
/**
|
||||
* The executable file.
|
||||
*/
|
||||
|
@ -1227,6 +1232,7 @@ public class CDebugTarget extends CDebugElement
|
|||
ICDISessionObject reason = event.getReason();
|
||||
setCurrentStateInfo( reason );
|
||||
setRunningInfo( null );
|
||||
setSuspensionThread();
|
||||
List newThreads = refreshThreads();
|
||||
if ( event.getSource() instanceof ICDITarget )
|
||||
{
|
||||
|
@ -2232,4 +2238,40 @@ public class CDebugTarget extends CDebugElement
|
|||
if ( getBreakpointManager() != null )
|
||||
getBreakpointManager().dispose();
|
||||
}
|
||||
|
||||
protected ICDIThread getSuspensionThread()
|
||||
{
|
||||
return fSuspensionThread;
|
||||
}
|
||||
|
||||
private void setSuspensionThread()
|
||||
{
|
||||
fSuspensionThread = null;
|
||||
try
|
||||
{
|
||||
fSuspensionThread = getCDITarget().getCurrentThread();
|
||||
}
|
||||
catch( CDIException e )
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
protected IBreakpoint[] getThreadBreakpoints( CThread thread )
|
||||
{
|
||||
List list = new ArrayList( 1 );
|
||||
if ( isSuspended() && thread != null &&
|
||||
getSuspensionThread() != null &&
|
||||
getSuspensionThread().equals( thread.getCDIThread() ) )
|
||||
{
|
||||
IBreakpoint bkpt = null;
|
||||
if ( getCurrentStateInfo() instanceof ICDIBreakpointHit )
|
||||
bkpt = getBreakpointManager().getBreakpoint( ((ICDIBreakpointHit)getCurrentStateInfo()).getBreakpoint() );
|
||||
else if ( getCurrentStateInfo() instanceof ICDIWatchpointTrigger )
|
||||
bkpt = getBreakpointManager().getBreakpoint( ((ICDIWatchpointTrigger)getCurrentStateInfo()).getWatchpoint() );
|
||||
if ( bkpt != null )
|
||||
list.add( bkpt );
|
||||
}
|
||||
return (IBreakpoint[])list.toArray( new IBreakpoint[list.size()]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ public class CThread extends CDebugElement
|
|||
*/
|
||||
public IBreakpoint[] getBreakpoints()
|
||||
{
|
||||
return null;
|
||||
return ((CDebugTarget)getDebugTarget()).getThreadBreakpoints( this );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue