aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-12-03 15:01:14 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2024-12-05 11:43:14 -0500
commit07868dca1186ab0406840d3f52a4d7fa05aa0e61 (patch)
tree3d73a02a270626e9490591c2751bee988335fcbe /gdb/source.c
parent7a0a2f75f003ec1c3cb5d1013070913cef4d1f35 (diff)
downloadbinutils-07868dca1186ab0406840d3f52a4d7fa05aa0e61.zip
binutils-07868dca1186ab0406840d3f52a4d7fa05aa0e61.tar.gz
binutils-07868dca1186ab0406840d3f52a4d7fa05aa0e61.tar.bz2
gdbserver/win32-low.cc: remove use of `all_threads`
Fix this: gdbserver/win32-low.cc: In function ‘void child_delete_thread(DWORD, DWORD)’: gdbserver/win32-low.cc:192:7: error: ‘all_threads’ was not declared in this scope; did you mean ‘using_threads’? 192 | if (all_threads.size () == 1) | ^~~~~~~~~~~ | using_threads Commit 9f77b3aa0bfc ("gdbserver: change 'all_processes' and 'all_threads' list type") changed the type of `all_thread` to an intrusive_list, without changing this particular use, which broke the build because an intrusive_list doesn't know its size, so it doesn't have a `size()` method. The subsequent commit removed `all_threads`, leading to the error above. Fix it by using the number of threads of the concerned process instead. My rationale: as far as I know, GDBserver on Windows only supports one process at a time, so there's no need to iterate over all processes. If we made GDBserver for Windows support multiple processes, my intuition is that we'd want this check to use the number of threads of the concerned process, not the number of threads overall. Add the method `process_info::thread_count`, to get the number of threads of the process. I'm not really sure what this check is for in the first place, Hannes Domani said that this check didn't seem to trigger on Windows 7 and 11. Perhaps it was necessary before. Change-Id: I84d6226532b887d99248cf3be90f5065fb7a074a Tested-By: Hannes Domani <ssbssa@yahoo.de>
Diffstat (limited to 'gdb/source.c')
0 files changed, 0 insertions, 0 deletions