aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-07-20 22:19:07 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-07-20 22:19:07 +0000
commit569b05a56052fbdf2fa18ac7b3f4f210257f6eee (patch)
treea8e638c20e47096678eb126ae0db9f69ba3d1f81 /gdb/symfile.c
parent51d7d80300853eac20339390e1ae05de71e7e1e3 (diff)
downloadgdb-569b05a56052fbdf2fa18ac7b3f4f210257f6eee.zip
gdb-569b05a56052fbdf2fa18ac7b3f4f210257f6eee.tar.gz
gdb-569b05a56052fbdf2fa18ac7b3f4f210257f6eee.tar.bz2
gdb/
* symfile.c (find_separate_debug_file_by_debuglink): Remove a gdb_assert call, new comment. gdb/testsuite/ * gdb.base/solib-nodir.exp: New file. * lib/gdb.exp (runto): New case for a GDB internal error.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index babe9cf..371db0d 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1374,15 +1374,13 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile)
dir = xstrdup (objfile->name);
/* 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. */
+ followed by a slash. The directory can be relative or absolute. */
for (i = strlen(dir) - 1; i >= 0; i--)
{
if (IS_DIR_SEPARATOR (dir[i]))
break;
}
- gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
+ /* If I is -1 then no directory is present there and DIR will be "". */
dir[i+1] = '\0';
/* Set I to max (strlen (canon_name), strlen (dir)). */