This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix host signal vs gdb signal mixup in gdb/darwin-nat.c
- From: Pedro Alves <palves at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 20 Apr 2016 22:11:45 -0000
- Subject: [binutils-gdb] Fix host signal vs gdb signal mixup in gdb/darwin-nat.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5ae0055212a4835793815dbd8fa120d8c63fc7e8
commit 5ae0055212a4835793815dbd8fa120d8c63fc7e8
Author: Pedro Alves <palves@redhat.com>
Date: Wed Apr 20 20:13:23 2016 +0100
Fix host signal vs gdb signal mixup in gdb/darwin-nat.c
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 <palves@redhat.com>
* darwin-nat.c (darwin_decode_message): Use gdb_signal_from_host.
Diff:
---
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 <palves@redhat.com>
+ * darwin-nat.c (darwin_decode_message): Use gdb_signal_from_host.
+
+2016-04-20 Pedro Alves <palves@redhat.com>
+
* 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"),