From patchwork Wed Apr 20 22:12:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 11830 Received: (qmail 65172 invoked by alias); 20 Apr 2016 22:12:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 65146 invoked by uid 89); 20 Apr 2016 22:12:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:mach_ms, Hx-languages-length:1434 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 22:12:04 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1A06685365 for ; Wed, 20 Apr 2016 22:12:03 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3KMC1J7016052 for ; Wed, 20 Apr 2016 18:12:02 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [ob/pushed] Fix host signal vs gdb signal mixup in gdb/darwin-nat.c Date: Wed, 20 Apr 2016 23:12:01 +0100 Message-Id: <1461190321-24696-1-git-send-email-palves@redhat.com> Building in C++ mode caught a bug here: .../src/gdb/darwin-nat.c: In function 'ptid_t darwin_decode_message(mach_msg_header_t*, darwin_thread_t**, inferior**, target_waitstatus*)': .../src/gdb/darwin-nat.c:1016:25: error: invalid conversion from 'int' to 'gdb_signal' [-fpermissive] status->value.sig = WTERMSIG (wstatus); ^ gdb/ChangeLog: 2016-04-20 Pedro Alves * darwin-nat.c (darwin_decode_message): Use gdb_signal_from_host. --- gdb/ChangeLog | 4 ++++ gdb/darwin-nat.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 16edea2..9dec801 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2016-04-20 Pedro Alves + * darwin-nat.c (darwin_decode_message): Use gdb_signal_from_host. + +2016-04-20 Pedro Alves + * aarch64-tdep.c (aarch64_record_load_store): Change type of 'reg_rm_val' local to ULONGEST. diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 16294b2..54c430f 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -1013,7 +1013,7 @@ darwin_decode_message (mach_msg_header_t *hdr, else { status->kind = TARGET_WAITKIND_SIGNALLED; - status->value.sig = WTERMSIG (wstatus); + status->value.sig = gdb_signal_from_host (WTERMSIG (wstatus)); } inferior_debug (4, _("darwin_wait: pid=%d exit, status=0x%x\n"),