1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Fix label handling for ICBreakpoint.TEMPORARY and add label for new SOFTWARE type.

This commit is contained in:
John Cortell 2008-05-08 03:16:26 +00:00
parent b36ad37def
commit 81120f9c45
2 changed files with 24 additions and 9 deletions

View file

@ -461,17 +461,31 @@ public class CDebugUtils {
protected static StringBuffer appendBreakpointType( ICBreakpoint breakpoint, StringBuffer label ) throws CoreException {
if (breakpoint instanceof ICBreakpointType) {
String typeString = null;
String typeString = "";
int type = ((ICBreakpointType) breakpoint).getType();
switch (type) {
// Need to filter out the TEMPORARY bit-flag to get the real type
// The REGULAR type is implicit so we don't report that.
switch (type & ~ICBreakpointType.TEMPORARY) {
case ICBreakpointType.HARDWARE:
typeString = DebugCoreMessages.getString("CDebugUtils.10");
typeString = DebugCoreMessages.getString("CDebugUtils.Hardware");
break;
case ICBreakpointType.TEMPORARY:
typeString = DebugCoreMessages.getString("CDebugUtils.11");
case ICBreakpointType.SOFTWARE:
typeString = DebugCoreMessages.getString("CDebugUtils.Software");
break;
}
if (typeString != null) {
// Now factor in the TEMPORARY qualifier to form, .e.,g "Hardware/Temporary"
// Thing is, a temporary breakpoint should never show in the GUI, so this is
// here as a just-in-case.
if ((type & ICBreakpointType.TEMPORARY) != 0) {
if (typeString.length() > 0) {
typeString += "/";
}
typeString += DebugCoreMessages.getString("CDebugUtils.Temporary");
}
if (typeString.length() > 0) {
label.append(' ');
label.append(MessageFormat.format(
DebugCoreMessages.getString("CDebugUtils.8"), new String[] { typeString })); //$NON-NLS-1$

View file

@ -19,7 +19,8 @@ CDebugUtils.5=[expression: ''{0}'']
CDebugUtils.6=[memory space: {0}]
CDebugUtils.7=[units: {0}]
CDebugUtils.8=[type: {0}]
CDebugUtils.9=Regular
CDebugUtils.10=Hardware
CDebugUtils.11=Temporary
CDebugUtils.Regular=Regular
CDebugUtils.Hardware=Hardware
CDebugUtils.Temporary=Temporary
CDebugUtils.Software=Software
CDIDebugModel.0=Unable to parser binary information from file