Opened 11 years ago

Last modified 11 years ago

#9854 closed bug

Debug button doesn't always work — at Version 2

Reported by: anevilyak Owned by: bonefish
Priority: high Milestone: R1
Component: Applications/Debugger Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by anevilyak)

In some circumstances, the Debug button doesn't seem to stop a thread. This started after enabling post syscall debug events for the purposes of output capture. Currently, all that's known for certain is that the actual debug_thread() call makes it down to the kernel and does in fact return success.

Change History (3)

comment:1 by anevilyak, 11 years ago

Component: Applications/DebuggerSystem/Kernel
Owner: changed from anevilyak to bonefish
Status: newassigned

Confirmed that it's the presence of the B_TEAM_DEBUG_POST_SYSCALL flag that causes the problem, but I'm currently at a loss as to why. Adding tracing to _user_debug_thread() confirms that it indeed decides all is well and calls thread_interrupt() on the thread as it should, but the expected B_DEBUGGER_MESSAGE_THREAD_DEBUGGED never seems to arrive, and the thread happily keeps executing as best I can tell. Interrupting a thread via a breakpoint, however, consistently still behaves as expected.

An example of such an undebuggable thread is one belonging to a BLooper, which was simply sitting in the kernel waiting for a port read when attempting to debug it. Any ideas?

Last edited 11 years ago by anevilyak (previous) (diff)

comment:2 by anevilyak, 11 years ago

Description: modified (diff)

by anevilyak, 11 years ago

Attachment: 9854.patch added
Note: See TracTickets for help on using tickets.