[PATCH/RFC] new argv handlers to help with sim argv building

Mike Frysinger vapier@gentoo.org
Fri Jun 3 18:34:00 GMT 2011


On Friday, June 03, 2011 12:56:24 Tom Tromey wrote:
> >>>>> "Mike" == Mike Frysinger <vapier@gentoo.org> writes:
> Mike> +char **appendargv (char **argv, const char *arg, ...)
> 
> Wrong formatting.

i dont know what you mean

> The canonical source for libiberty is gcc, so changes have to go there.

yes, but i'm just bouncing the idea right now

> 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.

quoting opens a whole can of worms i dont want to think about.  simply 
sticking quotes around gdb_sysroot doesnt solve the whole problem.  what if 
the sysroot has quotes in it ?  i'd prefer to stick in the argv world.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110603/28539fc9/attachment.sig>


More information about the Gdb-patches mailing list