diff options
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-dump.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index e9e393c..520c893 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -468,6 +468,9 @@ restore_binary_file (const char *filename, struct callback_data *data) gdb_file_up file = gdb_fopen_cloexec (filename, FOPEN_RB); long len; + if (file == NULL) + error (_("Failed to open %s: %s"), filename, safe_strerror (errno)); + /* Get the file size for reading. */ if (fseek (file.get (), 0, SEEK_END) == 0) { |