Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Kévin Le Gouguec" <legouguec@adacore.com>
To: gdb-patches@sourceware.org
Cc: "Kévin Le Gouguec" <legouguec@adacore.com>,
	"Simon Marchi" <simark@simark.ca>
Subject: [PATCH v4 0/2] Fix Ada tasking for baremetal targets using Ravenscar threads
Date: Fri, 13 Nov 2026 17:40:37 +0100	[thread overview]
Message-ID: <cover.1794585020.git.legouguec@adacore.com> (raw)
In-Reply-To: <cover.1793983731.git.legouguec@adacore.com>

This series addresses bugs with CPU indices in ravenscar-thread.c, found
while analyzing regressions with task debugging on AdaCore's runtime for
Microchip PolarFire, following various toolchain changes (upgrading the
compiler; enabling support for SMP in the runtime).

* Patch 1 is preparatory cleanup.
* Patch 2 is the actual fix.

Changes since v3: (see also range diff below)
* (patch 1) make new ada-tasks.h header cleaner:
  * remove redundant #include's in new ada-tasks.h header,
  * remove C-ism (s/(void)/()/).

Kévin Le Gouguec (2):
  gdb: Introduce ada-tasks.h for functions defined in ada-tasks.c
  gdb: Fix CPU ID offset for Ravenscar Threads

 gdb/Makefile.in            |   1 +
 gdb/ada-lang.h             |  19 -----
 gdb/ada-tasks.c            |  39 +++++-----
 gdb/ada-tasks.h            |  73 +++++++++++++++++
 gdb/break-cond-parse.c     |   2 +-
 gdb/breakpoint.c           |   1 +
 gdb/guile/scm-breakpoint.c |   2 +-
 gdb/mi/mi-main.c           |   2 +-
 gdb/python/py-breakpoint.c |   2 +-
 gdb/ravenscar-thread.c     | 155 +++++++++++++++++++++++++++----------
 10 files changed, 213 insertions(+), 83 deletions(-)
 create mode 100644 gdb/ada-tasks.h

Range-diff against v3:
1:  75610076731 ! 1:  747b666d5ed gdb: Introduce ada-tasks.h for functions defined in ada-tasks.c
    @@ gdb/ada-tasks.h (new)
     +#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"
    -+
     +/* Return true if TASK_NUM is a valid task number.  */
     +
     +extern bool valid_task_id (int task_num);
    @@ gdb/ada-tasks.h (new)
     +
     +extern struct ada_task_info *ada_get_task_info_from_ptid (ptid_t ptid);
     +
    ++struct thread_info;
    ++
     +/* Return the task number of the task whose thread is THREAD, or zero
     +   if the task could not be found.  */
     +
    @@ gdb/ada-tasks.h (new)
     +   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);
    ++extern const char *ada_get_tcb_types_info ();
     +
     +/* Print a table providing a short description of all Ada tasks
     +   running inside inferior INF.  If ARG_STR is set, it will be
2:  ec3fe94d3d7 = 2:  4c600a461fb gdb: Fix CPU ID offset for Ravenscar Threads
-- 
2.43.0


  parent reply	other threads:[~2026-11-13 16:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 17:10 [PATCH] " 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
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             ` Kévin Le Gouguec [this message]
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=cover.1794585020.git.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