summaryrefslogtreecommitdiff
path: root/gdb/ser-mingw.c
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2008-10-03 16:36:10 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2008-10-03 16:36:10 +0000
commitd1a41061438a7f29a40c7bb91435111a1b61b641 (patch)
treeb378ea01b25b77f209a65dc3fc48db30b50f38f9 /gdb/ser-mingw.c
parent388853f746bee8a011fc076e798a7fd770f67fbe (diff)
downloadbinutils-gdb-d1a41061438a7f29a40c7bb91435111a1b61b641.tar.gz
2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
* utils.c, defs.h (gdb_buildargv): New fn. Wrap buildargv and check for out-of-memory condition. * exec.c (exec_file_command): Call it. * infrun.c (handle_command, xdb_handle_command): Likewise. * interps.c (interpreter_exec_cmd): Likewise. * linux-nat.c (linux_nat_info_proc_cmd): Likewise. * procfs.c (info_proc_cmd): Likewise. * remote-mips.c (common_open): Likewise. * remote-sim.c (gdbsim_kill, gdbsim_create_inferior) (gdbsim_open): Likewise. * remote.c (extended_remote_run, remote_put_command) (remote_get_command, remote_delete_command): Likewise. * ser-mingw.c (pipe_windows_open): Likesise. * source.c (add_path, show_substitute_path_command) (unset_substitute_path_command, set_substitute_path_command): Likewise. * stack.c (backtrace_command): Likewise. * symfile.c (symbol_file_command, generic_load) (add_symbol_file_command): Likesise. * symmisc.c (maintenance_print_symbols, maintenance_print_psymbols) (maintenance_print_msymbols): Likewise.
Diffstat (limited to 'gdb/ser-mingw.c')
-rw-r--r--gdb/ser-mingw.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/ser-mingw.c b/gdb/ser-mingw.c
index 98b8368e953..6a883aa19a3 100644
--- a/gdb/ser-mingw.c
+++ b/gdb/ser-mingw.c
@@ -818,12 +818,15 @@ pipe_windows_open (struct serial *scb, const char *name)
struct pipe_state *ps;
FILE *pex_stderr;
- char **argv = buildargv (name);
+ if (name == NULL)
+ error_no_arg (_("child command"));
+
+ char **argv = gdb_buildargv (name);
struct cleanup *back_to = make_cleanup_freeargv (argv);
+
if (! argv[0] || argv[0][0] == '\0')
error ("missing child command");
-
ps = make_pipe_state ();
make_cleanup (cleanup_pipe_state, ps);