1
0
Fork 0
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:
Mikhail Khodjaiants 2003-01-30 15:59:43 +00:00
parent 22fced57eb
commit bcef6f180d
2 changed files with 34 additions and 16 deletions

View file

@ -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

View file

@ -1510,7 +1510,30 @@ 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,
createLineBreakpoint( (IFile)sourceElement, cdiBreakpoint );
}
else if ( cdiBreakpoint.getLocation().getAddress() > 0 )
{
createAddressBreakpoint( cdiBreakpoint );
}
}
}
else if ( cdiBreakpoint.getLocation().getAddress() > 0 )
{
createAddressBreakpoint( cdiBreakpoint );
}
}
catch( CDIException e )
{
}
catch( CoreException e )
{
}
}
private void createLineBreakpoint( IFile file, ICDILocationBreakpoint cdiBreakpoint ) throws CDIException, CoreException
{
ICLineBreakpoint breakpoint = CDebugModel.createLineBreakpoint( file,
cdiBreakpoint.getLocation().getLineNumber(),
cdiBreakpoint.isEnabled(),
cdiBreakpoint.getCondition().getIgnoreCount(),
@ -1519,9 +1542,8 @@ public class CDebugTarget extends CDebugElement
getBreakpoints().put( breakpoint, cdiBreakpoint );
((CBreakpoint)breakpoint).register( true );
}
}
}
else if ( cdiBreakpoint.getLocation().getAddress() > 0 )
private void createAddressBreakpoint( ICDILocationBreakpoint cdiBreakpoint ) throws CDIException, CoreException
{
ICAddressBreakpoint breakpoint = CDebugModel.createAddressBreakpoint( getExecFile(),
cdiBreakpoint.getLocation().getAddress(),
@ -1532,14 +1554,6 @@ public class CDebugTarget extends CDebugElement
getBreakpoints().put( breakpoint, cdiBreakpoint );
((CBreakpoint)breakpoint).register( true );
}
}
catch( CDIException e )
{
}
catch( CoreException e )
{
}
}
private void handleWatchpointCreatedEvent( final ICDIWatchpoint watchpoint )
{