From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25093 invoked by alias); 27 Sep 2002 01:57:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25080 invoked from network); 27 Sep 2002 01:57:29 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 27 Sep 2002 01:57:29 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 55B463E1B; Thu, 26 Sep 2002 21:57:24 -0400 (EDT) Message-ID: <3D93BB04.6090205@redhat.com> Date: Thu, 26 Sep 2002 18:57:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Wilson Cc: Richard.Earnshaw@arm.com, gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com Subject: Re: Dejagnu and parallel make tests of gcc References: <200209241549.g8OFnkE14794@pc960.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00654.txt.bz2 >>The problem was the pesky testglue.o file that is used to wrap executables >>that are run on the simulator, or other non-native targets. > > > By the way, the testglue.o file is only needed for broken simulators and > broken monitors that are unable to return the process exit code. It would > be better to try to fix the broken simulators/monitors than to continue to > make this hack more complicated. The hack was added originally because Cygnus > had no monitor sources, and thus fixing broken monitors was not an option. > Unfortunately, people then started using it to justify broken simulators, > and now we have a mess. Yes. The simulator just needs to return a correct value via: /* Fetch the REASON why the program stopped. SIM_EXITED: The program has terminated. SIGRC indicates the target dependant exit status. SIM_STOPPED: The program has stopped. SIGRC uses the host's signal numbering as a way of identifying the reaon: program interrupted by user via a sim_stop request (SIGINT); a breakpoint instruction (SIGTRAP); a completed single step (SIGTRAP); an internal error condition (SIGABRT); an illegal instruction (SIGILL); Access to an undefined memory region (SIGSEGV); Mis-aligned memory access (SIGBUS). For some signals information in addition to the signal number may be retained by the simulator (e.g. offending address), that information is not directly accessable via this interface. SIM_SIGNALLED: The program has been terminated by a signal. The simulator has encountered target code that causes the the program to exit with signal SIGRC. SIM_RUNNING, SIM_POLLING: The return of one of these values indicates a problem internal to the simulator. */ enum sim_stop { sim_running, sim_polling, sim_exited, sim_stopped, sim_signalled }; void sim_stop_reason PARAMS ((SIM_DESC sd, enum sim_stop *reason, int *sigrc)); when it encounters a an ``exit()'' trap. See include/gdb/remote-sim.h. > The way this is supposed to work is that the simulator should return the > simulated process exit code as its own exit code. Then we can do testing on > simulators by doing "sh simulator testcase" instead of "sh testcase". > The testglue.o file is not needed in this case, and everything works better. > > You can disable use of testglue.o in dejagnu by deleting the line that sets > needs_status_wrapper to 1. Andrew