From 1986bccdb576b7758273dfa5ec8274c6be55f268 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Tue, 21 Feb 2006 18:22:27 +0000 Subject: 2006-02-21 Andrew Stubbs * symfile.c (generic_load): Use buildargv() and tilde_expand() to parse file names with quoting, spaces and tildes properly. (load_command): Quote all special characters before calling target_load() such that buildargv() doesn't break file names. (_initialize_symfile): Mention the load offset in the help for the load command. * remote-sim.c: Include readline.h. (gdbsim_load): Use buildargv and tilde_expand() to parse file names with quoting, spaces and tildes properly. * target.h (target_load): Comment the parameters better. * Makefile.in (remote_sim.o): Add readline.h dependency. testsuite/ * gdb.base/help.exp (help load): Update expected results. --- gdb/remote-sim.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gdb/remote-sim.c') diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 2133f3e..e96018d 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -43,6 +43,7 @@ #include "gdb_assert.h" #include "sim-regno.h" #include "arch-utils.h" +#include "readline/readline.h" /* Prototypes */ @@ -391,8 +392,21 @@ gdbsim_kill (void) GDB's symbol tables to match. */ static void -gdbsim_load (char *prog, int fromtty) +gdbsim_load (char *args, int fromtty) { + char **argv = buildargv (args); + char *prog; + + if (argv == NULL) + nomem (0); + + make_cleanup_freeargv (argv); + + prog = tilde_expand (argv[0]); + + if (argv[1] != NULL) + error (_("GDB sim does not yet support a load offset.")); + if (sr_get_debug ()) printf_filtered ("gdbsim_load: prog \"%s\"\n", prog); -- cgit v1.1