This patch removes the global stop_signal, in favour of accessing the equivalent member in thread_info. This field was already per-thread in non-stop, since in non-stop we can have multiple threads stepping independently. This patch makes it per-thread too in all-stop. Of noteworthy importance: - When generating a core dump with gcore, GDB currently records the same stop_signal in all threads. BFD, on the other end, and by consequence, the core target, while reading a core dump, ignores the signal associated with every thread but the last one to be read. This looked surprising to me, but, I've kept the behaviour. - When a multi-threaded program stopped with a signal that has "Pass to program" set to yes, and the target OS has a notion of per-thread signal queues, and the user switches to another thread, and issues continue, because stop_signal was global, we'd pass the stop_signal to a different thread that originally reported it. This leads to cases like PR2276. I'm not looking for behaviour changes with this patch, so to keep the old behaviour, I've needed the changes in `proceed' below. -- Pedro Alves