diff options
Diffstat (limited to 'gdb/corefile.c')
-rw-r--r-- | gdb/corefile.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/corefile.c b/gdb/corefile.c index c849a106466..114de836403 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -62,12 +62,14 @@ core_file_command (const char *filename, int from_tty) { dont_repeat (); /* Either way, seems bogus. */ - gdb_assert (the_core_target != NULL); - if (!filename) - the_core_target->detach (current_inferior (), from_tty); + { + gdb_assert (the_core_target != NULL); + + the_core_target->detach (current_inferior (), from_tty); + } else - the_core_target->open (filename, from_tty); + core_target_open (filename, from_tty); } |