Bug #7287 2006-04-26 12:23

samuil

Error set arguments

The programm:

#include <stdio.h>

#include <stdlib.h>

int main(int arg, char **argv)

{

sleep(1);

printf("%s",argv[2]);

return 0;

}

I set argument in Project->"Set programms' arguments":

"arg 1" "arg 2"

Run (no debug), see: "arg 2" ...ok

Run debug. see: "1" ... error

Category
Debugger
Group
 
Status
Closed
Close date
2006-05-16 12:19
Assigned to
 
thomasdenk 2006-04-27 17:50

Please provide the svn revision number (preferrably the complete

build information) with *every* bug report.

The complete build information is automatically copied to the

clipboard if you click the "Report a bug" link or the revision

string on the "Start Here" page.

Without accurate information, we are unable to reproduce and

address bugs.

samuil 2006-04-29 12:34

In Version 1.0 revision 2396 () gcc 3.4.2 Windows/unicode bug present

samuil 2006-04-29 12:35

In Version 1.0 revision 2396 () gcc 3.4.2 Windows/unicode bug present

thomasdenk 2006-04-30 16:24

Tested using revision 2384/gcc 3.4.5, works without any problems for me.

The likely reason for what you see is that you are not aware that "debug" and "release" are separate targets.

If you have used Visual studio before, this may not be what you expect, but hey... it is them doing it wrong, not us.

The program arguments for different targets can be configured separately. If you set the arguments for one target, this does not automatically set them for the other. Thus, in one case the program is called with two arguments, and in the other case without any.

Do you still get an error if you set the program arguments for the other target?

samuil 2006-05-01 09:49

Sorry for my English.

I'am not bild in target "release"

I set argument in Project->"Set programms' arguments" for "debug" and when build programm and press Ctrl+F10 i see "arg 2". But when i press F8 and use F7 then? i see "1".

Full arg string: |"arg 1" "arg 2"|

mandrav 2006-05-16 12:19

This bug is now fixed in HEAD.

Thank you for reporting it.