From: Simon Marchi <simark@simark.ca>
To: "Kévin Le Gouguec" <legouguec@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v3 1/2] gdb: Introduce ada-tasks.h for functions defined in ada-tasks.c
Date: Fri, 6 Nov 2026 14:43:49 -0500 [thread overview]
Message-ID: <e397fa91-8ac8-43d0-89a4-95d0f44f45c5@simark.ca> (raw)
In-Reply-To: <7561007673151647213c12316b34961b5ee9f657.1793983731.git.legouguec@adacore.com>
On 11/6/26 11:51 AM, Kévin Le Gouguec wrote:
> Also move the documentation for these functions to the new header, instead
> of at the top of their definition, to align with our current practice.
>
> I tried to honor our guideline that .c files should not rely on indirect
> inclusion, hence I only removed #include "ada-lang.h" directives in .c files
> that, as far as I could tell, only rely on symbols declared in ada-tasks.h.
Tom can perhaps more formally approve, but I like this patch.
> diff --git a/gdb/ada-tasks.h b/gdb/ada-tasks.h
> new file mode 100644
> index 00000000000..a9fa798a5c2
> --- /dev/null
> +++ b/gdb/ada-tasks.h
> @@ -0,0 +1,72 @@
> +/* Helper routines for Ada tasking support in GBD.
> +
> + Copyright (C) 2026 Free Software Foundation, Inc.
> +
> + This file is part of GDB.
> +
> + This program is free software; you can redistribute it and/or modify
> + it under the terms of the GNU General Public License as published by
> + the Free Software Foundation; either version 3 of the License, or
> + (at your option) any later version.
> +
> + This program is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + GNU General Public License for more details.
> +
> + You should have received a copy of the GNU General Public License
> + along with this program. If not, see <http://www.gnu.org/licenses/>. */
> +
> +#ifndef GDB_ADA_TASKS_H
> +#define GDB_ADA_TASKS_H
> +
> +#include "gdbsupport/function-view.h"
> +#include "ada-lang.h"
> +#include "gdbthread.h"
> +#include "inferior.h"
> +#include "ui-out.h"
As far as I can tell, ada-tasks.h does not need any header, only the
forward declaration:
struct thread_info;
The other types don't need a forward declaration as it is, because they
spelled with the "struct" keyword, which is itself a declaration. And
the header does not need to see the complete declaration of the types.
I check that by opening the file in my VSCode+clangd, if there is any
error reported it means something is missing.
> +/* Get, from the debugging information, the type description of all types
> + related to the Ada Task Control Block that are needed in order to
> + read the list of known tasks in the Ada runtime. If all of the info
> + needed to do so is found, then save that info in the module's per-
> + program-space data, and return NULL. Otherwise, if any information
> + cannot be found, leave the per-program-space data untouched, and
> + return an error message explaining what was missing (that error
> + message does NOT need to be deallocated). */
> +
> +extern const char *ada_get_tcb_types_info (void);
You can remove the `void`.
Simon
next prev parent reply other threads:[~2026-11-06 19:44 UTC|newest]
Thread overview: 19+ 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 via Gdb-patches
2023-01-12 18:19 ` Simon Marchi via Gdb-patches
2023-01-13 12:32 ` Kévin Le Gouguec via Gdb-patches
2023-01-13 16:29 ` Simon Marchi via Gdb-patches
2023-01-13 17:16 ` Kévin Le Gouguec via Gdb-patches
2023-01-27 16:53 ` [PATCH v2 0/3] " Kévin Le Gouguec via Gdb-patches
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 via Gdb-patches
2023-01-27 16:53 ` [PATCH v2 2/3] gdb/ada-tasks: Make the ada_tasks_pspace_data getter public Kévin Le Gouguec via Gdb-patches
2023-01-27 16:53 ` [PATCH v2 3/3] gdb: Fix Ada tasking for baremetal targets using Ravenscar threads Kévin Le Gouguec via Gdb-patches
2026-11-06 16:51 ` [PATCH v3 0/2] " Kévin Le Gouguec
2026-11-06 16:51 ` [PATCH v3 1/2] gdb: Introduce ada-tasks.h for functions defined in ada-tasks.c Kévin Le Gouguec
2026-11-06 19:43 ` Simon Marchi [this message]
2026-11-09 9:14 ` Kévin Le Gouguec
2026-11-09 15:02 ` Simon Marchi
2026-11-09 17:07 ` Kévin Le Gouguec
2026-11-06 16:51 ` [PATCH v3 2/2] gdb: Fix CPU ID offset for Ravenscar Threads Kévin Le Gouguec
2026-11-13 16:40 ` [PATCH v4 0/2] Fix Ada tasking for baremetal targets using Ravenscar threads Kévin Le Gouguec
2026-11-13 16:40 ` [PATCH v4 1/2] gdb: Introduce ada-tasks.h for functions defined in ada-tasks.c Kévin Le Gouguec
2026-11-13 16:40 ` [PATCH v4 2/2] gdb: Fix CPU ID offset for 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=e397fa91-8ac8-43d0-89a4-95d0f44f45c5@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=legouguec@adacore.com \
/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