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;
|
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 )
|
||||||
|
|
Loading…
Reference in New Issue