Community
Participate
Working Groups
Created attachment 177281 [details] patch for edc line number table code to resolve line number to nearby address standard CDT behavior (as evidenced in testing with DSF-GDB) is that setting a breakpoint on a line without source will cause a breakpoint to be resolved and set on the next subsequent source-line represented in the LNT. the attached patch fixes this behavior. tested versus edc JUnit suite.
Created attachment 177663 [details] patch for edc line number table code to resolve line number to nearby address replacement to go on top of recent changes to fix java 1.6 vs 1.5 errors
Created attachment 177664 [details] patch for edc line number table code to resolve line number to nearby address patch adjusted to work on top of recently committed changes to conform to java 1.5 vs java 1.6 (and forgot to obsolete the previous patch, so obsoleting both now).
Committed to HEAD.
*** cdt cvs genie on behalf of kryall *** Bug 323457 - edc - setting breakpoint on line without source fails to resolve at subsequent line [*] ModuleLineEntryProvider.java 1.14 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc/src/org/eclipse/cdt/debug/edc/internal/symbols/ModuleLineEntryProvider.java?root=Tools_Project&r1=1.13&r2=1.14 [*] LineEntryMapper.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/edc/org.eclipse.cdt.debug.edc/src/org/eclipse/cdt/debug/edc/internal/services/dsf/LineEntryMapper.java?root=Tools_Project&r1=1.2&r2=1.3
New API and new implementation is needed. See bug 337493.
New API and new implementaion are done. See bug 337493. With the new implementation, breakpoint marker is also moved accordingly when the breakpoint is moved. Aside from the unit test in bug 337493, here's how to test/verify the feature manually with EDC Windows debugger with the program compiled by MingW. // code snippet 11 int foo(); 12 int func1(); 13 int func2(); 14 15 int func2() 16 { 17 volatile int a,b,c; 18 19 a = 1; /* set breakpoint here */ 20 b = 2; 21 c = (b + a) * (a + b); /* set a breakpoint here in disassembly code */ 22 return 0; 23 } 24 25 int func1() 26 { 27 volatile int x,y,z; 28 29 x = 1; /* set breakpoint here */ 30 y = 2; First let's call a breapoint at line N "bpN". 1. Set bp11, 12, 18, 19, 28. 2. Remove all other breakpoints in the program and disable stop-at-main. 3. start debugger. You should see: a. Either bp11 or bp12 (actually which one is indeterministic) is moved to line 16. Namely a resolved breakpoint appears on line 16, while bp11 or bp12 disappear while the other one remains and is unresolved. b. bp18 is unresolved while bp19 is resolved. c. bp28 is moved to line 29 (becomes bp29) and resolved. d. the program stops at bp29. 4. set bp24, you should get resolved bp26. 5. set bp24 again, you should get unresolved bp24. 6. remove bp26, set bp24, you should get resolved bp26 again. More test cases. 1) When debugger needs to move a breakpoint, it will search in 5-line neighborhood of current line (5 lines above and 5 lines below current line) for the closest line with code, and move the breakpoint there. E.g. with code like below: 9 i = 1; 10 // blank line 1 11 // blank line 1 12 // blank line 1 13 // blank line 1 14 // blank line 1 15 i++; Set bp at line 11, it will be moved to line 9. Set bp at line 13, it will be moved to line 15. When set bp at line 12, namely in the right middle of two code lines, it will be moved to the line below i.e. line 15. 2) A breakpoint won't be moved beyond 5 lines. namely for code like this 1 /* 2 * comment ... 3 * comment ... 4 * comment ... 5 * comment ... 6 * comment ... 7 */ 8 int main() 9 { 10 ... If you set a breakpoint at line 2, the breakpoint won't be moved, it will just stay at line 2 unresolved. However, if you set a bp at line 4, it will be moved to line 8 or 9.