aboutsummaryrefslogtreecommitdiff
path: root/gdb/sparc-tdep.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-09-08 08:25:15 -0600
committerTom Tromey <tromey@adacore.com>2023-12-01 10:36:00 -0700
commitc6f7f9c80c3b92c6d877214d38aaef141adc5b93 (patch)
tree243638f58de9fe248d6193ffffa913a0ab25ae38 /gdb/sparc-tdep.c
parent596cd22cb10519f9baad6295fed13443d1ef86f9 (diff)
downloadbinutils-c6f7f9c80c3b92c6d877214d38aaef141adc5b93.zip
binutils-c6f7f9c80c3b92c6d877214d38aaef141adc5b93.tar.gz
binutils-c6f7f9c80c3b92c6d877214d38aaef141adc5b93.tar.bz2
Bail out of "attach" if a thread cannot be traced
On Linux, threads are treated much like separate processes by the kernel. In particular, it's possible to ptrace just a single thread. If gdb tries to attach to a multi-threaded inferior, where a non-main thread is already being traced (e.g., by strace), then gdb will get into an infinite loop attempting to attach. This patch fixes this problem by having the attach fail if ptrace fails to attach to any thread of the inferior.
Diffstat (limited to 'gdb/sparc-tdep.c')
0 files changed, 0 insertions, 0 deletions