diff options
author | Daniel Jacobowitz <dan@debian.org> | 2006-07-24 20:38:08 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2006-07-24 20:38:08 +0000 |
commit | 2701c9344468a952d79b511adbf26f2c6c0c93ac (patch) | |
tree | 80d71949589d3c39ab0276b6239de05a94b469a0 /gdb/corefile.c | |
parent | d8dbb323d4366a3455a6203cc6bf356dc909775c (diff) | |
download | gdb-2701c9344468a952d79b511adbf26f2c6c0c93ac.tar.gz |
gdb/
* corefile.c (reopen_exec_file): Only check for an open exec file.
Use exec_file_attach.
* exec.c (exec_open): Make static.
(exec_file_command): Don't use target_preopen. Query directly about
changing the file.
* gdbcore.h (exec_open): Remove prototype.
gdb/testsuite/
* gdb.base/completion.exp: Update for change in "file" behavior.
* gdb.stabs/weird.exp: Likewise.
* lib/mi-support.exp (mi_gdb_file_cmd): Likewise.
* lib/gdb.exp (gdb_file_cmd): Likewise. Kill the program explicitly.
Diffstat (limited to 'gdb/corefile.c')
-rw-r--r-- | gdb/corefile.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/corefile.c b/gdb/corefile.c index c49d00c8191..03e853bb5f4 100644 --- a/gdb/corefile.c +++ b/gdb/corefile.c @@ -156,8 +156,8 @@ reopen_exec_file (void) struct stat st; long mtime; - /* Don't do anything if the current target isn't exec. */ - if (exec_bfd == NULL || strcmp (target_shortname, "exec") != 0) + /* Don't do anything if there isn't an exec file. */ + if (exec_bfd == NULL) return; /* If the timestamp of the exec file has changed, reopen it. */ @@ -167,9 +167,7 @@ reopen_exec_file (void) res = stat (filename, &st); if (mtime && mtime != st.st_mtime) - { - exec_open (filename, 0); - } + exec_file_attach (filename, 0); #endif } |