#include "completer.h"
#include "value.h"
#include "exec.h"
-#include "observer.h"
+#include "observable.h"
#include "arch-utils.h"
#include "gdbthread.h"
#include "progspace.h"
#include <sys/stat.h>
#include "solist.h"
#include <algorithm>
+#include "common/pathstuff.h"
void (*deprecated_file_changed_hook) (const char *);
}
else
{
- char *temp_pathname;
-
scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST,
filename, write_files ?
O_RDWR | O_BINARY : O_RDONLY | O_BINARY,
- &temp_pathname);
+ &scratch_storage);
#if defined(__GO32__) || defined(_WIN32) || defined(__CYGWIN__)
if (scratch_chan < 0)
{
exename, write_files ?
O_RDWR | O_BINARY
: O_RDONLY | O_BINARY,
- &temp_pathname);
+ &scratch_storage);
}
#endif
if (scratch_chan < 0)
perror_with_name (filename);
- scratch_storage.reset (temp_pathname);
- scratch_pathname = temp_pathname;
+ scratch_pathname = scratch_storage.get ();
/* gdb_bfd_open (and its variants) prefers canonicalized
pathname for better BFD caching. */
}
bfd_cache_close_all ();
- observer_notify_executable_changed ();
+ gdb::observers::executable_changed.notify ();
}
/* Process the first arg in ARGS as the new exec file.