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]: Call darwin_set_sstep only in case of change


Hi,

a step toward a better fix (as suggested by Pedro) for PR 13901: only call darwin_set_sstep
in case of change.  As it is an optimization by itself, I think it is a good idea to commit it.

No new regressions thus committed.

Tristan.

2012-04-11  Tristan Gingold  <gingold@adacore.com>

	* darwin-nat.c (darwin_resume_thread): Call darwin_set_sstep only
	in case of change.

Index: darwin-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/darwin-nat.c,v
retrieving revision 1.33
diff -c -r1.33 darwin-nat.c
*** darwin-nat.c	10 Apr 2012 15:31:29 -0000	1.33
--- darwin-nat.c	11 Apr 2012 13:13:19 -0000
***************
*** 705,715 ****
  	  thread->signaled = 1;
  	}
  
!       /* Set single step.  */
!       inferior_debug (4, _("darwin_set_sstep (thread=%x, enable=%d)\n"),
!                       thread->gdb_port, step);
!       darwin_set_sstep (thread->gdb_port, step);
!       thread->single_step = step;
  
        darwin_send_reply (inf, thread);
        thread->msg_state = DARWIN_RUNNING;
--- 705,718 ----
  	  thread->signaled = 1;
  	}
  
!       /* Set or reset single step.  */
!       if (step != thread->single_step)
! 	{
! 	  inferior_debug (4, _("darwin_set_sstep (thread=%x, enable=%d)\n"),
! 			  thread->gdb_port, step);
! 	  darwin_set_sstep (thread->gdb_port, step);
! 	  thread->single_step = step;
! 	}
  
        darwin_send_reply (inf, thread);
        thread->msg_state = DARWIN_RUNNING;


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