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 gdb/18945] gdbserver cannot be interrupted on linux when pgid doesn't match pid


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

--- Comment #5 from Doug Evans <xdje42 at gmail dot com> ---
Iterating over all threads is actually what gdb does in non-stop mode for the
interrupt command (ref: linux_nat_interrupt). Though even that simplistic
response is inaccurate if one dives a bit deeper (e.g., if !nonstop it sends
SIGINT to the pgrp, otherwise it sends SIGSTOP to each lwp).
This bit of gdb needs some design cleanup, and then some implementation
cleanup.

For reference sake, I wouldn't iterate over /proc/$pid/tasks: It's critical
that gdb be attached to the thread first. There are still races here, but gdb
already has to deal with them so this isn't a new issue: The patch for this bug
should be able to just use the existing APIs and leave the latter to deal with
lower level issues.
So iterating over all threads may be a reasonable thing to do in all cases (not
sure what kind of performance hit there might be if there are 1000 threads;
it's not a blocking issue, but we can't ignore it either).

-- 
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]