mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Create an address breakpoint if the source locator can not find the file specified by gdb.
This commit is contained in:
parent
22fced57eb
commit
bcef6f180d
2 changed files with 34 additions and 16 deletions
|
@ -1,3 +1,7 @@
|
|||
2003-01-30 Mikhail Khodjaiants
|
||||
Create an address breakpoint if the source locator can not find the file specified by gdb.
|
||||
* CDebugTarget.java
|
||||
|
||||
2003-01-29 Mikhail Khodjaiants
|
||||
Managing breakpoints from the gdb console (fixes).
|
||||
* CDebugModel.java
|
||||
|
|
|
@ -1510,27 +1510,17 @@ public class CDebugTarget extends CDebugElement
|
|||
Object sourceElement = ((ICSourceLocator)((IAdaptable)getSourceLocator()).getAdapter( ICSourceLocator.class )).findSourceElement( cdiBreakpoint.getLocation().getFile() );
|
||||
if ( sourceElement != null && sourceElement instanceof IFile )
|
||||
{
|
||||
ICLineBreakpoint breakpoint = CDebugModel.createLineBreakpoint( (IFile)sourceElement,
|
||||
cdiBreakpoint.getLocation().getLineNumber(),
|
||||
cdiBreakpoint.isEnabled(),
|
||||
cdiBreakpoint.getCondition().getIgnoreCount(),
|
||||
cdiBreakpoint.getCondition().getExpression(),
|
||||
false );
|
||||
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
||||
((CBreakpoint)breakpoint).register( true );
|
||||
createLineBreakpoint( (IFile)sourceElement, cdiBreakpoint );
|
||||
}
|
||||
else if ( cdiBreakpoint.getLocation().getAddress() > 0 )
|
||||
{
|
||||
createAddressBreakpoint( cdiBreakpoint );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( cdiBreakpoint.getLocation().getAddress() > 0 )
|
||||
{
|
||||
ICAddressBreakpoint breakpoint = CDebugModel.createAddressBreakpoint( getExecFile(),
|
||||
cdiBreakpoint.getLocation().getAddress(),
|
||||
cdiBreakpoint.isEnabled(),
|
||||
cdiBreakpoint.getCondition().getIgnoreCount(),
|
||||
cdiBreakpoint.getCondition().getExpression(),
|
||||
false );
|
||||
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
||||
((CBreakpoint)breakpoint).register( true );
|
||||
createAddressBreakpoint( cdiBreakpoint );
|
||||
}
|
||||
}
|
||||
catch( CDIException e )
|
||||
|
@ -1541,6 +1531,30 @@ public class CDebugTarget extends CDebugElement
|
|||
}
|
||||
}
|
||||
|
||||
private void createLineBreakpoint( IFile file, ICDILocationBreakpoint cdiBreakpoint ) throws CDIException, CoreException
|
||||
{
|
||||
ICLineBreakpoint breakpoint = CDebugModel.createLineBreakpoint( file,
|
||||
cdiBreakpoint.getLocation().getLineNumber(),
|
||||
cdiBreakpoint.isEnabled(),
|
||||
cdiBreakpoint.getCondition().getIgnoreCount(),
|
||||
cdiBreakpoint.getCondition().getExpression(),
|
||||
false );
|
||||
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
||||
((CBreakpoint)breakpoint).register( true );
|
||||
}
|
||||
|
||||
private void createAddressBreakpoint( ICDILocationBreakpoint cdiBreakpoint ) throws CDIException, CoreException
|
||||
{
|
||||
ICAddressBreakpoint breakpoint = CDebugModel.createAddressBreakpoint( getExecFile(),
|
||||
cdiBreakpoint.getLocation().getAddress(),
|
||||
cdiBreakpoint.isEnabled(),
|
||||
cdiBreakpoint.getCondition().getIgnoreCount(),
|
||||
cdiBreakpoint.getCondition().getExpression(),
|
||||
false );
|
||||
getBreakpoints().put( breakpoint, cdiBreakpoint );
|
||||
((CBreakpoint)breakpoint).register( true );
|
||||
}
|
||||
|
||||
private void handleWatchpointCreatedEvent( final ICDIWatchpoint watchpoint )
|
||||
{
|
||||
Runnable runnable = new Runnable()
|
||||
|
|
Loading…
Add table
Reference in a new issue