/* Core dump and executable file functions above target vector, for GDB.
- Copyright 1986, 1987, 1989, 1991-1994, 2000
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
+ 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GDB.
#include "symtab.h"
#include "command.h"
#include "gdbcmd.h"
+#include "symfile.h"
#include "bfd.h"
#include "target.h"
#include "gdbcore.h"
{
char *symfile_copy = xstrdup (symfile);
- make_cleanup (free, symfile_copy);
- symbol_file_command (symfile_copy, from_tty);
+ make_cleanup (xfree, symfile_copy);
+ symbol_file_add_main (symfile_copy, from_tty);
}
else
warning ("Unknown symbols for '%s'; use the 'symbol-file' command.", filename);
/* If the timestamp of the exec file has changed, reopen it. */
filename = xstrdup (bfd_get_filename (exec_bfd));
- make_cleanup (free, filename);
+ make_cleanup (xfree, filename);
mtime = bfd_get_mtime (exec_bfd);
res = stat (filename, &st);
if (mtime && mtime != st.st_mtime)
- exec_file_command (filename, 0);
+ {
+ exec_open (filename, 0);
+ }
#endif
}
\f
set_gnutarget (char *newtarget)
{
if (gnutarget_string != NULL)
- free (gnutarget_string);
+ xfree (gnutarget_string);
gnutarget_string = savestring (newtarget, strlen (newtarget));
set_gnutarget_command (NULL, 0, NULL);
}