[haiku-bugs] Re: [Haiku] #9221: Breakpoints in dynamically loaded add-ons don't seem to be installed correctly

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Wed, 28 Nov 2012 13:41:28 -0000

#9221: Breakpoints in dynamically loaded add-ons don't seem to be installed
correctly
-------------------------------------+----------------------------
   Reporter:  anevilyak              |      Owner:  bonefish
       Type:  bug                    |     Status:  new
   Priority:  normal                 |  Milestone:  R1
  Component:  Applications/Debugger  |    Version:  R1/Development
 Resolution:                         |   Keywords:
 Blocked By:                         |   Blocking:
Has a Patch:  0                      |   Platform:  All
-------------------------------------+----------------------------

Comment (by bonefish):

 Replying to [comment:1 anevilyak]:
 > This does make me wonder if it's possible that this is simply a race
 between us receiving the image load notification, loading debug
 information and installing the breakpoints vs the thread executing past
 where the breakpoint would've been before we make it that far. I'm a
 little unclear on when execution does/doesn't get suspended when these
 debug events come into play though.

 This is likely the cause. Have a look at how
 `TeamDebugger::_HandleDebuggerMessage()` handles
 `B_DEBUGGER_MESSAGE_IMAGE_CREATED`. After the `LoadImageDebugInfoJob` is
 scheduled the thread is continued immediately. If there's a breakpoint in
 this image, we'll have to keep the thread blocked until the image debug
 info has been loaded and the breakpoints have been installed.

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

Other related posts: