mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
fixed bug 308535, fail to read symbol name of eight bytes.
This commit is contained in:
parent
dd621839a6
commit
ab2d1ddfee
1 changed files with 4 additions and 2 deletions
|
@ -406,7 +406,7 @@ public class Coff {
|
|||
public short n_scnum; /* short, Section number. */
|
||||
public int n_type; /* Unsigned short. Symbolic type. */
|
||||
public byte n_sclass; /* char, Storage class. */
|
||||
public byte n_numaux; /* char. Nuymber of auxiliary enties. */
|
||||
public byte n_numaux; /* char. Number of auxiliary enties. */
|
||||
|
||||
public Symbol(RandomAccessFile file) throws IOException {
|
||||
this(file, file.getFilePointer());
|
||||
|
@ -430,12 +430,14 @@ public class Coff {
|
|||
}
|
||||
|
||||
public String getName() {
|
||||
// For a long name, _n_name[0] == 0 and this would just return empty string.
|
||||
for (int i = 0; i < _n_name.length; i++) {
|
||||
if (_n_name[i] == 0) {
|
||||
return new String(_n_name, 0, i);
|
||||
}
|
||||
}
|
||||
return ""; //$NON-NLS-1$
|
||||
// all eight bytes are filled
|
||||
return new String(_n_name);
|
||||
}
|
||||
|
||||
public String getName(byte[] table) {
|
||||
|
|
Loading…
Add table
Reference in a new issue