From: Jan Kratochvil Date: Tue, 20 Jul 2010 22:22:57 +0000 (+0000) Subject: gdb/ X-Git-Tag: gdb_7_2-2010-09-02-release~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d9cfe098d13b5e12ff98f21ef0a4585366876e3;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1fbf5f81bfd..67184843ad4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-07-20 Jan Kratochvil + + * symfile.c (find_separate_debug_file_by_debuglink): Remove + a gdb_assert call, new comment. + 2010-07-16 Thiago Jung Bauermann * NEWS: Mention support for the new ptrace interface and hardware diff --git a/gdb/symfile.c b/gdb/symfile.c index ab51fa4ed16..42f7ae3e074 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1371,15 +1371,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)). */ diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9e82cd3be46..bbe4896bc5a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-07-20 Jan Kratochvil + + * gdb.base/solib-nodir.exp: New file. + * lib/gdb.exp (runto): New case for a GDB internal error. + 2010-07-20 Jan Kratochvil Ulrich Weigand Tom Tromey diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b5b33628f9b..20e2fb771f7 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -423,6 +423,11 @@ proc runto { function args } { unsupported "Non-stop mode not supported" return 0 } + -re ".*A problem internal to GDB has been detected" { + fail "running to $function in runto (GDB internal error)" + gdb_internal_error_resync + return 0 + } -re "$gdb_prompt $" { fail "running to $function in runto" return 0