Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 170410 Details for
Bug 314628
Unresolved breakpoint freezes application
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Pawel's patch including non-stop and JUnit test
zpatch.txt (text/plain), 5.69 KB, created by
Marc Khouzam
on 2010-05-28 14:42:48 EDT
(
hide
)
Description:
Pawel's patch including non-stop and JUnit test
Filename:
MIME Type:
Creator:
Marc Khouzam
Created:
2010-05-28 14:42:48 EDT
Size:
5.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.dsf.gdb >Index: src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java,v >retrieving revision 1.22 >diff -u -r1.22 GDBRunControl_7_0_NS.java >--- src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java 28 Apr 2010 23:50:47 -0000 1.22 >+++ src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java 28 May 2010 18:42:12 -0000 >@@ -994,6 +994,11 @@ > rm.done(); > } > } >+ @Override >+ public void rollBack(RequestMonitor rm) { >+ Sequence.Step restoreStep = new RestoreTargetStateStep(); >+ restoreStep.execute(rm); >+ } > }; > > /** >Index: src/org/eclipse/cdt/dsf/mi/service/IMIRunControl.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/IMIRunControl.java,v >retrieving revision 1.5 >diff -u -r1.5 IMIRunControl.java >--- src/org/eclipse/cdt/dsf/mi/service/IMIRunControl.java 2 Mar 2010 13:29:03 -0000 1.5 >+++ src/org/eclipse/cdt/dsf/mi/service/IMIRunControl.java 28 May 2010 18:42:12 -0000 >@@ -28,7 +28,7 @@ > * to receive commands. Once the specified steps are executed, the target should be > * returned to its original availability. > * >- * This can is of value for breakpoints commands; e.g., breakpoints need to be inserted >+ * This is of value for breakpoints commands; e.g., breakpoints need to be inserted > * even when the target is running, so this call would suspend the target, insert the > * breakpoint, and resume the target again. > * >Index: src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java,v >retrieving revision 1.26 >diff -u -r1.26 MIRunControl.java >--- src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java 28 Apr 2010 23:50:49 -0000 1.26 >+++ src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java 28 May 2010 18:42:12 -0000 >@@ -1012,6 +1012,11 @@ > rm.done(); > } > } >+ @Override >+ public void rollBack(RequestMonitor rm) { >+ Sequence.Step restoreStep = new RestoreTargetStateStep(); >+ restoreStep.execute(rm); >+ } > }; > > /** >#P org.eclipse.cdt.tests.dsf.gdb >Index: src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java,v >retrieving revision 1.11 >diff -u -r1.11 MIBreakpointsTest.java >--- src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java 27 May 2010 22:56:38 -0000 1.11 >+++ src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java 28 May 2010 18:42:13 -0000 >@@ -1238,6 +1238,54 @@ > ((MIBreakpointHitEvent)event).getNumber() == ref.getReference()); > } > >+ // ------------------------------------------------------------------------ >+ // insertInvalidBreakpoint_WhileTargetRunning >+ // Set an invalid breakpoint while the target is running, then set a valid >+ // breakpoint and make sure the second breakpoints eventually gets hit. >+ // >+ // We had a problem where an invalid breakpoint set when the target was running >+ // would leave us in a bad state (Bug 314628) >+ // ------------------------------------------------------------------------ >+ @Test >+ public void insertInvalidBreakpoint_WhileTargetRunning() throws Throwable { >+ >+ // Create a line breakpoint >+ Map<String, Object> breakpoint = new HashMap<String, Object>(); >+ breakpoint.put(BREAKPOINT_TYPE_TAG, BREAKPOINT_TAG); >+ breakpoint.put(FILE_NAME_TAG, "Bad file name"); >+ breakpoint.put(LINE_NUMBER_TAG, LINE_NUMBER_5); >+ >+ // Run the program. It will make a two second sleep() call, during which time... >+ SyncUtil.resume(); >+ >+ // ...we install the bad breakpoint and check that it failed >+ insertBreakpoint(fBreakpointsDmc, breakpoint); >+ assertTrue(fWait.getMessage(), !fWait.isOK()); >+ >+ // Now install a proper breakpoint an see that it hits without having to resume >+ // the target. This will show that the target was still properly running. >+ breakpoint.put(FILE_NAME_TAG, SOURCE_FILE); >+ MIBreakpointDMContext ref = (MIBreakpointDMContext) insertBreakpoint(fBreakpointsDmc, breakpoint); >+ >+ // Wait for breakpoint to hit. >+ MIStoppedEvent event = waitForBreakpointEventsAfterBreakpointOperationWhileTargetRunning(true, 2); >+ >+ // Ensure the correct BreakpointEvent was received >+ MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref); >+ assertTrue("BreakpointEvent problem: expected " + 2 + " BREAKPOINT event(s), received " >+ + fBreakpointEventCount, fBreakpointEventCount == 2); >+ assertTrue("BreakpointEvent problem: expected " + 1 + " BREAKPOINT_HIT event(s), received " >+ + getBreakpointEventCount(BP_HIT), getBreakpointEventCount(BP_HIT) == 1); >+ assertTrue("BreakpointService problem: breakpoint mismatch", >+ fBreakpointRef == breakpoint1.getNumber()); >+ clearEventCounters(); >+ >+ assertTrue("Did not stop because of breakpoint, but stopped because of: " + >+ event.getClass().getCanonicalName(), event instanceof MIBreakpointHitEvent); >+ assertTrue("Did not stop because of the correct breakpoint at line " + LINE_NUMBER_5, >+ ((MIBreakpointHitEvent)event).getNumber() == ref.getReference()); >+ } >+ > /////////////////////////////////////////////////////////////////////////// > // Add Watchpoint tests > ///////////////////////////////////////////////////////////////////////////
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
marc.khouzam
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 314628
:
170255
|
170325
|
170392
|
170399
| 170410