This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[darwin/committed]: Adjust assertion condition


Hi,

this patch relaxes a too strict assertion condition.  The failure case is explained in the comment.

Committed on trunk.

Tristan.

2011-08-01  Tristan Gingold  <gingold@adacore.com>

	* darwin-nat.c (darwin_decode_exception_message): Adjust assertion.

Index: darwin-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/darwin-nat.c,v
retrieving revision 1.26
diff -c -r1.26 darwin-nat.c
*** darwin-nat.c	1 Jul 2011 18:36:28 -0000	1.26
--- darwin-nat.c	1 Aug 2011 14:03:45 -0000
***************
*** 615,622 ****
      return -1;
    *pthread = thread;
  
    /* Finish decoding.  */
-   gdb_assert (thread->msg_state == DARWIN_RUNNING);
    thread->event.header = *hdr;
    thread->event.thread_port = thread_port;
    thread->event.task_port = task_port;
--- 615,625 ----
      return -1;
    *pthread = thread;
  
+   /* The thread should be running.  However we have observed cases where a thread
+      got a SIGTTIN message after being stopped.  */
+   gdb_assert (thread->msg_state != DARWIN_MESSAGE);
+ 
    /* Finish decoding.  */
    thread->event.header = *hdr;
    thread->event.thread_port = thread_port;
    thread->event.task_port = task_port;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]