This is the mail archive of the gdb-prs@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]

[Bug threads/19742] When a thread is stopped in non-stop mode, a breakpoint can not be set in another thread


https://sourceware.org/bugzilla/show_bug.cgi?id=19742

--- Comment #5 from Pedro Alves <palves at redhat dot com> ---
That comment is a little bit out of date.

That's called displaced stepping, and it depends on gdb-side arch support.  

It works on x86 and a couple other archs, but it is not universal, and, there
are cases where it doesn't work and thus gdb must still fallback to stopping
all threads temporarily.  See keep_going_pass_signal.

Plus, it's only enabled if the target osabi is Linux, so if you're seeing it
trigger against a remote !Linux target, then it must be you're hacking your way
with a --target=x86_64-linux-gnu gdb that happens to default osabi to Linux.

But still, that's irrelevant -- unless you explicitly specify "set breakpoint
always-inserted on", gdb still removes all breakpoints once _all_ threads are
found stopped, and reinserts as soon as you start some thread again, so you're
back to the same.  See normal_stop -> maybe_remove_breakpoints.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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