]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2002-05-10 Daniel Jacobowitz <drow@mvista.com>
authorDaniel Jacobowitz <drow@false.org>
Fri, 10 May 2002 20:05:27 +0000 (20:05 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 10 May 2002 20:05:27 +0000 (20:05 +0000)
        * linespec.c (decode_line_1): Check for a double quote after
        a filename correctly.

gdb/ChangeLog
gdb/linespec.c

index e81d9fa20aefdc5d611fd0156427a2de9a6a63be..4c3c3fbeca15c3f565bfad5c90321a5066b5b588 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-10 Daniel Jacobowitz  <drow@mvista.com>
+
+       * linespec.c (decode_line_1): Check for a double quote after
+       a filename correctly.
+
 2002-05-10  Jim Blandy  <jimb@redhat.com>
 
        Properly track the size of the current objfile's .debug_line section.
index b9a772c9ad15509f92f27079fdb4a9bc3ff8b20c..f707234603f8f3a860a514dc4dbbd339e759cfc4 100644 (file)
@@ -931,20 +931,12 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
       if ((*p == '"') && is_quote_enclosed)
        --p;
       copy = (char *) alloca (p - *argptr + 1);
-      if ((**argptr == '"') && is_quote_enclosed)
-       {
-         memcpy (copy, *argptr + 1, p - *argptr - 1);
-         /* It may have the ending quote right after the file name */
-         if (copy[p - *argptr - 2] == '"')
-           copy[p - *argptr - 2] = 0;
-         else
-           copy[p - *argptr - 1] = 0;
-       }
+      memcpy (copy, *argptr, p - *argptr);
+      /* It may have the ending quote right after the file name */
+      if (is_quote_enclosed && copy[p - *argptr - 1] == '"')
+       copy[p - *argptr - 1] = 0;
       else
-       {
-         memcpy (copy, *argptr, p - *argptr);
-         copy[p - *argptr] = 0;
-       }
+       copy[p - *argptr] = 0;
 
       /* Find that file's data.  */
       s = lookup_symtab (copy);