aboutsummaryrefslogtreecommitdiff
path: root/gdb/go32-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-11-17 11:25:02 -0700
committerTom Tromey <tromey@adacore.com>2020-12-11 08:01:47 -0700
commita9f14fa5499a9f8d089c188f72c154de731551a0 (patch)
treee22499752cf8c5f8376fe699092911e550c34d27 /gdb/go32-nat.c
parentb143e2d506bee1020752597f979d5af174edc36d (diff)
downloadgdb-a9f14fa5499a9f8d089c188f72c154de731551a0.zip
gdb-a9f14fa5499a9f8d089c188f72c154de731551a0.tar.gz
gdb-a9f14fa5499a9f8d089c188f72c154de731551a0.tar.bz2
Handle CPU offset for Ravenscar
The Ravenscar support assumes that the thread ID is the same as the CPU ID that appears in the Ada task structure. However, on some systems, gdbserver will report thread IDs that are off by some constant. This can happen, e.g., with qemu in a scenario where there is an additional (unreported) CPU in the emulation. The Ada Ravenscar runtimes have been modified to store this offset in a global variable. This patch changes gdb to read this variable, when it exists, and apply the offset to the base CPU ID. This fixes some crashes that otherwise occur. 2020-12-11 Tom Tromey <tromey@adacore.com> * ada-tasks.c (struct ada_tasks_pspace_data) <cpu_id_offset>: New field. (ada_get_tcb_types_info): Look for __gnat_gdb_cpu_first_id. (read_atcb): Use cpu_id_offset.
Diffstat (limited to 'gdb/go32-nat.c')
0 files changed, 0 insertions, 0 deletions