Fix host signal vs gdb signal mixup in gdb/darwin-nat.c
authorPedro Alves <palves@redhat.com>
Wed, 20 Apr 2016 19:13:23 +0000 (20:13 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 20 Apr 2016 22:01:54 +0000 (23:01 +0100)
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.

gdb/ChangeLog
gdb/darwin-nat.c

index 16edea2aa58fdb9e43ce20d5cda7ffeba8b58f4b..9dec80184ed8b3fd41681eccc6baebaaaf945ce0 100644 (file)
@@ -1,3 +1,7 @@
+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
index 16294b22612552838d7f5eb0a6e244a865f85570..54c430f76b773984c35c7cb591ee782d3a18e87a 100644 (file)
@@ -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"),
This page took 0.036646 seconds and 4 git commands to generate.