From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19978 invoked by alias); 24 Jun 2003 16:18:36 -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 21880 invoked from network); 24 Jun 2003 15:50:12 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 24 Jun 2003 15:50:12 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id BC2DE2B5F; Tue, 24 Jun 2003 11:46:28 -0400 (EDT) Message-ID: <3EF87254.1060900@redhat.com> Date: Tue, 24 Jun 2003 16:18:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kazu Hirata Cc: gdb-patches@sources.redhat.com, msnyder@redhat.com, rsandifo@redhat.com, aoliva@redhat.com, vinschen@redhat.com, dvenkat@noida.hcltech.com Subject: Re: [preliminary patch] sim/h8300/compile.c: abort when abort is called. References: <20030624.035043.10249396.kazu@cs.umass.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00752.txt.bz2 > Hi, > > Attached is a patch to teach the h8300 simulator to abort when abort > is called. Without this, I get spurious XPASS when testing gcc. > Although the patched simulator works, my gut feeling is telling me > that there should be a better way to do this. Any thought? Yes. Generally speaking, the simulators should not call abort. Instead they should, some how, stop the simulation and return to the caller. That statement looks to be trying to do just that. I think MichaelS recently changed sim/common to, for the h8300 do a correct exit. 2003-06-04 Michael Snyder * common/run.c (main): Remove SIM_H8300 ifdef. (usage): Ditto. * common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX. (standard_options): Add '-x' for h8/300sx. (standard_option_handler): Add case for SIM_H8300SX. suggest studying that code. Andrew > Kazu Hirata > > 2003-06-24 Kazu Hirata > > * compile.c (sim_resume): Abort when sleep instruction is used > without the magic number. > > Index: compile.c > =================================================================== > RCS file: /cvs/src/src/sim/h8300/compile.c,v > retrieving revision 1.31 > diff -u -r1.31 compile.c > --- compile.c 19 Jun 2003 02:14:14 -0000 1.31 > +++ compile.c 24 Jun 2003 07:40:12 -0000 > @@ -3577,8 +3577,7 @@ > } > else > { > - /* Treat it as a sigtrap. */ > - sim_engine_set_run_state (sd, sim_stopped, SIGTRAP); > + abort (); > } > goto end; > >