mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:13:00 +00:00
In rsym, allow a stabs entry to be longer than 256 characters, so that ROS may be compiled with -feliminate-unused-debug-symbols which reduces the needed disk space a lot.
svn path=/trunk/; revision=35020
This commit is contained in:
parent
ca26e8cac7
commit
4509402aa9
1 changed files with 6 additions and 7 deletions
|
@ -143,6 +143,7 @@ ConvertStabs(ULONG *SymbolsCount, PROSSYM_ENTRY *SymbolsBase,
|
||||||
ULONG_PTR Address, LastFunctionAddress;
|
ULONG_PTR Address, LastFunctionAddress;
|
||||||
int First = 1;
|
int First = 1;
|
||||||
char *Name;
|
char *Name;
|
||||||
|
ULONG NameLen;
|
||||||
char FuncName[256];
|
char FuncName[256];
|
||||||
PROSSYM_ENTRY Current;
|
PROSSYM_ENTRY Current;
|
||||||
|
|
||||||
|
@ -220,18 +221,16 @@ ConvertStabs(ULONG *SymbolsCount, PROSSYM_ENTRY *SymbolsBase,
|
||||||
Current->Address = Address;
|
Current->Address = Address;
|
||||||
Current->FileOffset = Current[-1].FileOffset;
|
Current->FileOffset = Current[-1].FileOffset;
|
||||||
}
|
}
|
||||||
if (sizeof(FuncName) <= strlen((char *) StabStringsBase + StabEntry[i].n_strx))
|
Name = (char *) StabStringsBase + StabEntry[i].n_strx;
|
||||||
|
NameLen = strcspn(Name, ":");
|
||||||
|
if (sizeof(FuncName) <= NameLen)
|
||||||
{
|
{
|
||||||
free(*SymbolsBase);
|
free(*SymbolsBase);
|
||||||
fprintf(stderr, "Function name too long\n");
|
fprintf(stderr, "Function name too long\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
strcpy(FuncName, (char *) StabStringsBase + StabEntry[i].n_strx);
|
memcpy(FuncName, Name, NameLen);
|
||||||
Name = strchr(FuncName, ':');
|
FuncName[NameLen] = '\0';
|
||||||
if (NULL != Name)
|
|
||||||
{
|
|
||||||
*Name = '\0';
|
|
||||||
}
|
|
||||||
Current->FunctionOffset = FindOrAddString(FuncName,
|
Current->FunctionOffset = FindOrAddString(FuncName,
|
||||||
StringsLength,
|
StringsLength,
|
||||||
StringsBase);
|
StringsBase);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue