diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-07-24 20:38:08 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-07-24 20:38:08 +0000 |
commit | 4c42eaff630026a1c9589e913d072935fed919c1 (patch) | |
tree | af7754be431bda48c2d576f4ebf431a1af11c819 /gdb/corefile.c | |
parent | b05e64e5fe26950eba7f895b31019b8cc598b42d (diff) | |
download | binutils-4c42eaff630026a1c9589e913d072935fed919c1.zip binutils-4c42eaff630026a1c9589e913d072935fed919c1.tar.gz binutils-4c42eaff630026a1c9589e913d072935fed919c1.tar.bz2 |
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 c49d00c..03e853b 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 } |