mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Fix compilation with Neon M4.
Change-Id: Ia7f862540b14a2eec37804049d4cfb27e9f028e0 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
This commit is contained in:
parent
871e7abcd0
commit
af49d7701a
4 changed files with 41 additions and 40 deletions
|
@ -65,8 +65,7 @@ public class CFormattingStrategy extends ContextBasedFormattingStrategy {
|
||||||
if (document == null || partition == null)
|
if (document == null || partition == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
Map<String, String> preferences = getPreferences();
|
||||||
Map<String, Object> preferences = getPreferences();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TextEdit edit = CodeFormatterUtil.format(
|
TextEdit edit = CodeFormatterUtil.format(
|
||||||
|
|
|
@ -2184,12 +2184,11 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
}
|
}
|
||||||
int offset= lineRegion.getOffset();
|
int offset= lineRegion.getOffset();
|
||||||
int length= lineRegion.getLength();
|
int length= lineRegion.getLength();
|
||||||
@SuppressWarnings("unchecked")
|
Iterator<Annotation> it= bpModel.getAnnotationIterator(offset, length, true, true);
|
||||||
Iterator<SimpleMarkerAnnotation> it= bpModel.getAnnotationIterator(offset, length, true, true);
|
|
||||||
List<IBreakpoint> bpList= new ArrayList<IBreakpoint>(5);
|
List<IBreakpoint> bpList= new ArrayList<IBreakpoint>(5);
|
||||||
final IBreakpointManager bpMgr= DebugPlugin.getDefault().getBreakpointManager();
|
final IBreakpointManager bpMgr= DebugPlugin.getDefault().getBreakpointManager();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
final SimpleMarkerAnnotation annotation= it.next();
|
final SimpleMarkerAnnotation annotation= (SimpleMarkerAnnotation) it.next();
|
||||||
IBreakpoint bp= bpMgr.getBreakpoint(annotation.getMarker());
|
IBreakpoint bp= bpMgr.getBreakpoint(annotation.getMarker());
|
||||||
if (bp != null) {
|
if (bp != null) {
|
||||||
bpList.add(bp);
|
bpList.add(bp);
|
||||||
|
|
|
@ -128,10 +128,9 @@ public class BreakpointsAnnotationModel extends DisassemblyAnnotationModel imple
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private Annotation findAnnotation(IMarker marker) {
|
private Annotation findAnnotation(IMarker marker) {
|
||||||
for (Iterator<SimpleMarkerAnnotation> it= getAnnotationIterator(false); it.hasNext();) {
|
for (Iterator<Annotation> it= getAnnotationIterator(false); it.hasNext();) {
|
||||||
SimpleMarkerAnnotation a= it.next();
|
SimpleMarkerAnnotation a= (SimpleMarkerAnnotation) it.next();
|
||||||
if (a.getMarker().equals(marker)) {
|
if (a.getMarker().equals(marker)) {
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,8 +188,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
}
|
}
|
||||||
|
|
||||||
public Iterator<Position> getPositionIterator(String category, int offset) throws BadPositionCategoryException {
|
public Iterator<Position> getPositionIterator(String category, int offset) throws BadPositionCategoryException {
|
||||||
@SuppressWarnings("unchecked")
|
List<Position> positions = getDocumentManagedPositions().get(category);
|
||||||
List<Position> positions = (List<Position>) getDocumentManagedPositions().get(category);
|
|
||||||
if (positions == null) {
|
if (positions == null) {
|
||||||
throw new BadPositionCategoryException();
|
throw new BadPositionCategoryException();
|
||||||
}
|
}
|
||||||
|
@ -198,22 +197,38 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
}
|
}
|
||||||
|
|
||||||
public Iterator<AddressRangePosition> getPositionIterator(String category, BigInteger address) throws BadPositionCategoryException {
|
public Iterator<AddressRangePosition> getPositionIterator(String category, BigInteger address) throws BadPositionCategoryException {
|
||||||
@SuppressWarnings("unchecked")
|
List<AddressRangePosition> positions = getAddressRangePositions(category);
|
||||||
List<AddressRangePosition> positions = (List<AddressRangePosition>) getDocumentManagedPositions().get(category);
|
|
||||||
if (positions == null) {
|
|
||||||
throw new BadPositionCategoryException();
|
|
||||||
}
|
|
||||||
int idx = computeIndexInPositionListFirst(positions, address);
|
int idx = computeIndexInPositionListFirst(positions, address);
|
||||||
return positions.listIterator(idx);
|
return positions.listIterator(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int computeIndexInCategory(String category, BigInteger address) throws BadPositionCategoryException {
|
private List<AddressRangePosition> getAddressRangePositions(String category) throws BadPositionCategoryException {
|
||||||
@SuppressWarnings("unchecked")
|
List<Position> tmpPositions = getDocumentManagedPositions().get(category);
|
||||||
List<AddressRangePosition> c = (List<AddressRangePosition>) getDocumentManagedPositions().get(category);
|
if (tmpPositions == null) {
|
||||||
if (c == null) {
|
|
||||||
throw new BadPositionCategoryException();
|
throw new BadPositionCategoryException();
|
||||||
}
|
}
|
||||||
return computeIndexInPositionListFirst(c, address);
|
List<AddressRangePosition> positions = new ArrayList<>();
|
||||||
|
for(Position position: tmpPositions) {
|
||||||
|
positions.add((AddressRangePosition) position);
|
||||||
|
}
|
||||||
|
return positions;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<AddressRangePosition> getAddressRangePositionsRaw(String category) {
|
||||||
|
List<Position> tmpPositions = getDocumentManagedPositions().get(category);
|
||||||
|
if (tmpPositions == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<AddressRangePosition> positions = new ArrayList<>();
|
||||||
|
for(Position position: tmpPositions) {
|
||||||
|
positions.add((AddressRangePosition) position);
|
||||||
|
}
|
||||||
|
return positions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int computeIndexInCategory(String category, BigInteger address) throws BadPositionCategoryException {
|
||||||
|
List<AddressRangePosition> positions = getAddressRangePositions(category);
|
||||||
|
return computeIndexInPositionListFirst(positions, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -380,8 +395,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
*/
|
*/
|
||||||
public Position getPositionOfIndex(String category, int index) throws BadPositionCategoryException {
|
public Position getPositionOfIndex(String category, int index) throws BadPositionCategoryException {
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
@SuppressWarnings("unchecked")
|
List<Position> positions = getDocumentManagedPositions().get(category);
|
||||||
List<Position> positions = (List<Position>) getDocumentManagedPositions().get(category);
|
|
||||||
if (positions == null) {
|
if (positions == null) {
|
||||||
throw new BadPositionCategoryException();
|
throw new BadPositionCategoryException();
|
||||||
}
|
}
|
||||||
|
@ -398,8 +412,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
}
|
}
|
||||||
|
|
||||||
public AddressRangePosition getPositionOfAddress(String category, BigInteger address) {
|
public AddressRangePosition getPositionOfAddress(String category, BigInteger address) {
|
||||||
@SuppressWarnings("unchecked")
|
List<AddressRangePosition> positions = getAddressRangePositionsRaw(category);
|
||||||
List<AddressRangePosition> positions = (List<AddressRangePosition>) getDocumentManagedPositions().get(category);
|
|
||||||
if (positions == null) {
|
if (positions == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -419,8 +432,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AddressRangePosition getPositionInAddressRange(String category, AddressRangePosition range) {
|
public AddressRangePosition getPositionInAddressRange(String category, AddressRangePosition range) {
|
||||||
@SuppressWarnings("unchecked")
|
List<AddressRangePosition> positions = getAddressRangePositionsRaw(category);
|
||||||
List<AddressRangePosition> positions = (List<AddressRangePosition>) getDocumentManagedPositions().get(category);
|
|
||||||
if (positions == null) {
|
if (positions == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -643,8 +655,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
* @throws BadLocationException
|
* @throws BadLocationException
|
||||||
*/
|
*/
|
||||||
public Position getPosition(String category, int offset, boolean allowZeroLength) throws BadLocationException, BadPositionCategoryException {
|
public Position getPosition(String category, int offset, boolean allowZeroLength) throws BadLocationException, BadPositionCategoryException {
|
||||||
@SuppressWarnings("unchecked")
|
List<Position> list = getDocumentManagedPositions().get(category);
|
||||||
List<Position> list = (List<Position>) getDocumentManagedPositions().get(category);
|
|
||||||
int idx;
|
int idx;
|
||||||
idx = computeIndexInPositionList(list, offset, true);
|
idx = computeIndexInPositionList(list, offset, true);
|
||||||
if (idx > 0) {
|
if (idx > 0) {
|
||||||
|
@ -681,8 +692,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
* @param pos
|
* @param pos
|
||||||
*/
|
*/
|
||||||
public void addModelPositionFirst(AddressRangePosition pos) {
|
public void addModelPositionFirst(AddressRangePosition pos) {
|
||||||
@SuppressWarnings("unchecked")
|
List<AddressRangePosition> list = getAddressRangePositionsRaw(CATEGORY_MODEL);
|
||||||
List<AddressRangePosition> list = (List<AddressRangePosition>) getDocumentManagedPositions().get(CATEGORY_MODEL);
|
|
||||||
int idx;
|
int idx;
|
||||||
idx = computeIndexInPositionListFirst(list, pos.fAddressOffset.add(pos.fAddressLength));
|
idx = computeIndexInPositionListFirst(list, pos.fAddressOffset.add(pos.fAddressLength));
|
||||||
if (idx < list.size()) {
|
if (idx < list.size()) {
|
||||||
|
@ -724,11 +734,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
* @throws BadPositionCategoryException
|
* @throws BadPositionCategoryException
|
||||||
*/
|
*/
|
||||||
public void addPositionLast(String category, AddressRangePosition pos) throws BadPositionCategoryException {
|
public void addPositionLast(String category, AddressRangePosition pos) throws BadPositionCategoryException {
|
||||||
@SuppressWarnings("unchecked")
|
List<AddressRangePosition> list = getAddressRangePositions(category);
|
||||||
List<AddressRangePosition> list = (List<AddressRangePosition>) getDocumentManagedPositions().get(category);
|
|
||||||
if (list == null) {
|
|
||||||
throw new BadPositionCategoryException();
|
|
||||||
}
|
|
||||||
if (DEBUG) System.out.println("Adding position to category <" + category + "> : " + pos); //$NON-NLS-1$ //$NON-NLS-2$
|
if (DEBUG) System.out.println("Adding position to category <" + category + "> : " + pos); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
list.add(computeIndexInPositionListLast(list, pos.fAddressOffset), pos);
|
list.add(computeIndexInPositionListLast(list, pos.fAddressOffset), pos);
|
||||||
}
|
}
|
||||||
|
@ -817,7 +823,6 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void removePositions(String category, List<AddressRangePosition> toRemove) {
|
public void removePositions(String category, List<AddressRangePosition> toRemove) {
|
||||||
if (toRemove.isEmpty()) {
|
if (toRemove.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -831,12 +836,12 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Position> positions = (List<Position>) getDocumentManagedPositions().get(category);
|
List<Position> positions = getDocumentManagedPositions().get(category);
|
||||||
if (positions != null) {
|
if (positions != null) {
|
||||||
positions.removeAll(toRemove);
|
positions.removeAll(toRemove);
|
||||||
}
|
}
|
||||||
if (!category.equals(CATEGORY_MODEL)) {
|
if (!category.equals(CATEGORY_MODEL)) {
|
||||||
positions = (List<Position>) getDocumentManagedPositions().get(CATEGORY_MODEL);
|
positions = getDocumentManagedPositions().get(CATEGORY_MODEL);
|
||||||
if (positions != null) {
|
if (positions != null) {
|
||||||
positions.removeAll(toRemove);
|
positions.removeAll(toRemove);
|
||||||
}
|
}
|
||||||
|
@ -852,8 +857,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
||||||
if (category == null)
|
if (category == null)
|
||||||
throw new BadPositionCategoryException();
|
throw new BadPositionCategoryException();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
List<Position> list = getDocumentManagedPositions().get(category);
|
||||||
List<Position> list = (List<Position>) getDocumentManagedPositions().get(category);
|
|
||||||
if (list == null)
|
if (list == null)
|
||||||
throw new BadPositionCategoryException();
|
throw new BadPositionCategoryException();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue