From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7317 invoked by alias); 31 May 2013 16:48:17 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 7306 invoked by uid 89); 31 May 2013 16:48:16 -0000 X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_QE autolearn=ham version=3.3.1 Received: from multi.imgtec.com (HELO multi.imgtec.com) (194.200.65.239) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 31 May 2013 16:48:16 +0000 From: "Steve Ellcey " Date: Fri, 31 May 2013 16:48:00 -0000 To: Subject: Simulator question about argc/argv User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: X-SEF-Processed: 7_3_0_01192__2013_05_31_17_48_13 X-SW-Source: 2013-05/txt/msg00144.txt.bz2 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 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