diff options
author | Keith Seitz <keiths@redhat.com> | 2009-07-23 23:20:00 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2009-07-23 23:20:00 +0000 |
commit | e681b284b3a685300d41173387f3c44c4de1f284 (patch) | |
tree | e1529ba4bad0b1c44a310b706c21356c654c0103 /gdb | |
parent | 9b769489c6ae11df1294c5a1502daf8c78b00376 (diff) | |
download | gdb-e681b284b3a685300d41173387f3c44c4de1f284.zip gdb-e681b284b3a685300d41173387f3c44c4de1f284.tar.gz gdb-e681b284b3a685300d41173387f3c44c4de1f284.tar.bz2 |
* source.c (forward_search_command): Don't fclose the stream,
just run the cleanups.
(reverse_search_command): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/source.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ca7e063..ef4936d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/source.c b/gdb/source.c index c40a5aa..c39c0a6 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -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); } } |