Parse CodeView type/symbol info with 32-bit type indices.

Added (partial) support for VC 5/6 .PDB files.
Fixed treatment of source file names containing path.
This commit is contained in:
Ulrich Weigand 1999-12-10 03:43:53 +00:00 committed by Alexandre Julliard
parent 6f676cdf2f
commit 8142a166ff
2 changed files with 1070 additions and 485 deletions

File diff suppressed because it is too large Load Diff

View File

@ -107,6 +107,7 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
int i; int i;
struct open_filelist * ol; struct open_filelist * ol;
int nlines; int nlines;
char * basename;
char * pnt; char * pnt;
int rtn; int rtn;
struct searchlist * sl; struct searchlist * sl;
@ -131,10 +132,17 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
/* /*
* Try again, stripping the path from the opened file. * Try again, stripping the path from the opened file.
*/ */
basename = strrchr(sourcefile, '\\' );
if ( !basename )
basename = strrchr(sourcefile, '/' );
if ( !basename )
basename = sourcefile;
else
basename++;
for(ol = ofiles; ol; ol = ol->next) for(ol = ofiles; ol; ol = ol->next)
{ {
pnt = strrchr(ol->path, '/'); if( strcmp(ol->path, basename) == 0 )
if( pnt != NULL && strcmp(pnt + 1, sourcefile) == 0 )
{ {
break; break;
} }
@ -144,19 +152,6 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
if( ol == NULL ) if( ol == NULL )
{ {
/*
* See if this is a DOS style name or not.
*/
pnt = strchr(sourcefile, '\\' );
if( pnt == NULL )
{
pnt = strchr(sourcefile, '/' );
if( pnt == NULL )
{
pnt = sourcefile;
}
}
/* /*
* Crapola. We need to try and open the file. * Crapola. We need to try and open the file.
*/ */
@ -165,6 +160,10 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
{ {
strcpy(tmppath, sourcefile); strcpy(tmppath, sourcefile);
} }
else if( (status = stat(basename, &statbuf)) != -1 )
{
strcpy(tmppath, basename);
}
else else
{ {
for(sl = listhead; sl; sl = sl->next) for(sl = listhead; sl; sl = sl->next)
@ -177,7 +176,7 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
/* /*
* Now append the base file name. * Now append the base file name.
*/ */
strcat(tmppath, pnt); strcat(tmppath, basename);
status = stat(tmppath, &statbuf); status = stat(tmppath, &statbuf);
if( status != -1 ) if( status != -1 )
@ -206,7 +205,7 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
/* /*
* Now append the base file name. * Now append the base file name.
*/ */
strcat(tmppath, pnt); strcat(tmppath, basename);
status = stat(tmppath, &statbuf); status = stat(tmppath, &statbuf);
if( status == -1 ) if( status == -1 )