mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 14:12:10 +02:00
Check for funtion.
This commit is contained in:
parent
ad50df009d
commit
43af81fb53
1 changed files with 12 additions and 10 deletions
|
@ -154,7 +154,7 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
boolean temporary = (type == ICDIBreakpoint.TEMPORARY);
|
boolean temporary = (type == ICDIBreakpoint.TEMPORARY);
|
||||||
String exprCond = null;
|
String exprCond = null;
|
||||||
int ignoreCount = 0;
|
int ignoreCount = 0;
|
||||||
String line = "";
|
StringBuffer line = new StringBuffer();
|
||||||
|
|
||||||
if (condition != null) {
|
if (condition != null) {
|
||||||
exprCond = condition.getExpression();
|
exprCond = condition.getExpression();
|
||||||
|
@ -162,24 +162,26 @@ public class BreakpointManager extends SessionObject implements ICDIBreakpointMa
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
if (location.getFile() != null && location.getFile().length() > 0) {
|
String file = location.getFile();
|
||||||
line = location.getFile() + ":";
|
String function = location.getFunction();
|
||||||
if (location.getFunction() != null && location.getFunction().length() > 0) {
|
if (file != null && file.length() > 0) {
|
||||||
line += location.getFunction();
|
line.append(file).append(':');
|
||||||
|
if (function != null && function.length() > 0) {
|
||||||
|
line.append(function);
|
||||||
} else {
|
} else {
|
||||||
line += Integer.toString(location.getLineNumber());
|
line.append(location.getLineNumber());
|
||||||
}
|
}
|
||||||
} else if (location.getFunction() != null && location.getFunction().length() > 0) {
|
} else if (function != null && function.length() > 0) {
|
||||||
line = location.getFunction();
|
line.append(function);
|
||||||
} else {
|
} else {
|
||||||
line = "*" + Long.toString(location.getAddress());
|
line.append('*').append(location.getAddress());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CSession s = getCSession();
|
CSession s = getCSession();
|
||||||
CommandFactory factory = s.getMISession().getCommandFactory();
|
CommandFactory factory = s.getMISession().getCommandFactory();
|
||||||
MIBreakInsert breakInsert = factory.createMIBreakInsert(temporary, hardware,
|
MIBreakInsert breakInsert = factory.createMIBreakInsert(temporary, hardware,
|
||||||
exprCond, ignoreCount, line);
|
exprCond, ignoreCount, line.toString());
|
||||||
MIBreakPoint[] points = null;
|
MIBreakPoint[] points = null;
|
||||||
try {
|
try {
|
||||||
s.getMISession().postCommand(breakInsert);
|
s.getMISession().postCommand(breakInsert);
|
||||||
|
|
Loading…
Add table
Reference in a new issue