[v2,2/3] gdb/ada-tasks: Make the ada_tasks_pspace_data getter public
Commit Message
A future commit will make ravenscar-thread.c call a new function that
operates on this object.
---
gdb/ada-tasks.c | 7 ++-----
gdb/ada-tasks.h | 13 +++++++++++++
2 files changed, 15 insertions(+), 5 deletions(-)
@@ -287,12 +287,9 @@ task_to_str (int taskno, const ada_task_info *task_info)
return string_printf ("%d \"%s\"", taskno, task_info->name);
}
-/* Return the ada-tasks module's data for the given program space (PSPACE).
- If none is found, add a zero'ed one now.
-
- This function always returns a valid object. */
+/* See ada-tasks.h. */
-static struct ada_tasks_pspace_data *
+struct ada_tasks_pspace_data *
get_ada_tasks_pspace_data (struct program_space *pspace)
{
struct ada_tasks_pspace_data *data;
@@ -24,6 +24,7 @@
#include "ada-lang.h"
#include "gdbthread.h"
#include "inferior.h"
+#include "progspace.h"
#include "ui-out.h"
/* Return non-zero if TASK_NUM is a valid task number. */
@@ -69,4 +70,16 @@ extern void print_ada_task_info (struct ui_out *uiout,
const char *taskno_str,
struct inferior *inf);
+/* An opaque type for this module's per-program-space data. */
+
+struct ada_tasks_pspace_data;
+
+/* Return the ada-tasks module's data for the given program space (PSPACE).
+ If none is found, add a zero'ed one now.
+
+ This function always returns a valid object. */
+
+struct ada_tasks_pspace_data *
+get_ada_tasks_pspace_data (struct program_space *pspace);
+
#endif /* ADA_TASKS_H */