From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MRl4NKXV8GkzQAEAWB0awg (envelope-from ) for ; Tue, 28 Apr 2026 11:43:33 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=aRyheWaU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D0BE61E0BA; Tue, 28 Apr 2026 11:43:33 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4E81F1E067 for ; Tue, 28 Apr 2026 11:43:33 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id CFE1C4B920BA for ; Tue, 28 Apr 2026 15:43:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFE1C4B920BA Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=aRyheWaU Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id D29BF4BB589E for ; Tue, 28 Apr 2026 15:43:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D29BF4BB589E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D29BF4BB589E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::335 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777390988; cv=none; b=NkZ8nK6/TY3u6KwQ0kzTm3Ke9g7SiZ2zua8DDAGoK5UrrwKT0iK2vjTkFbbkGn2FtdlbWCuOEdpUiVvlzl2xhJ5gb/2tAjyN0lULFEOk6Y1+0ctyMuMkyf6HtJubVgGzDY9LhoYDzQa1Ea8ppEQv7fly7bRa+D4KO6zKMtr+ZlY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777390988; c=relaxed/simple; bh=jQIoEgVfXN6nZyjxtSejzeUfqxNv3ewric5YjKZP5zQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JGRYl75rPeIeHqLQCiKZcxWaFkjRlAyLHGEQcsvhDBwQQRCXtwyrh/2vsz+D0teyAsOmolx8jONqPcOIAXUIZFTcngrLpZtb9PX9GAJSiCKVsF56nRq5rolqXCnQT1BDBAxvxE9/p5zQOGz+n53nnERJHL1522OIsrlWxqTuOZY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D29BF4BB589E Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-7de431da8fbso5507655a34.1 for ; Tue, 28 Apr 2026 08:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1777390987; x=1777995787; darn=sourceware.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=L9lKXRvJOTAM7Pm7Nvi13wMf93EEiPOtDIMI9dkzhsU=; b=aRyheWaU+fK9gQjb2Fl/2hxSvS0vD8LMejqHfzO2gttmzGR/WkXLjw9z2ZMKEkOkw0 2W3Lb99YEctVFv+iUGp9UZDvZZBtH16kBIjBhSY4AqPHnJZ0ycoQ54CFDBaYX/mM9L8P IbkJp7r22gkMFP8MmNA1LYfPtf/v+/vg42DtWX2N1FGZiazZJdUJ9rv5O9Sx+pwkyEE0 z2WYf/fUi+OBJphsSPMN6EO1AY3pnjhS3xyIiD4f+Ij1Dl8ti/ufZJPZqd+aLl1KNykK tpLMEaBBdeMmiwpAoZOLHfYMwXGL7yLv4VwYCPQCWrsJvcJC3Gk5DgmUv7I10uon50Lz OVfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777390987; x=1777995787; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=L9lKXRvJOTAM7Pm7Nvi13wMf93EEiPOtDIMI9dkzhsU=; b=PhoXxo65yv9c5TEMdOjSjWqp2UJ9Rjjychrcjpbp1GSwBWjJp3Q2/zKq9ocQLarrQn WO8gH3r1qHkAcv2mSLFwtYcjwCNWgml8CsPkNtF5f80VJf99/kUyEGN+us30kqpL7dBt s6DqVX3yH1JtvMuH7qad7pbeoPnNlOkRtsXIsdrZ06ncuRePFFG1An1fvIv3frqNMFhI 2iQ3LURSd2OqbZlwhiD2kSw7nAqLdrNMbcECfsnyOk1ec7F82nCrwPpncNKAuhhaQw+X t41fLkZN0UCEmiidoZfFvdTC3gqyu0M621ULXKkxQl6rhFwOc6Oq+csuytmELyJOPsnC xjeQ== X-Gm-Message-State: AOJu0YxZawz/nhiQlIulnkDwZKpb504SwBTj/09cBbEXfZI0ENaDfD6u Ecc7zuBtZhKnwltVX7u8d8q9hkRZsFIF9yPDx0ULBJH+m1RnlnoBwRvrJcleMkYajQ== X-Gm-Gg: AeBDiesrHIgxzykLHMtsCFtAUypVe1A6yIg7ZVp+9WEClnM9JKusFApnHC/U38ZVgIb /8xeVEFS6yKOBpG3vaHNGBgYYyB78izvNcM6LBn7u+TWI279NQYmaZx936vEFsa/lDDBffxlXec T6L78UHoEwaL4xRjcsGSIk3FViV4niSFaWHyqYZYUUH/8JUSruIg3UGTxE5PYf0iGuIUt3/VANY q7WkDFgyhpaCublsSuX4zWYDR/5MxcehO0D+p7MQIoQz2fWeTNDasdgV97xEtKcHMCNX9MLO8Ll JclPbsBnNC8kyK5h/InLrI4NeetuaIgMReMLIKwDZAXs0bDZqz55UapcVepYb9de8XnJQxoIYXg Mn3QDLP9xHOSSb9wqRCt/jsxyQ9tC+Y1soDENkcaxv1VNgdXS4rpl+7f2w/SufpVi0JyI9vlFI8 cOvlbAqajdRFKLZSaZvQP1/Sb3C3DNShQMa2215iCbOVXVr00TGP8Zeg== X-Received: by 2002:a05:6830:3686:b0:7dc:e090:68a with SMTP id 46e09a7af769-7de99c424dbmr2099214a34.0.1777390987040; Tue, 28 Apr 2026 08:43:07 -0700 (PDT) Received: from bapiya (75-166-225-82.hlrn.qwest.net. [75.166.225.82]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7de9866be1esm1993436a34.18.2026.04.28.08.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2026 08:43:06 -0700 (PDT) From: Tom Tromey To: Kinsey Moore Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: Add support for TLS under RTEMS In-Reply-To: <20260422151840.661343-1-kinsey.moore@oarcorp.com> (Kinsey Moore's message of "Wed, 22 Apr 2026 10:18:40 -0500") References: <20260422151840.661343-1-kinsey.moore@oarcorp.com> X-Attribution: Tom Date: Tue, 28 Apr 2026 09:43:05 -0600 Message-ID: <87ik9bm6pi.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> Kinsey Moore 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 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