[haiku-bugs] Re: [Haiku] #9854: Debug button doesn't always work

  • From: "anevilyak" <trac@xxxxxxxxxxxx>
  • Date: Thu, 04 Jul 2013 00:59:22 -0000

#9854: Debug button doesn't always work
-----------------------------+----------------------------
   Reporter:  anevilyak      |      Owner:  bonefish
       Type:  bug            |     Status:  assigned
   Priority:  high           |  Milestone:  R1
  Component:  System/Kernel  |    Version:  R1/Development
 Resolution:                 |   Keywords:
 Blocked By:                 |   Blocking:
Has a Patch:  1              |   Platform:  All
-----------------------------+----------------------------

Comment (by anevilyak):

 After some further investigation, what seems to happen is that the stop
 flag on the thread gets trapped by the syscall it was blocked in being
 interrupted, and consequently the userland debugger simply gets sent the
 post syscall event alone. As such, unless we want to complicate the set of
 debug flags stored on the kernel thread structures, it'd appear that the
 simplest approach would be for Debugger to track that it has a stop
 request pending, and if it does, then enter debug mode upon the next
 syscall event it gets that causes the thread to stop.

 A quick test seems to confirm that this works, as demonstrated in the
 above patch. Is that approach acceptable, or should it be generalized to
 other types of debug events as well?

--
Ticket URL: <http://dev.haiku-os.org/ticket/9854#comment:4>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: