|
Lines 43-48
Link Here
|
| 43 |
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent; |
43 |
import org.eclipse.cdt.dsf.mi.service.command.events.MIStoppedEvent; |
| 44 |
import org.eclipse.cdt.dsf.mi.service.command.events.MIThreadExitEvent; |
44 |
import org.eclipse.cdt.dsf.mi.service.command.events.MIThreadExitEvent; |
| 45 |
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo; |
45 |
import org.eclipse.cdt.dsf.mi.service.command.output.MIBreakInsertInfo; |
|
|
46 |
import org.eclipse.cdt.dsf.mi.service.command.output.MIFrame; |
| 46 |
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; |
47 |
import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; |
| 47 |
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; |
48 |
import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; |
| 48 |
import org.eclipse.cdt.dsf.service.DsfSession; |
49 |
import org.eclipse.cdt.dsf.service.DsfSession; |
|
Lines 361-368
Link Here
|
| 361 |
if (e instanceof MIBreakpointHitEvent) { |
362 |
if (e instanceof MIBreakpointHitEvent) { |
| 362 |
bpId = ((MIBreakpointHitEvent)e).getNumber(); |
363 |
bpId = ((MIBreakpointHitEvent)e).getNumber(); |
| 363 |
} |
364 |
} |
| 364 |
String fileLocation = e.getFrame().getFile() + ":" + e.getFrame().getLine(); //$NON-NLS-1$ |
365 |
|
| 365 |
String addrLocation = e.getFrame().getAddress(); |
|
|
| 366 |
// Here we check three different things to see if we are stopped at the right place |
366 |
// Here we check three different things to see if we are stopped at the right place |
| 367 |
// 1- The actual location in the file. But this does not work for breakpoints that |
367 |
// 1- The actual location in the file. But this does not work for breakpoints that |
| 368 |
// were set on non-executable lines |
368 |
// were set on non-executable lines |
|
Lines 374-382
Link Here
|
| 374 |
// So this works for the large majority of cases. The case that won't work is when the user |
374 |
// So this works for the large majority of cases. The case that won't work is when the user |
| 375 |
// does a runToLine to a line that is non-executable AND has another breakpoint AND |
375 |
// does a runToLine to a line that is non-executable AND has another breakpoint AND |
| 376 |
// has multiple addresses for the breakpoint. I'm mean, come on! |
376 |
// has multiple addresses for the breakpoint. I'm mean, come on! |
| 377 |
if (fileLocation.equals(fRunToLineActiveOperation.getFileLocation()) || |
377 |
boolean equalFileLocation = false; |
| 378 |
addrLocation.equals(fRunToLineActiveOperation.getAddrLocation()) || |
378 |
boolean equalAddrLocation = false; |
| 379 |
bpId == fRunToLineActiveOperation.getBreakointId()) { |
379 |
boolean equalBpId = bpId == fRunToLineActiveOperation.getBreakointId(); |
|
|
380 |
MIFrame frame = e.getFrame(); |
| 381 |
if(frame != null) { |
| 382 |
String fileLocation = frame.getFile() + ":" + frame.getLine(); //$NON-NLS-1$ |
| 383 |
String addrLocation = frame.getAddress(); |
| 384 |
equalFileLocation = fileLocation.equals(fRunToLineActiveOperation.getFileLocation()); |
| 385 |
equalAddrLocation = addrLocation.equals(fRunToLineActiveOperation.getAddrLocation()); |
| 386 |
} |
| 387 |
|
| 388 |
if (equalFileLocation || equalAddrLocation || equalBpId) { |
| 380 |
// We stopped at the right place. All is well. |
389 |
// We stopped at the right place. All is well. |
| 381 |
fRunToLineActiveOperation = null; |
390 |
fRunToLineActiveOperation = null; |
| 382 |
} else { |
391 |
} else { |