aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-08-07 10:26:45 -0600
committerTom Tromey <tromey@adacore.com>2020-08-07 10:26:46 -0600
commita8ac85bb7d6b505323824ed0b354292358db4508 (patch)
tree93eabf432c7c503f4b3dd996c19add908484e575 /gdb/ada-lang.h
parent550ab58d6eee9897c7f125d3a73cfef187f213b8 (diff)
downloadbinutils-a8ac85bb7d6b505323824ed0b354292358db4508.zip
binutils-a8ac85bb7d6b505323824ed0b354292358db4508.tar.gz
binutils-a8ac85bb7d6b505323824ed0b354292358db4508.tar.bz2
Handle case where Ada task is current but not listed
Currently, the ravenscar runtime can mark an Ada task as the current task, before adding it to the list of tasks that can be read by gdb. In this scenario, gdb can sometimes crash in ravenscar_get_thread_base_cpu with: ../../src/gdb/ravenscar-thread.c:167: internal-error: int ravenscar_get_thread_base_cpu(ptid_t): Assertion `task_info != NULL' failed. However, as ravenscar_get_thread_base_cpu is only called to find the base CPU, we can simply record this when registering the thread, and look this up later. gdb/ChangeLog 2020-08-07 Tom Tromey <tromey@adacore.com> * ravenscar-thread.c (ravenscar_thread_target) <get_base_cpu, get_base_thread_from_ravenscar_task>: Now methods. <m_cpu_map>: New member. (ravenscar_thread_target::get_thread_base_cpu): Rename from ravenscar_get_thread_base_cpu. Check m_cpu_map. (ravenscar_thread_target::task_is_currently_active): Update. (ravenscar_thread_target::get_base_thread_from_ravenscar_task): Now a method. (ravenscar_thread_target::add_active_thread): Put initial thread into the m_cpu_map.
Diffstat (limited to 'gdb/ada-lang.h')
0 files changed, 0 insertions, 0 deletions