mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Merged changes from 1.2.1 branch.
This commit is contained in:
parent
5c81a61e91
commit
af45b6d210
2 changed files with 46 additions and 40 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2004-02-16 Mikhail Khodjaiants
|
||||||
|
Fix for bug 52135: Debugger should indicate which thread triggered breakpoint.
|
||||||
|
* CDTDebugModelPresentation.java
|
||||||
|
|
||||||
2004-02-11 Mikhail Khodjaiants
|
2004-02-11 Mikhail Khodjaiants
|
||||||
Fix for bug 51062: Source locator oddness.
|
Fix for bug 51062: Source locator oddness.
|
||||||
* DefualtSourceLocator.java
|
* DefualtSourceLocator.java
|
||||||
|
|
|
@ -13,7 +13,6 @@ import org.eclipse.cdt.core.resources.FileStorage;
|
||||||
import org.eclipse.cdt.debug.core.CDebugUtils;
|
import org.eclipse.cdt.debug.core.CDebugUtils;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit;
|
import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIExitInfo;
|
import org.eclipse.cdt.debug.core.cdi.ICDIExitInfo;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryEvent;
|
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryEvent;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISignalExitInfo;
|
import org.eclipse.cdt.debug.core.cdi.ICDISignalExitInfo;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISignalReceived;
|
import org.eclipse.cdt.debug.core.cdi.ICDISignalReceived;
|
||||||
|
@ -455,41 +454,7 @@ public class CDTDebugModelPresentation extends LabelProvider
|
||||||
return label + ")";
|
return label + ")";
|
||||||
}
|
}
|
||||||
case IState.SUSPENDED:
|
case IState.SUSPENDED:
|
||||||
{
|
return target.getName() + " (Suspended)";
|
||||||
Object info = state.getCurrentStateInfo();
|
|
||||||
if ( info != null && info instanceof ICDISignalReceived )
|
|
||||||
{
|
|
||||||
ICDISignal signal = ((ICDISignalReceived)info).getSignal();
|
|
||||||
String label = target.getName() +
|
|
||||||
MessageFormat.format( " (Signal ''{0}'' received. Description: {1})",
|
|
||||||
new String[] { signal.getName(), signal.getDescription() } );
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
if ( info != null && info instanceof ICDIWatchpointTrigger )
|
|
||||||
{
|
|
||||||
String label = target.getName() +
|
|
||||||
MessageFormat.format( " (Watchpoint triggered. Old value: ''{0}''. New value: ''{1}'')",
|
|
||||||
new String[] { ((ICDIWatchpointTrigger)info).getOldValue(),
|
|
||||||
((ICDIWatchpointTrigger)info).getNewValue() } );
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
if ( info != null && info instanceof ICDIWatchpointScope )
|
|
||||||
{
|
|
||||||
return target.getName() + " (Watchpoint is out of scope)";
|
|
||||||
}
|
|
||||||
if ( info != null && info instanceof ICDIBreakpointHit )
|
|
||||||
{
|
|
||||||
return target.getName() + " (Breakpoint hit)";
|
|
||||||
}
|
|
||||||
if ( info != null && info instanceof ICDISharedLibraryEvent )
|
|
||||||
{
|
|
||||||
return target.getName() + " (Stopped on shared library event)";
|
|
||||||
}
|
|
||||||
if ( info != null && info instanceof ICDISession )
|
|
||||||
{
|
|
||||||
return target.getName() + " (Suspended)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return target.getName();
|
return target.getName();
|
||||||
|
@ -497,23 +462,60 @@ public class CDTDebugModelPresentation extends LabelProvider
|
||||||
|
|
||||||
protected String getThreadText( IThread thread, boolean qualified ) throws DebugException
|
protected String getThreadText( IThread thread, boolean qualified ) throws DebugException
|
||||||
{
|
{
|
||||||
|
String threadName = getFormattedString( "Thread [{0}]", thread.getName() );
|
||||||
ICDebugTargetType targetType = (ICDebugTargetType)thread.getDebugTarget().getAdapter( ICDebugTargetType.class );
|
ICDebugTargetType targetType = (ICDebugTargetType)thread.getDebugTarget().getAdapter( ICDebugTargetType.class );
|
||||||
int type = ( targetType != null ) ? targetType.getTargetType() : ICDebugTargetType.TARGET_TYPE_UNKNOWN;
|
int type = ( targetType != null ) ? targetType.getTargetType() : ICDebugTargetType.TARGET_TYPE_UNKNOWN;
|
||||||
if ( type == ICDebugTargetType.TARGET_TYPE_LOCAL_CORE_DUMP )
|
if ( type == ICDebugTargetType.TARGET_TYPE_LOCAL_CORE_DUMP )
|
||||||
{
|
{
|
||||||
return getFormattedString( "Thread [{0}]", thread.getName() );
|
return threadName;
|
||||||
}
|
}
|
||||||
if ( thread.isTerminated() )
|
if ( thread.isTerminated() )
|
||||||
{
|
{
|
||||||
return getFormattedString( "Thread [{0}] (Terminated)", thread.getName() );
|
return getFormattedString( "{0} (Terminated)", threadName );
|
||||||
}
|
}
|
||||||
if ( thread.isStepping() )
|
if ( thread.isStepping() )
|
||||||
{
|
{
|
||||||
return getFormattedString( "Thread [{0}] (Stepping)", thread.getName());
|
return getFormattedString( "{0} (Stepping)", threadName );
|
||||||
}
|
}
|
||||||
if ( !thread.isSuspended() )
|
if ( !thread.isSuspended() )
|
||||||
{
|
{
|
||||||
return getFormattedString( "Thread [{0}] (Running)", thread.getName() );
|
return getFormattedString( "{0} (Running)", threadName );
|
||||||
|
}
|
||||||
|
if ( thread.isSuspended() )
|
||||||
|
{
|
||||||
|
IState state = (IState)thread.getAdapter( IState.class );
|
||||||
|
if ( state != null )
|
||||||
|
{
|
||||||
|
Object info = state.getCurrentStateInfo();
|
||||||
|
if ( info != null && info instanceof ICDISignalReceived )
|
||||||
|
{
|
||||||
|
ICDISignal signal = ((ICDISignalReceived)info).getSignal();
|
||||||
|
String label = threadName +
|
||||||
|
MessageFormat.format( " (Suspended: Signal ''{0}'' received. Description: {1})",
|
||||||
|
new String[] { signal.getName(), signal.getDescription() } );
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
if ( info != null && info instanceof ICDIWatchpointTrigger )
|
||||||
|
{
|
||||||
|
String label = threadName +
|
||||||
|
MessageFormat.format( " (Suspended: Watchpoint triggered. Old value: ''{0}''. New value: ''{1}'')",
|
||||||
|
new String[] { ((ICDIWatchpointTrigger)info).getOldValue(),
|
||||||
|
((ICDIWatchpointTrigger)info).getNewValue() } );
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
if ( info != null && info instanceof ICDIWatchpointScope )
|
||||||
|
{
|
||||||
|
return threadName + " (Suspended: Watchpoint is out of scope)";
|
||||||
|
}
|
||||||
|
if ( info != null && info instanceof ICDIBreakpointHit )
|
||||||
|
{
|
||||||
|
return threadName + " (Suspended: Breakpoint hit)";
|
||||||
|
}
|
||||||
|
if ( info != null && info instanceof ICDISharedLibraryEvent )
|
||||||
|
{
|
||||||
|
return threadName + " (Suspended: Shared library event)";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return getFormattedString( "Thread [{0}] (Suspended)", thread.getName() );
|
return getFormattedString( "Thread [{0}] (Suspended)", thread.getName() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue