public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Kévin Le Gouguec" <legouguec@adacore.com>
To: gdb-patches@sourceware.org
Cc: simark@simark.ca, "Kévin Le Gouguec" <legouguec@adacore.com>
Subject: [PATCH v2 2/3] gdb/ada-tasks: Make the ada_tasks_pspace_data getter public
Date: Fri, 27 Jan 2023 17:53:36 +0100	[thread overview]
Message-ID: <20230127165337.1832937-3-legouguec@adacore.com> (raw)
In-Reply-To: <20230127165337.1832937-1-legouguec@adacore.com>

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(-)

diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index bdabc0909cb..a1afd25f9a5 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -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;
diff --git a/gdb/ada-tasks.h b/gdb/ada-tasks.h
index 5a948c27a44..aa85c853a47 100644
--- a/gdb/ada-tasks.h
+++ b/gdb/ada-tasks.h
@@ -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 */
-- 
2.25.1


  parent reply	other threads:[~2023-01-27 16:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 17:10 [PATCH] Fix Ada tasking for baremetal targets using Ravenscar threads Kévin Le Gouguec
2023-01-12 18:19 ` Simon Marchi
2023-01-13 12:32   ` Kévin Le Gouguec
2023-01-13 16:29     ` Simon Marchi
2023-01-13 17:16       ` Kévin Le Gouguec
2023-01-27 16:53         ` [PATCH v2 0/3] " Kévin Le Gouguec
2023-01-27 16:53           ` [PATCH v2 1/3] gdb: Introduce ada-tasks.h for functions defined in ada-tasks.c Kévin Le Gouguec
2023-01-27 16:53           ` Kévin Le Gouguec [this message]
2023-01-27 16:53           ` [PATCH v2 3/3] gdb: Fix Ada tasking for baremetal targets using Ravenscar threads Kévin Le Gouguec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230127165337.1832937-3-legouguec@adacore.com \
    --to=legouguec@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).