aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-tasks.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-07-16 23:52:02 -0400
committerSimon Marchi <simon.marchi@efficios.com>2024-08-12 10:31:09 -0400
commit4144d36a68bda0f20c02e6a4444052b44a462155 (patch)
tree35f30b63534a727ff1ce4cb2d7e3f406f0ced154 /gdb/ada-tasks.c
parent8d2f4b7c3168f79fdef3e50163c91cca43da1381 (diff)
downloadgdb-4144d36a68bda0f20c02e6a4444052b44a462155.zip
gdb-4144d36a68bda0f20c02e6a4444052b44a462155.tar.gz
gdb-4144d36a68bda0f20c02e6a4444052b44a462155.tar.bz2
gdb: add program_space parameter to lookup_minimal_symbol
>From what I can see, lookup_minimal_symbol doesn't have any dependencies on the global current state other than the single reference to current_program_space. Add a program_space parameter and make that current_program_space reference bubble up one level. Change-Id: I759415e2f9c74c9627a2fe05bd44eb4147eee6fe Reviewed-by: Keith Seitz <keiths@redhat.com> Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/ada-tasks.c')
-rw-r--r--gdb/ada-tasks.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 43a63f8..01ee2fb 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -600,7 +600,7 @@ ada_get_tcb_types_info (void)
/* Check for the CPU offset. */
bound_minimal_symbol first_id_sym
- = lookup_minimal_symbol ("__gnat_gdb_cpu_first_id");
+ = lookup_minimal_symbol (current_program_space, "__gnat_gdb_cpu_first_id");
unsigned int first_id = 0;
if (first_id_sym.minsym != nullptr)
{
@@ -920,7 +920,8 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
/* Try array. */
- bound_minimal_symbol msym = lookup_minimal_symbol (KNOWN_TASKS_NAME);
+ bound_minimal_symbol msym
+ = lookup_minimal_symbol (current_program_space, KNOWN_TASKS_NAME);
if (msym.minsym != NULL)
{
data->known_tasks_kind = ADA_TASKS_ARRAY;
@@ -967,7 +968,7 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
/* Try list. */
- msym = lookup_minimal_symbol (KNOWN_TASKS_LIST);
+ msym = lookup_minimal_symbol (current_program_space, KNOWN_TASKS_LIST);
if (msym.minsym != NULL)
{
data->known_tasks_kind = ADA_TASKS_LIST;