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:
parent
6f676cdf2f
commit
8142a166ff
1522
debugger/msc.c
1522
debugger/msc.c
File diff suppressed because it is too large
Load Diff
|
@ -107,6 +107,7 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
|
|||
int i;
|
||||
struct open_filelist * ol;
|
||||
int nlines;
|
||||
char * basename;
|
||||
char * pnt;
|
||||
int rtn;
|
||||
struct searchlist * sl;
|
||||
|
@ -131,10 +132,17 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
|
|||
/*
|
||||
* 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)
|
||||
{
|
||||
pnt = strrchr(ol->path, '/');
|
||||
if( pnt != NULL && strcmp(pnt + 1, sourcefile) == 0 )
|
||||
if( strcmp(ol->path, basename) == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -144,19 +152,6 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
|
|||
|
||||
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.
|
||||
*/
|
||||
|
@ -165,6 +160,10 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
|
|||
{
|
||||
strcpy(tmppath, sourcefile);
|
||||
}
|
||||
else if( (status = stat(basename, &statbuf)) != -1 )
|
||||
{
|
||||
strcpy(tmppath, basename);
|
||||
}
|
||||
else
|
||||
{
|
||||
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.
|
||||
*/
|
||||
strcat(tmppath, pnt);
|
||||
strcat(tmppath, basename);
|
||||
|
||||
status = stat(tmppath, &statbuf);
|
||||
if( status != -1 )
|
||||
|
@ -206,7 +205,7 @@ DEBUG_DisplaySource(char * sourcefile, int start, int end)
|
|||
/*
|
||||
* Now append the base file name.
|
||||
*/
|
||||
strcat(tmppath, pnt);
|
||||
strcat(tmppath, basename);
|
||||
|
||||
status = stat(tmppath, &statbuf);
|
||||
if( status == -1 )
|
||||
|
|
Loading…
Reference in New Issue