mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[254665] [disassembly] Invalid thread access SWT exception seen in log.
This commit is contained in:
parent
f6e946df29
commit
93595b208c
2 changed files with 11 additions and 12 deletions
|
@ -2428,9 +2428,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
asyncExec(new Runnable() {
|
asyncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
updatePC(PC_UNKNOWN);
|
updatePC(PC_UNKNOWN);
|
||||||
|
firePropertyChange(PROP_SUSPENDED);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
firePropertyChange(PROP_SUSPENDED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2442,9 +2442,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
asyncExec(new Runnable() {
|
asyncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
updatePC(PC_RUNNING);
|
updatePC(PC_RUNNING);
|
||||||
|
firePropertyChange(PROP_SUSPENDED);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
firePropertyChange(PROP_SUSPENDED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ import org.eclipse.jface.text.BadLocationException;
|
||||||
*/
|
*/
|
||||||
public class FunctionOffsetRulerColumn extends DisassemblyRulerColumn {
|
public class FunctionOffsetRulerColumn extends DisassemblyRulerColumn {
|
||||||
|
|
||||||
|
/** Maximum width of column (in characters) */
|
||||||
|
private static final int MAXWIDTH= 40;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor.
|
* Default constructor.
|
||||||
*/
|
*/
|
||||||
|
@ -39,9 +42,13 @@ public class FunctionOffsetRulerColumn extends DisassemblyRulerColumn {
|
||||||
AddressRangePosition pos = doc.getDisassemblyPosition(offset);
|
AddressRangePosition pos = doc.getDisassemblyPosition(offset);
|
||||||
if (pos instanceof DisassemblyPosition && pos.length > 0 && pos.offset == offset && pos.fValid) {
|
if (pos instanceof DisassemblyPosition && pos.length > 0 && pos.offset == offset && pos.fValid) {
|
||||||
DisassemblyPosition disassPos = (DisassemblyPosition)pos;
|
DisassemblyPosition disassPos = (DisassemblyPosition)pos;
|
||||||
|
int length = disassPos.fFunction.length;
|
||||||
|
if (length > MAXWIDTH) {
|
||||||
|
return "..." + new String(disassPos.fFunction, length - MAXWIDTH + 3, MAXWIDTH - 3); //$NON-NLS-1$
|
||||||
|
}
|
||||||
return new String(disassPos.fFunction);
|
return new String(disassPos.fFunction);
|
||||||
} else if (pos != null && !pos.fValid) {
|
} else if (pos != null && !pos.fValid) {
|
||||||
return DOTS.substring(0, doc.getMaxFunctionLength());
|
return DOTS.substring(0, Math.min(MAXWIDTH, doc.getMaxFunctionLength()));
|
||||||
}
|
}
|
||||||
} catch (BadLocationException e) {
|
} catch (BadLocationException e) {
|
||||||
// silently ignored
|
// silently ignored
|
||||||
|
@ -52,15 +59,7 @@ public class FunctionOffsetRulerColumn extends DisassemblyRulerColumn {
|
||||||
@Override
|
@Override
|
||||||
protected int computeNumberOfCharacters() {
|
protected int computeNumberOfCharacters() {
|
||||||
DisassemblyDocument doc = (DisassemblyDocument)getParentRuler().getTextViewer().getDocument();
|
DisassemblyDocument doc = (DisassemblyDocument)getParentRuler().getTextViewer().getDocument();
|
||||||
return doc.getMaxFunctionLength();
|
return Math.min(MAXWIDTH, doc.getMaxFunctionLength());
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.text.source.IVerticalRulerColumn#getWidth()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int getWidth() {
|
|
||||||
return super.getWidth();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue