* symfile.c (find_separate_debug_file): Assert that the objfile's
directory name we compute ends with a slash, and then assume that that's so everywhere we use it.
This commit is contained in:
parent
85b9a93839
commit
fe36c4f4c2
|
@ -1,3 +1,9 @@
|
||||||
|
2003-01-30 Jim Blandy <jimb@redhat.com>
|
||||||
|
|
||||||
|
* symfile.c (find_separate_debug_file): Assert that the objfile's
|
||||||
|
directory name we compute ends with a slash, and then assume that
|
||||||
|
that's so everywhere we use it.
|
||||||
|
|
||||||
2003-01-30 Daniel Jacobowitz <drow@mvista.com>
|
2003-01-30 Daniel Jacobowitz <drow@mvista.com>
|
||||||
|
|
||||||
* valops.c (value_assign): Flush frame cache after stores to memory
|
* valops.c (value_assign): Flush frame cache after stores to memory
|
||||||
|
|
|
@ -1167,12 +1167,16 @@ find_separate_debug_file (struct objfile *objfile)
|
||||||
|
|
||||||
dir = xstrdup (objfile->name);
|
dir = xstrdup (objfile->name);
|
||||||
|
|
||||||
/* Strip off filename part */
|
/* Strip off the final filename part, leaving the directory name,
|
||||||
|
followed by a slash. Objfile names should always be absolute and
|
||||||
|
tilde-expanded, so there should always be a slash in there
|
||||||
|
somewhere. */
|
||||||
for (i = strlen(dir) - 1; i >= 0; i--)
|
for (i = strlen(dir) - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (IS_DIR_SEPARATOR (dir[i]))
|
if (IS_DIR_SEPARATOR (dir[i]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
|
||||||
dir[i+1] = '\0';
|
dir[i+1] = '\0';
|
||||||
|
|
||||||
debugfile = alloca (strlen (debug_file_directory) + 1
|
debugfile = alloca (strlen (debug_file_directory) + 1
|
||||||
|
@ -1210,7 +1214,6 @@ find_separate_debug_file (struct objfile *objfile)
|
||||||
strcpy (debugfile, debug_file_directory);
|
strcpy (debugfile, debug_file_directory);
|
||||||
strcat (debugfile, "/");
|
strcat (debugfile, "/");
|
||||||
strcat (debugfile, dir);
|
strcat (debugfile, dir);
|
||||||
strcat (debugfile, "/");
|
|
||||||
strcat (debugfile, basename);
|
strcat (debugfile, basename);
|
||||||
|
|
||||||
if (separate_debug_file_exists (debugfile, crc32))
|
if (separate_debug_file_exists (debugfile, crc32))
|
||||||
|
|
Loading…
Reference in New Issue