Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Simulator question about argc/argv
@ 2013-05-31 16:48 Steve Ellcey 
  2013-05-31 16:50 ` Andrew Pinski
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Steve Ellcey  @ 2013-05-31 16:48 UTC (permalink / raw)
  To: gdb


Some new tests have been added to the GCC testsuite (cilk tests) that
check the value of argc and they expect it to be 1 if there are no
arguments to the test program (and there are none) but I am getting 0
when I run the tests under the gnu simulator.  Does anyone know why
this is?  I don't know if this is specific to my target (mips-mti-elf)
or a general simulator problem.  Perhaps it is related to my linker
script?  The mips-mti-elf target is built with newlib.  Could someone
else who uses the gnu simulator and newlib try this.  It works fine for
me under the qemu simulator.

% cat x.c
#include <stdio.h>
int main(int argc, char **argv)
{
  printf("%d\n", argc);
  return 0;
}

% mips-mti-elf-gcc x.c -Tmti32.ld -o x
% mips-mti-elf-run ./x
0
% mips-mti-elf-run ./x 99
0

Steve Ellcey
sellcey@mips.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-03 11:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31 16:48 Simulator question about argc/argv Steve Ellcey 
2013-05-31 16:50 ` Andrew Pinski
2013-05-31 18:53 ` Mike Frysinger
2013-05-31 18:54   ` Mike Frysinger
2013-05-31 23:55   ` Mike Frysinger
2013-06-01  2:25     ` Andrew Pinski
2013-06-01  6:21       ` Mike Frysinger
2013-06-03 11:20 ` nick clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox