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
|
2003-09-09 Mikhail Khodjaiants
|
||||||
Added the 'getSharedLibraryPaths' and 'setSharedLibraryPaths' methods
|
Added the 'getSharedLibraryPaths' and 'setSharedLibraryPaths' methods
|
||||||
to the 'ICDISharedLibraryManager' interface.
|
to the 'ICDISharedLibraryManager' interface.
|
||||||
|
|
|
@ -50,6 +50,8 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib
|
||||||
CSharedLibrary library = new CSharedLibrary( getDebugTarget(), cdiLibrary );
|
CSharedLibrary library = new CSharedLibrary( getDebugTarget(), cdiLibrary );
|
||||||
fSharedLibraries.add( library );
|
fSharedLibraries.add( library );
|
||||||
library.fireCreationEvent();
|
library.fireCreationEvent();
|
||||||
|
if ( library.areSymbolsLoaded() )
|
||||||
|
((CDebugTarget)getDebugTarget()).setDeferredBreakpoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -74,8 +76,8 @@ public class CSharedLibraryManager extends CUpdateManager implements ICSharedLib
|
||||||
CSharedLibrary library = find( cdiLibrary );
|
CSharedLibrary library = find( cdiLibrary );
|
||||||
if ( library != null )
|
if ( library != null )
|
||||||
{
|
{
|
||||||
((CDebugTarget)getDebugTarget()).setRetryBreakpoints( true );
|
|
||||||
library.fireChangeEvent( DebugEvent.STATE );
|
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.CDebugModel;
|
||||||
import org.eclipse.cdt.debug.core.CDebugUtils;
|
import org.eclipse.cdt.debug.core.CDebugUtils;
|
||||||
import org.eclipse.cdt.debug.core.ICBreakpointManager;
|
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.ICMemoryManager;
|
||||||
import org.eclipse.cdt.debug.core.ICRegisterManager;
|
import org.eclipse.cdt.debug.core.ICRegisterManager;
|
||||||
import org.eclipse.cdt.debug.core.ICSharedLibraryManager;
|
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.ICDIObject;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDISharedLibrary;
|
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.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.ICDITarget;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
||||||
|
@ -631,7 +629,6 @@ public class CDebugTarget extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !isSuspended() )
|
if ( !isSuspended() )
|
||||||
return;
|
return;
|
||||||
setBreakpoints();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getCDITarget().resume();
|
getCDITarget().resume();
|
||||||
|
@ -757,6 +754,7 @@ public class CDebugTarget extends CDebugElement
|
||||||
catch( DebugException e )
|
catch( DebugException e )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
DebugPlugin.getDefault().getBreakpointManager().fireBreakpointChanged( breakpoint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1016,12 +1014,14 @@ public class CDebugTarget extends CDebugElement
|
||||||
else if ( event instanceof ICDISuspendedEvent )
|
else if ( event instanceof ICDISuspendedEvent )
|
||||||
{
|
{
|
||||||
boolean pass = true;
|
boolean pass = true;
|
||||||
|
/*
|
||||||
if ( source instanceof ICDITarget &&
|
if ( source instanceof ICDITarget &&
|
||||||
((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent &&
|
((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent &&
|
||||||
applyDeferredBreakpoints() )
|
applyDeferredBreakpoints() )
|
||||||
{
|
{
|
||||||
pass = handleInternalSuspendedEvent( (ICDISuspendedEvent)event );
|
pass = handleInternalSuspendedEvent( (ICDISuspendedEvent)event );
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if ( pass && (source instanceof ICDITarget || source instanceof ICDIThread) )
|
if ( pass && (source instanceof ICDITarget || source instanceof ICDIThread) )
|
||||||
{
|
{
|
||||||
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
||||||
|
@ -1444,8 +1444,13 @@ public class CDebugTarget extends CDebugElement
|
||||||
{
|
{
|
||||||
handleErrorInfo( (ICDIErrorInfo)reason );
|
handleErrorInfo( (ICDIErrorInfo)reason );
|
||||||
}
|
}
|
||||||
|
else if ( reason instanceof ICDISharedLibraryEvent )
|
||||||
|
{
|
||||||
|
handleSuspendedBySolibEvent( (ICDISharedLibraryEvent)reason );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
private boolean handleInternalSuspendedEvent( ICDISuspendedEvent event )
|
private boolean handleInternalSuspendedEvent( ICDISuspendedEvent event )
|
||||||
{
|
{
|
||||||
setRetryBreakpoints( true );
|
setRetryBreakpoints( true );
|
||||||
|
@ -1546,7 +1551,7 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
private void handleResumedEvent( ICDIResumedEvent event )
|
private void handleResumedEvent( ICDIResumedEvent event )
|
||||||
{
|
{
|
||||||
setSuspended( false );
|
setSuspended( false );
|
||||||
|
@ -1638,6 +1643,11 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleSuspendedBySolibEvent( ICDISharedLibraryEvent solibEvent )
|
||||||
|
{
|
||||||
|
fireSuspendEvent( DebugEvent.UNSPECIFIED );
|
||||||
|
}
|
||||||
|
|
||||||
private void handleExitedEvent( ICDIExitedEvent event )
|
private void handleExitedEvent( ICDIExitedEvent event )
|
||||||
{
|
{
|
||||||
removeAllThreads();
|
removeAllThreads();
|
||||||
|
@ -2284,7 +2294,6 @@ public class CDebugTarget extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canRunToLine( fileName, lineNumber ) )
|
if ( !canRunToLine( fileName, lineNumber ) )
|
||||||
return;
|
return;
|
||||||
setBreakpoints();
|
|
||||||
ICDILocation location = getCDISession().getBreakpointManager().createLocation( fileName, null, lineNumber );
|
ICDILocation location = getCDISession().getBreakpointManager().createLocation( fileName, null, lineNumber );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2601,7 +2610,6 @@ public class CDebugTarget extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canRunToAddress( address ) )
|
if ( !canRunToAddress( address ) )
|
||||||
return;
|
return;
|
||||||
setBreakpoints();
|
|
||||||
ICDILocation location = getCDISession().getBreakpointManager().createLocation( address );
|
ICDILocation location = getCDISession().getBreakpointManager().createLocation( address );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2618,11 +2626,17 @@ public class CDebugTarget extends CDebugElement
|
||||||
return fSetBreakpoints;
|
return fSetBreakpoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRetryBreakpoints( boolean retry )
|
protected void setRetryBreakpoints( boolean retry )
|
||||||
{
|
{
|
||||||
fSetBreakpoints = retry;
|
fSetBreakpoints = retry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDeferredBreakpoints()
|
||||||
|
{
|
||||||
|
setRetryBreakpoints( true );
|
||||||
|
setBreakpoints();
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#canResumeWithoutSignal()
|
* @see org.eclipse.cdt.debug.core.model.IResumeWithoutSignal#canResumeWithoutSignal()
|
||||||
*/
|
*/
|
||||||
|
@ -2682,7 +2696,6 @@ public class CDebugTarget extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canJumpToLine( fileName, lineNumber ) )
|
if ( !canJumpToLine( fileName, lineNumber ) )
|
||||||
return;
|
return;
|
||||||
setBreakpoints();
|
|
||||||
ICDILocation location = getCDISession().getBreakpointManager().createLocation( fileName, null, lineNumber );
|
ICDILocation location = getCDISession().getBreakpointManager().createLocation( fileName, null, lineNumber );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2710,7 +2723,6 @@ public class CDebugTarget extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canJumpToAddress( address ) )
|
if ( !canJumpToAddress( address ) )
|
||||||
return;
|
return;
|
||||||
setBreakpoints();
|
|
||||||
ICDILocation location = getCDISession().getBreakpointManager().createLocation( address );
|
ICDILocation location = getCDISession().getBreakpointManager().createLocation( address );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2778,7 +2790,7 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
setRunningInfo( info );
|
setRunningInfo( info );
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
private boolean applyDeferredBreakpoints()
|
private boolean applyDeferredBreakpoints()
|
||||||
{
|
{
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
@ -2791,4 +2803,5 @@ public class CDebugTarget extends CDebugElement
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,12 +10,10 @@ import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
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.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIConfiguration;
|
import org.eclipse.cdt.debug.core.cdi.ICDIConfiguration;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDIEndSteppingRange;
|
import org.eclipse.cdt.debug.core.cdi.ICDIEndSteppingRange;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISessionObject;
|
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.ICDISignalReceived;
|
||||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
|
import org.eclipse.cdt.debug.core.cdi.event.ICDIChangedEvent;
|
||||||
import org.eclipse.cdt.debug.core.cdi.event.ICDIDestroyedEvent;
|
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.IState;
|
||||||
import org.eclipse.cdt.debug.core.model.ISwitchToFrame;
|
import org.eclipse.cdt.debug.core.model.ISwitchToFrame;
|
||||||
import org.eclipse.cdt.debug.core.sourcelookup.ISourceMode;
|
import org.eclipse.cdt.debug.core.sourcelookup.ISourceMode;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.debug.core.DebugEvent;
|
import org.eclipse.debug.core.DebugEvent;
|
||||||
import org.eclipse.debug.core.DebugException;
|
import org.eclipse.debug.core.DebugException;
|
||||||
|
@ -430,7 +427,7 @@ public class CThread extends CDebugElement
|
||||||
if ( ( source instanceof ICDIThread && getCDIThread().equals( (ICDIThread)source ) ) ||
|
if ( ( source instanceof ICDIThread && getCDIThread().equals( (ICDIThread)source ) ) ||
|
||||||
source instanceof ICDITarget )
|
source instanceof ICDITarget )
|
||||||
{
|
{
|
||||||
if ( !(((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent && applyDeferredBreakpoints()) )
|
// if ( !(((ICDISuspendedEvent)event).getReason() instanceof ICDISharedLibraryEvent && applyDeferredBreakpoints()) )
|
||||||
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
handleSuspendedEvent( (ICDISuspendedEvent)event );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -497,7 +494,6 @@ public class CThread extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !isSuspended() )
|
if ( !isSuspended() )
|
||||||
return;
|
return;
|
||||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getCDIThread().resume();
|
getCDIThread().resume();
|
||||||
|
@ -585,7 +581,6 @@ public class CThread extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canStepInto() )
|
if ( !canStepInto() )
|
||||||
return;
|
return;
|
||||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if ( getRealSourceMode() == ISourceMode.MODE_SOURCE )
|
if ( getRealSourceMode() == ISourceMode.MODE_SOURCE )
|
||||||
|
@ -610,7 +605,6 @@ public class CThread extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canStepOver() )
|
if ( !canStepOver() )
|
||||||
return;
|
return;
|
||||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if ( getRealSourceMode() == ISourceMode.MODE_SOURCE )
|
if ( getRealSourceMode() == ISourceMode.MODE_SOURCE )
|
||||||
|
@ -635,7 +629,6 @@ public class CThread extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canStepReturn() )
|
if ( !canStepReturn() )
|
||||||
return;
|
return;
|
||||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getCDIThread().stepReturn();
|
getCDIThread().stepReturn();
|
||||||
|
@ -838,7 +831,6 @@ public class CThread extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canStepIntoInstruction() )
|
if ( !canStepIntoInstruction() )
|
||||||
return;
|
return;
|
||||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getCDIThread().stepIntoInstruction();
|
getCDIThread().stepIntoInstruction();
|
||||||
|
@ -856,7 +848,6 @@ public class CThread extends CDebugElement
|
||||||
{
|
{
|
||||||
if ( !canStepOverInstruction() )
|
if ( !canStepOverInstruction() )
|
||||||
return;
|
return;
|
||||||
((CDebugTarget)getDebugTarget()).setBreakpoints();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
getCDIThread().stepOverInstruction();
|
getCDIThread().stepOverInstruction();
|
||||||
|
@ -1145,7 +1136,7 @@ public class CThread extends CDebugElement
|
||||||
((IResumeWithoutSignal)getDebugTarget()).resumeWithoutSignal();
|
((IResumeWithoutSignal)getDebugTarget()).resumeWithoutSignal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
private boolean applyDeferredBreakpoints()
|
private boolean applyDeferredBreakpoints()
|
||||||
{
|
{
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
@ -1158,4 +1149,5 @@ public class CThread extends CDebugElement
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue