From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24276 invoked by alias); 3 Apr 2015 00:40:19 -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 24264 invoked by uid 89); 3 Apr 2015 00:40:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 03 Apr 2015 00:40:18 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 7312F340756 for ; Fri, 3 Apr 2015 00:40:16 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: d10v: fix signal updates Date: Fri, 03 Apr 2015 00:40:00 -0000 Message-Id: <1428021615-5109-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00113.txt.bz2 Way back in aba6488e0b73756f31f154d12a228baa82a68d8a, a bunch of signal defines were changed to TARGET_SIGNAL_xxx. For d10v, the transition was incomplete which lead to sim_stop_reason using the new set but sim_resume still using the old set. Which meant in some cases, the sim would never actually stop. Convert all the remaining SIGxxx defines in here to TARGET_SIGNAL_xxx. This has the nice side effect of fixing the testsuite. Committed. --- sim/d10v/ChangeLog | 6 ++++++ sim/d10v/interp.c | 13 +++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index e34b918..e09a14f 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,9 @@ +2015-04-02 Mike Frysinger + + * interp.c (lookup_hash): Change SIGILL to GDB_SIGNAL_ILL. + (sim_resume): Change SIGBUS/SIGSEGV to GDB_SIGNAL_BUS, SIGILL to + GDB_SIGNAL_ILL, and SIGTRAP to GDB_SIGNAL_TRAP. + 2015-04-01 Mike Frysinger * interp.c (sim_set_profile, sim_set_profile_size): Delete. diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index 1aae3e4..7fc0745 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -80,7 +80,7 @@ lookup_hash (uint32 ins, int size) { if (h->next == NULL) { - State.exception = SIGILL; + State.exception = GDB_SIGNAL_ILL; State.pc_changed = 1; /* Don't increment the PC. */ return NULL; } @@ -936,17 +936,14 @@ sim_resume (SIM_DESC sd, int step, int siggnal) { case 0: break; -#ifdef SIGBUS - case SIGBUS: -#endif - case SIGSEGV: + case GDB_SIGNAL_BUS: SET_BPC (PC); SET_BPSW (PSW); SET_HW_PSW ((PSW & (PSW_F0_BIT | PSW_F1_BIT | PSW_C_BIT))); JMP (AE_VECTOR_START); SLOT_FLUSH (); break; - case SIGILL: + case GDB_SIGNAL_ILL: SET_BPC (PC); SET_BPSW (PSW); SET_HW_PSW ((PSW & (PSW_F0_BIT | PSW_F1_BIT | PSW_C_BIT))); @@ -963,7 +960,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) iaddr = imem_addr ((uint32)PC << 2); if (iaddr == State.mem.fault) { - State.exception = SIGBUS; + State.exception = GDB_SIGNAL_BUS; break; } @@ -1035,7 +1032,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal) while ( !State.exception && !stop_simulator); if (step && !State.exception) - State.exception = SIGTRAP; + State.exception = GDB_SIGNAL_TRAP; } void -- 2.3.4