diff options
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-dump.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index e288ee6..4bba10c 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -511,7 +511,11 @@ restore_binary_file (char *filename, struct callback_data *data) /* Get the file size for reading. */ if (fseek (file, 0, SEEK_END) == 0) - len = ftell (file); + { + len = ftell (file); + if (len < 0) + perror_with_name (filename); + } else perror_with_name (filename); |