2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
[deliverable/binutils-gdb.git] / gdb / symfile.c
index 92fa9da1ff7d7b3bd10975ebbd39d2fce28dc486..d9aff2f1e1c50cbeea03da3f916c3b2d687e0fbf 100644 (file)
@@ -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. */
This page took 0.02453 seconds and 4 git commands to generate.