aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-11-15 16:48:41 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-11-18 11:11:42 -0500
commit4855cbdc3d8fba4f5f6f61865a40d557c4be6d2c (patch)
tree98659dd58763fc8c83ee00410566a70ddf6f7ec4 /bfd
parentd4895ba2df3bbf38d64fce314f5933d05eb8990a (diff)
downloadgdb-4855cbdc3d8fba4f5f6f61865a40d557c4be6d2c.zip
gdb-4855cbdc3d8fba4f5f6f61865a40d557c4be6d2c.tar.gz
gdb-4855cbdc3d8fba4f5f6f61865a40d557c4be6d2c.tar.bz2
gdbserver/linux-x86: make is_64bit_tdesc accept thread as a parameter
ps_get_thread_area receives as a parameter the lwpid it must work on. It then calls is_64bit_tdesc, which uses the current_thread as the thread to work on. However, it is not said that both are the same. This became a problem when working in a following patch that makes find_one_thread switch to a process but to no thread (current_thread == nullptr). When libthread_db needed to get the thread area, is_64bit_tdesc would try to get the regcache of a nullptr thread. Fix that by making is_64bit_tdesc accept the thread to work on as a parameter. Find the right thread from the context, when possible (when we know the lwpid to work on). Otherwise, pass "current_thread", to retain the existing behavior. Reviewed-By: Andrew Burgess <aburgess@redhat.com> Change-Id: I44394d6be92392fa28de71982fd04517ce8a3007
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions