mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
Porting pice. Bug fixes for disassembly.
svn path=/trunk/; revision=2577
This commit is contained in:
parent
e8e9853e27
commit
87b5401bff
1 changed files with 8 additions and 8 deletions
|
@ -1536,7 +1536,7 @@ LPSTR FindSourceLineForAddress(ULONG addr,PULONG pulLineNumber,LPSTR* ppSrcStart
|
||||||
// if we're in the function we're looking for
|
// if we're in the function we're looking for
|
||||||
if(szCurrentFunction[0] && PICE_fncmp(szCurrentFunction,pFunctionName)==0)
|
if(szCurrentFunction[0] && PICE_fncmp(szCurrentFunction,pFunctionName)==0)
|
||||||
{
|
{
|
||||||
DPRINT((0,"code source line number #%u for addr. %x (function @ %x) ulMinValue = %x ulDelta = %x\n",pStab->n_desc,start+pStab->n_value,start,ulMinValue,(addr-(start+pStab->n_value))));
|
DPRINT((0,"cslnum#%u for addr.%x (fn @ %x) ulMinVal=%x ulDelta=%x\n",pStab->n_desc,start+pStab->n_value,start,ulMinValue,(addr-(start+pStab->n_value))));
|
||||||
|
|
||||||
if(bFirstOccurence)
|
if(bFirstOccurence)
|
||||||
{
|
{
|
||||||
|
@ -1544,9 +1544,10 @@ LPSTR FindSourceLineForAddress(ULONG addr,PULONG pulLineNumber,LPSTR* ppSrcStart
|
||||||
DPRINT((0,"source file must be %s\n",szWantedPath));
|
DPRINT((0,"source file must be %s\n",szWantedPath));
|
||||||
bFirstOccurence = FALSE;
|
bFirstOccurence = FALSE;
|
||||||
}
|
}
|
||||||
|
DPRINT((0,"wanted %s, current: %s\n",szWantedPath, szCurrentPath));
|
||||||
// we might have a match if our address is greater than the one in the STAB
|
// we might have a match if our address is greater than the one in the STAB
|
||||||
// and we're lower or equal than minimum value
|
// and we're lower or equal than minimum value
|
||||||
|
//ei need to add the size of prolog 10(?)
|
||||||
if(addr>=start+pStab->n_value &&
|
if(addr>=start+pStab->n_value &&
|
||||||
(addr-(start+pStab->n_value))<=ulMinValue &&
|
(addr-(start+pStab->n_value))<=ulMinValue &&
|
||||||
PICE_strcmpi(szWantedPath,szCurrentPath)==0 )
|
PICE_strcmpi(szWantedPath,szCurrentPath)==0 )
|
||||||
|
@ -1571,14 +1572,13 @@ LPSTR FindSourceLineForAddress(ULONG addr,PULONG pulLineNumber,LPSTR* ppSrcStart
|
||||||
for(j=0;j<pSymbols->ulNumberOfSrcFiles;j++)
|
for(j=0;j<pSymbols->ulNumberOfSrcFiles;j++)
|
||||||
{
|
{
|
||||||
LPSTR pSlash;
|
LPSTR pSlash;
|
||||||
|
ULONG currlen, fnamelen;
|
||||||
|
|
||||||
// make basename
|
currlen = PICE_strlen( szCurrentPath );
|
||||||
pSlash = strrchr(pSrc->filename,'/');
|
fnamelen = PICE_strlen( pSrc->filename );
|
||||||
if(!pSlash)
|
pSlash = pSrc->filename + fnamelen - currlen;
|
||||||
pSlash = pSrc->filename;
|
|
||||||
else
|
|
||||||
pSlash++;
|
|
||||||
|
|
||||||
|
//DPRINT((0,"pSlash: %s, szCurrentPath: %s\n", pSlash, szCurrentPath));
|
||||||
// if base name matches current path we have found the correct source file
|
// if base name matches current path we have found the correct source file
|
||||||
if(PICE_strcmpi(pSlash,szCurrentPath)==0)
|
if(PICE_strcmpi(pSlash,szCurrentPath)==0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue