diff options
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 92fa9da..d9aff2f 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1483,14 +1483,11 @@ symbol_file_command (char *args, int from_tty) } else { - char **argv = buildargv (args); + char **argv = gdb_buildargv (args); int flags = OBJF_USERLOADED; struct cleanup *cleanups; char *name = NULL; - if (argv == NULL) - nomem (0); - cleanups = make_cleanup_freeargv (argv); while (*argv != NULL) { @@ -1924,11 +1921,10 @@ generic_load (char *args, int from_tty) make_cleanup (clear_memory_write_data, &cbdata.requests); - argv = buildargv (args); - - if (argv == NULL) - nomem(0); + if (args == NULL) + error_no_arg (_("file to load")); + argv = gdb_buildargv (args); make_cleanup_freeargv (argv); filename = tilde_expand (argv[0]); @@ -2117,12 +2113,9 @@ add_symbol_file_command (char *args, int from_tty) if (args == NULL) error (_("add-symbol-file takes a file name and an address")); - argv = buildargv (args); + argv = gdb_buildargv (args); make_cleanup_freeargv (argv); - if (argv == NULL) - nomem (0); - for (arg = argv[0], argcnt = 0; arg != NULL; arg = argv[++argcnt]) { /* Process the argument. */ |