mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for exitCompilationUnit
This commit is contained in:
parent
a581a6aa81
commit
fe99b95df8
1 changed files with 13 additions and 12 deletions
|
@ -110,24 +110,22 @@ public class Stabs {
|
||||||
|
|
||||||
int read_4_bytes(byte[] bytes, int offset) {
|
int read_4_bytes(byte[] bytes, int offset) {
|
||||||
if (isLe) {
|
if (isLe) {
|
||||||
return (
|
return (((bytes[offset + 3] & 0xff) << 24)
|
||||||
((bytes[offset + 3] & 0xff) << 24)
|
| ((bytes[offset + 2] & 0xff) << 16)
|
||||||
+ ((bytes[offset + 2] & 0xff) << 16)
|
| ((bytes[offset + 1] & 0xff) << 8)
|
||||||
+ ((bytes[offset + 1] & 0xff) << 8)
|
| (bytes[offset] & 0xff));
|
||||||
+ (bytes[offset] & 0xff));
|
|
||||||
}
|
}
|
||||||
return (
|
return (((bytes[offset] & 0xff) << 24)
|
||||||
((bytes[offset] & 0xff) << 24)
|
| ((bytes[offset + 1] & 0xff) << 16)
|
||||||
+ ((bytes[offset + 1] & 0xff) << 16)
|
| ((bytes[offset + 2] & 0xff) << 8)
|
||||||
+ ((bytes[offset + 2] & 0xff) << 8)
|
| (bytes[offset + 3] & 0xff));
|
||||||
+ (bytes[offset + 3] & 0xff));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
short read_2_bytes(byte[] bytes, int offset) {
|
short read_2_bytes(byte[] bytes, int offset) {
|
||||||
if (isLe) {
|
if (isLe) {
|
||||||
return (short) (((bytes[offset + 1] & 0xff) << 8) + (bytes[offset] & 0xff));
|
return (short) (((bytes[offset + 1] & 0xff) << 8) | (bytes[offset] & 0xff));
|
||||||
}
|
}
|
||||||
return (short) (((bytes[offset] & 0xff) << 8) + (bytes[offset + 1] & 0xff));
|
return (short) (((bytes[offset] & 0xff) << 8) | (bytes[offset + 1] & 0xff));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void parse(IDebugEntryRequestor requestor) {
|
public void parse(IDebugEntryRequestor requestor) {
|
||||||
|
@ -191,6 +189,7 @@ public class Stabs {
|
||||||
if (inCompilationUnit) {
|
if (inCompilationUnit) {
|
||||||
requestor.exitCompilationUnit(value);
|
requestor.exitCompilationUnit(value);
|
||||||
inCompilationUnit = false;
|
inCompilationUnit = false;
|
||||||
|
currentFile = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,6 +273,7 @@ public class Stabs {
|
||||||
if (inCompilationUnit) {
|
if (inCompilationUnit) {
|
||||||
requestor.exitCompilationUnit(value);
|
requestor.exitCompilationUnit(value);
|
||||||
inCompilationUnit = false;
|
inCompilationUnit = false;
|
||||||
|
currentFile = null;
|
||||||
}
|
}
|
||||||
if (field != null && field.length() > 0) {
|
if (field != null && field.length() > 0) {
|
||||||
// if it ends with "/" do not call the entering yet
|
// if it ends with "/" do not call the entering yet
|
||||||
|
@ -288,6 +288,7 @@ public class Stabs {
|
||||||
}
|
}
|
||||||
requestor.enterCompilationUnit(currentFile, value);
|
requestor.enterCompilationUnit(currentFile, value);
|
||||||
inCompilationUnit = true;
|
inCompilationUnit = true;
|
||||||
|
currentFile = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue