This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/RFC] new argv handlers to help with sim argv building
- From: Tom Tromey <tromey at redhat dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: gdb-patches at sourceware dot org, toolchain-devel at blackfin dot uclinux dot org
- Date: Fri, 03 Jun 2011 10:56:24 -0600
- Subject: Re: [PATCH/RFC] new argv handlers to help with sim argv building
- References: <1306440200-25087-1-git-send-email-vapier__8251.52545371584$1306440225$gmane$org@gentoo.org> <m3boyovxws.fsf@fleche.redhat.com> <201106011217.55915.vapier@gentoo.org>
>>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
Mike> i slapped this together. what do you think (ignoring missing docs) ?
It seems reasonable to me overall, though see below.
Mike> +char **appendargv (char **argv, const char *arg, ...)
Wrong formatting.
The canonical source for libiberty is gcc, so changes have to go there.
Mike> + argv = appendargv (argv, "--sysroot", gdb_sysroot, NULL);
[...]
Mike> + uargv = gdb_buildargv (args);
Mike> + sim_argv = mergeargv (argv, uargv, NULL);
Mike> + freeargv (argv);
If there is only one argument potentially needing quoting from
buildargv, and we have to do splitting and merging as well, then it
seems like it would be simpler to just add a quoting function and use
that.
Tom