This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add -### option
>>>>> "Zack" == Zack Weinberg <zack@codesourcery.com> writes:
Zack> As a vaguely related thing: I was contemplating, not so long
Zack> ago, a mode for the driver where it would run gdb on cc1 for
Zack> you. I got stuck because as far as I know there is no way to
Zack> set the debuggee's command line arguments from gdb's command
Zack> line. Your script sounds like it solves this - how?
I've long wanted the same thing. I've written a patch to gdb which
lets you set the inferior's command-line arguments from the gdb
command line:
gdb --args cc1 -ffoo -fbar ...
This patch is still in progress. I need to rewrite it before the gdb
maintainers will accept it.
I also hacked gdb to let me do this. One problem I ran into is that
gdb doesn't pass its std* file descriptors to the inferior. Some work
there is required.
Anyway, we're closer to having this than you might think. Even
without the I/O redirection stuff, the gdb patch is nice because it
makes cutting and pasting a simpler operation.
Tom