* source.c (forward_search_command): Don't fclose the stream,
authorKeith Seitz <keiths@redhat.com>
Thu, 23 Jul 2009 23:20:00 +0000 (23:20 +0000)
committerKeith Seitz <keiths@redhat.com>
Thu, 23 Jul 2009 23:20:00 +0000 (23:20 +0000)
just run the cleanups.
(reverse_search_command): Likewise.

gdb/ChangeLog
gdb/source.c

index ca7e063232cb4ca5a8996636cf36960607b9cccf..ef4936d28b9b84b8360f418138b36e872b6c9efb 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-23  Keith Seitz  <keiths@redhat.com>
+
+       * source.c (forward_search_command): Don't fclose the stream,
+       just run the cleanups.
+       (reverse_search_command): Likewise.
+
 2009-07-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
        * symtab.c (search_symbols): Add QUIT.
index c40a5aadc0c71ae475f5b28dc6e170b81ff80acd..c39c0a6adfb93082254e269580ffd54dae477ba1 100644 (file)
@@ -1612,7 +1612,7 @@ forward_search_command (char *regex, int from_tty)
       if (re_exec (buf) > 0)
        {
          /* Match! */
-         fclose (stream);
+         do_cleanups (cleanups);
          print_source_lines (current_source_symtab, line, line + 1, 0);
          set_internalvar_integer (lookup_internalvar ("_"), line);
          current_source_line = max (line - lines_to_list / 2, 1);
@@ -1690,7 +1690,7 @@ reverse_search_command (char *regex, int from_tty)
       if (re_exec (buf) > 0)
        {
          /* Match! */
-         fclose (stream);
+         do_cleanups (cleanups);
          print_source_lines (current_source_symtab, line, line + 1, 0);
          set_internalvar_integer (lookup_internalvar ("_"), line);
          current_source_line = max (line - lines_to_list / 2, 1);
@@ -1699,7 +1699,7 @@ reverse_search_command (char *regex, int from_tty)
       line--;
       if (fseek (stream, current_source_symtab->line_charpos[line - 1], 0) < 0)
        {
-         fclose (stream);
+         do_cleanups (cleanups);
          perror_with_name (current_source_symtab->filename);
        }
     }
This page took 0.031321 seconds and 4 git commands to generate.