This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Buffering problems with "gdb < foo"
At 03:17 07/03/00 -0500, Eli Zaretskii wrote:
>
>> > Does this work on Unix? If so, it would make this a DJGPP-specific
>> > problem.
>>
>> I haven't tried, but probably it won't. Can you send me your command file?
>
>It is simply "gdb < foo > bar". The input file `foo' looks like this:
>
> shell gcc -g -o t.exe t.c
> file t.exe
> dir
> y
dir needs no confirmation if not invoked from tty !
look into directory_command source :
void
directory_command (dirname, from_tty)
char *dirname;
int from_tty;
{
dont_repeat ();
/* FIXME, this goes to "delete dir"... */
if (dirname == 0)
{
if (from_tty && query ("Reinitialize source path to empty? "))
{
free (source_path);
init_source_path ();
}
}
> dir .
> break main
> run
> q
> y
>
>(If needed, I can send the exact file used for the input.) Try this,
>and you will see that GDB exits immediately after it processes the
>first "dir" command.
I think its because y is not a valid GDB command !
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99