* gdb/remote.c (remote_open_1): Do preopen tasks before

irreversably destroying state.
This commit is contained in:
Nathan Sidwell
2006-06-08 19:04:08 +00:00
parent ea9c271d4e
commit 1dd41f16d1
2 changed files with 8 additions and 3 deletions

View File

@@ -2069,13 +2069,13 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
if (!async_p)
wait_forever_enabled_p = 1;
reopen_exec_file ();
reread_symbols ();
target_preopen (from_tty);
unpush_target (target);
reopen_exec_file ();
reread_symbols ();
remote_desc = remote_serial_open (name);
if (!remote_desc)
perror_with_name (name);