aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2017-11-21 13:58:00 -0800
committerJoel Brobecker <brobecker@adacore.com>2017-11-21 14:31:32 -0800
commit65d40437e2704e635e7144319e956edf3e7fa026 (patch)
tree98aa88a3f7bc73e13f1d44a0fa9f8070e820c940 /gdb/ada-lang.h
parente02544b292a3d537b43ae9cff890ea040b944d01 (diff)
downloadgdb-65d40437e2704e635e7144319e956edf3e7fa026.zip
gdb-65d40437e2704e635e7144319e956edf3e7fa026.tar.gz
gdb-65d40437e2704e635e7144319e956edf3e7fa026.tar.bz2
Provide the "Base CPU" in output of "info task" (if set by runtime).
At the user level, this patch enhances the debugger to print the ID of the base CPU a task is running on: (gdb) info task 3 Ada Task: 0x13268 Name: raven1 Thread: 0x13280 LWP: 0 !!!-> Base CPU: 1 No parent Base Priority: 127 State: Runnable This new field is only printed when the base CPU is nonzero or, in other words, if the base CPU info is being provided by the runtime. For instance, on native systems, where threads/processes can "jump" from CPU to CPU, the info is not available, and the output of the command above then remains unchanged. At the internal level, the real purpose of this change is to prepare the way for ravenscar-thread to start handling SMP systems. For that, we'll need to know which CPU each task is running on... More info on that in the commit that actually adds support for it. gdb/ChangeLog: * ada-lang.h (struct ada_task_info) <base_cpu>: New field. * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field. (get_tcb_types_info): Set fieldnos.base_cpu. (read_atcb): Set task_info->base_cpu. (info_task): Print "Base CPU" info if set by runtime.
Diffstat (limited to 'gdb/ada-lang.h')
-rw-r--r--gdb/ada-lang.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index d15fbbd..c11fb48 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -141,6 +141,12 @@ struct ada_task_info
/* If the task is accepting a rendezvous with another task, this field
contains the ID of the calling task. Zero otherwise. */
CORE_ADDR caller_task;
+
+ /* The CPU on which the task is running. This is dependent on
+ the runtime actually providing that info, which is not always
+ the case. Normally, we should be able to count on it on
+ bare-metal targets. */
+ int base_cpu;
};
/* Assuming V points to an array of S objects, make sure that it contains at