From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18677 invoked by alias); 17 Jun 2013 16:37:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 18653 invoked by uid 89); 17 Jun 2013 16:37:50 -0000 X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 17 Jun 2013 16:37:49 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5HGbj89022595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 Jun 2013 12:37:45 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r5HGbh9U029129; Mon, 17 Jun 2013 12:37:44 -0400 Message-ID: <51BF3B57.3010906@redhat.com> Date: Mon, 17 Jun 2013 16:51:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Simon Marchi CC: Eli Zaretskii , gdb-patches@sourceware.org, marc.khouzam@ericsson.com Subject: Re: [PATCH v2] Exit code of exited inferiors References: <51A5160D.40800@ericsson.com> <83k3mh6ant.fsf@gnu.org> <51A6263A.9080104@ericsson.com> <51B0BDBC.9030909@redhat.com> <51BF3393.30002@ericsson.com> In-Reply-To: <51BF3393.30002@ericsson.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00381.txt.bz2 On 06/17/2013 05:04 PM, Simon Marchi wrote: > On 13-06-06 12:50 PM, Pedro Alves wrote: >> Please also make sure the test works with gdbserver, with: >> >> make check RUNTESTFLAGS="--target_board=native-gdbserver" >> >> Thanks, > > Hmm, it seems that testing with gdbserver doesn't handle arguments passing, so it doesn't work. How could it be done? We haven't seen exit-code.c yet :-) but I imagine that it just returns a different error code depending on the argument? You could instead make gdb run to main, and then set a global in the program with the desired return code. Or build two programs, and pick the return code depending on a macro. You can pass additional_flags=-Dfoo=bar to prepare_for_testing/gdb_compile to define macros/symbols. Several examples on that in the testsuite. Do note: http://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Make_sure_test_executables_are_unique -- Pedro Alves