This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Debuggee cmd-line arguments bug
- From: Konstantin Karganov <kostik at ispras dot ru>
- To: gdb at sources dot redhat dot com
- Date: Mon, 25 Jul 2005 17:59:31 +0400 (MSD)
- Subject: Debuggee cmd-line arguments bug
Hello.
Playing with the program startup arguments I've found the following
"feature" of gdb. I have a program that prints its argc/argv parameters.
(gdb) set args a b c d
(gdb) run
Starting program: /home/kostik/Work/a.out a b c d
Argc=5, Argv=/home/kostik/Work/a.out,a,b,c,d
Program exited normally.
(gdb) set args a b c d
(gdb) run >out
Starting program: /home/kostik/Work/a.out >out
Program exited normally.
(gdb)
In file out there are the folowing:
Argc=1, Argv=/home/kostik/Work/a.out
So when trying to redirect debuggee IO we've lost all cmd-line parameters.
The same of cource happens with MI (and breaks the debugging startup for
MPI program!).
Is it a bug?
And what is about my previous posts (still unanswered) on:
- running out of source code (stepping past main)
http://sources.redhat.com/ml/gdb/2005-07/msg00152.html
- incorrect breakpoint diagnostics in MI
http://sources.redhat.com/ml/gdb/2005-07/msg00175.html
- vanishing stopping reason in MI
http://sources.redhat.com/ml/gdb/2005-07/msg00173.html
"And there's no doing anything about it" ?
Best regards,
Konstantin.