Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Kinsey Moore <kinsey.moore@oarcorp.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Add support for TLS under RTEMS
Date: Tue, 28 Apr 2026 09:43:05 -0600	[thread overview]
Message-ID: <87ik9bm6pi.fsf@tromey.com> (raw)
In-Reply-To: <20260422151840.661343-1-kinsey.moore@oarcorp.com> (Kinsey Moore's message of "Wed, 22 Apr 2026 10:18:40 -0500")

>>>>> Kinsey Moore <kinsey.moore@oarcorp.com> writes:

> This support uses the presence of the ".rtemsroset" section to detect
> whether an ELF was created using RTEMS. This works for current RTEMS
> development (7) branch, 6 branch, 5 branch, and 4.11 branch. This
> registers the TLS callback for architectures under which RTEMS is known
> to support TLS. The RTEMS self-hosted GDB server is only expected to
> support TLS in RTEMS 6 branch and the current development branch and
> will only respond without error to qGetTLSAddr request in those
> versions. Other GDB servers will respond with TLS information if
> available.

Thanks for the patch.

> +/* Target-dependent code for RTEMS, architecture independent.
> +
> +   Copyright (C) 2026 Kinsey Moore <kinsey.moore@oarcorp.com>

gdb requires copyright assignment to the FSF, so this line will have to
change.

I don't know if your company has a blanket assignment in place...  if
not we'll have to get you set up with an assignment.

You can email 'assign@gnu.org' and explain that you have a patch to gdb,
they will get you started.

> +static enum gdb_osabi
> +rtems_osabi_sniffer (bfd *abfd)
> +{
> +  for (asection *sect : gdb_bfd_sections (abfd)) {
> +    if (strcmp(bfd_section_name (sect), ".rtemsroset") == 0) {
> +      return GDB_OSABI_RTEMS;
> +    }
> +  }

Brace placement is wrong here but the easiest thing to do is just remove
the extra braces.

gdb uses a space before paren for calls but you might as well also use
streq like

    if (streq (bfd_section_name (), "..."))

> +  if (arch_info == NULL) {
> +    return;
> +  }

Remove braces.  Also gdb has been moving to 'nullptr' rather than
'NULL'.

thanks,
Tom

      parent reply	other threads:[~2026-04-28 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 15:18 Kinsey Moore
2026-04-24  1:54 ` Kevin Buettner
2026-04-28 15:43 ` Tom Tromey [this message]

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=87ik9bm6pi.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kinsey.moore@oarcorp.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