mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Removed the internal handling of the 'stop-on-shared-library-events' option - will be moved to the mi.
Try to set the deferred breakpoints only when: - a shared library is loaded, - the symbols of shared library are loaded.
This commit is contained in:
parent
5698a06608
commit
233b7ca8d5
4 changed files with 40 additions and 23 deletions
|
@ -1,3 +1,13 @@
|
|||
2003-09-09 Mikhail Khodjaiants
|
||||
Removed the internal handling of the 'stop-on-shared-library-events' option -
|
||||
will be moved to the mi.
|
||||
Try to set the deferred breakpoints only when:
|
||||
- a shared library is loaded
|
||||
- the symbols of shared library are loaded
|
||||
* CSharedLibararyManager.java
|
||||
* CDebugTarget.java
|
||||
* CThread.java
|
||||
|
||||
2003-09-09 Mikhail Khodjaiants
|
||||
Added the 'getSharedLibraryPaths' and 'setSharedLibraryPaths' methods
|
||||
to the 'ICDISharedLibraryManager' interface.
|
||||
|
|
|
@ -50,6 +50,8 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib
|
|||
CSharedLibrary library = new CSharedLibrary( getDebugTarget(), cdiLibrary );
|
||||
fSharedLibraries.add( library );
|
||||
library.fireCreationEvent();
|
||||
if ( library.areSymbolsLoaded() )
|
||||
((CDebugTarget)getDebugTarget()).setDeferredBreakpoints();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -74,8 +76,8 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib
|
|||
CSharedLibrary library = find( cdiLibrary );
|
||||
if ( library != null )
|
||||
{
|
||||
((CDebugTarget)getDebugTarget()).setRetryBreakpoints( true );
|
||||
library.fireChangeEvent( DebugEvent.STATE );
|
||||
((CDebugTarget)getDebugTarget()).setDeferredBreakpoints();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
|||
import org.eclipse.cdt.debug.core.CDebugModel;
|
||||
import org.eclipse.cdt.debug.core.CDebugUtils;
|
||||
import org.eclipse.cdt.debug.core.ICBreakpointManager;
|
||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.debug.core.ICMemoryManager;
|
||||
import org.eclipse.cdt.debug.core.ICRegisterManager;
|
||||
import org.eclipse.cdt.debug.core.ICSharedLibraryManager;
|
||||
|
@ -56,7 +55,6 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
|
|||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
|
||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
||||
|
@ -631,7 +629,6 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
if ( !isSuspended() )
|
||||
return;
|
||||
setBreakpoints();
|
||||
try
|
||||
{
|
||||
getCDITarget().resume();
|
||||
|
@ -757,6 +754,7 @@ public class CDebugTarget extends CDebugElement
|
|||
catch( DebugException e )
|
||||
{
|
||||
}
|
||||
DebugPlugin.getDefault().getBreakpointManager().fireBreakpointChanged( breakpoint );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1016,12 +1014,14 @@ public class CDebugTarget extends CDebugElement
|
|||
else if ( event instanceof ICDISuspendedEvent )
|
||||
{
|
||||
boolean pass = true;
|
||||
/*
|
||||
if ( source instanceof ICDITarget &&
|
||||
((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent &&
|
||||
applyDeferredBreakpoints() )
|
||||
{
|
||||
pass = handleInternalSuspendedEvent( (ICDISuspendedEvent)event );
|
||||
}
|
||||
*/
|
||||
if ( pass && (source instanceof ICDITarget || source instanceof ICDIThread) )
|
||||
{
|
||||
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
||||
|
@ -1444,8 +1444,13 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
handleErrorInfo( (ICDIErrorInfo)reason );
|
||||
}
|
||||
else if ( reason instanceof ICDISharedLibraryEvent )
|
||||
{
|
||||
handleSuspendedBySolibEvent( (ICDISharedLibraryEvent)reason );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
private boolean handleInternalSuspendedEvent( ICDISuspendedEvent event )
|
||||
{
|
||||
setRetryBreakpoints( true );
|
||||
|
@ -1546,7 +1551,7 @@ public class CDebugTarget extends CDebugElement
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
*/
|
||||
private void handleResumedEvent( ICDIResumedEvent event )
|
||||
{
|
||||
setSuspended( false );
|
||||
|
@ -1638,6 +1643,11 @@ public class CDebugTarget extends CDebugElement
|
|||
}
|
||||
}
|
||||
|
||||
private void handleSuspendedBySolibEvent( ICDISharedLibraryEvent solibEvent )
|
||||
{
|
||||
fireSuspendEvent( DebugEvent.UNSPECIFIED );
|
||||
}
|
||||
|
||||
private void handleExitedEvent( ICDIExitedEvent event )
|
||||
{
|
||||
removeAllThreads();
|
||||
|
@ -2284,7 +2294,6 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
if ( !canRunToLine( fileName, lineNumber ) )
|
||||
return;
|
||||
setBreakpoints();
|
||||
ICDILocation location = getCDISession().getBreakpointManager().createLocation( fileName, null, lineNumber );
|
||||
try
|
||||
{
|
||||
|
@ -2601,7 +2610,6 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
if ( !canRunToAddress( address ) )
|
||||
return;
|
||||
setBreakpoints();
|
||||
ICDILocation location = getCDISession().getBreakpointManager().createLocation( address );
|
||||
try
|
||||
{
|
||||
|
@ -2618,11 +2626,17 @@ public class CDebugTarget extends CDebugElement
|
|||
return fSetBreakpoints;
|
||||
}
|
||||
|
||||
public void setRetryBreakpoints( boolean retry )
|
||||
protected void setRetryBreakpoints( boolean retry )
|
||||
{
|
||||
fSetBreakpoints = retry;
|
||||
}
|
||||
|
||||
public void setDeferredBreakpoints()
|
||||
{
|
||||
setRetryBreakpoints( true );
|
||||
setBreakpoints();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#canResumeWithoutSignal()
|
||||
*/
|
||||
|
@ -2682,7 +2696,6 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
if ( !canJumpToLine( fileName, lineNumber ) )
|
||||
return;
|
||||
setBreakpoints();
|
||||
ICDILocation location = getCDISession().getBreakpointManager().createLocation( fileName, null, lineNumber );
|
||||
try
|
||||
{
|
||||
|
@ -2710,7 +2723,6 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
if ( !canJumpToAddress( address ) )
|
||||
return;
|
||||
setBreakpoints();
|
||||
ICDILocation location = getCDISession().getBreakpointManager().createLocation( address );
|
||||
try
|
||||
{
|
||||
|
@ -2778,7 +2790,7 @@ public class CDebugTarget extends CDebugElement
|
|||
}
|
||||
setRunningInfo( info );
|
||||
}
|
||||
|
||||
/*
|
||||
private boolean applyDeferredBreakpoints()
|
||||
{
|
||||
boolean result = false;
|
||||
|
@ -2791,4 +2803,5 @@ public class CDebugTarget extends CDebugElement
|
|||
}
|
||||
return result;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -10,12 +10,10 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIConfiguration;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIEndSteppingRange;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISharedLibraryEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDISignalReceived;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
|
||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
|
||||
|
@ -38,7 +36,6 @@ import org.eclipse.cdt.debug.core.model.IRunToLine;
|
|||
import org.eclipse.cdt.debug.core.model.IState;
|
||||
import org.eclipse.cdt.debug.core.model.ISwitchToFrame;
|
||||
import org.eclipse.cdt.debug.core.sourcelookup.ISourceMode;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IAdaptable;
|
||||
import org.eclipse.debug.core.DebugEvent;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
|
@ -430,7 +427,7 @@ public class CThread extends CDebugElement
|
|||
if ( ( source instanceof ICDIThread && getCDIThread().equals( (ICDIThread)source ) ) ||
|
||||
source instanceof ICDITarget )
|
||||
{
|
||||
if ( !(((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent && applyDeferredBreakpoints()) )
|
||||
// if ( !(((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent && applyDeferredBreakpoints()) )
|
||||
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
||||
}
|
||||
}
|
||||
|
@ -497,7 +494,6 @@ public class CThread extends CDebugElement
|
|||
{
|
||||
if ( !isSuspended() )
|
||||
return;
|
||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
||||
try
|
||||
{
|
||||
getCDIThread().resume();
|
||||
|
@ -585,7 +581,6 @@ public class CThread extends CDebugElement
|
|||
{
|
||||
if ( !canStepInto() )
|
||||
return;
|
||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
||||
try
|
||||
{
|
||||
if ( getRealSourceMode() == ISourceMode.MODE_SOURCE )
|
||||
|
@ -610,7 +605,6 @@ public class CThread extends CDebugElement
|
|||
{
|
||||
if ( !canStepOver() )
|
||||
return;
|
||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
||||
try
|
||||
{
|
||||
if ( getRealSourceMode() == ISourceMode.MODE_SOURCE )
|
||||
|
@ -635,7 +629,6 @@ public class CThread extends CDebugElement
|
|||
{
|
||||
if ( !canStepReturn() )
|
||||
return;
|
||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
||||
try
|
||||
{
|
||||
getCDIThread().stepReturn();
|
||||
|
@ -838,7 +831,6 @@ public class CThread extends CDebugElement
|
|||
{
|
||||
if ( !canStepIntoInstruction() )
|
||||
return;
|
||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
||||
try
|
||||
{
|
||||
getCDIThread().stepIntoInstruction();
|
||||
|
@ -856,7 +848,6 @@ public class CThread extends CDebugElement
|
|||
{
|
||||
if ( !canStepOverInstruction() )
|
||||
return;
|
||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
||||
try
|
||||
{
|
||||
getCDIThread().stepOverInstruction();
|
||||
|
@ -1145,7 +1136,7 @@ public class CThread extends CDebugElement
|
|||
((IResumeWithoutSignal)getDebugTarget()).resumeWithoutSignal();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private boolean applyDeferredBreakpoints()
|
||||
{
|
||||
boolean result = false;
|
||||
|
@ -1158,4 +1149,5 @@ public class CThread extends CDebugElement
|
|||
}
|
||||
return result;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue