From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0Vb6Mf0N8Gjj8DUAWB0awg (envelope-from ) for ; Wed, 15 Oct 2025 17:11:25 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=blKChUlQ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B148B1E0BA; Wed, 15 Oct 2025 17:11:25 -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,FREEMAIL_FROM,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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 server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 A89281E047 for ; Wed, 15 Oct 2025 17:11:24 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3E96A38560B1 for ; Wed, 15 Oct 2025 21:11:24 +0000 (GMT) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id AF0A6385B517 for ; Wed, 15 Oct 2025 21:10:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF0A6385B517 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AF0A6385B517 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::530 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760562658; cv=none; b=K5D7cOC64Bl6XgQuEon2r2Ja4D4PwI1Io2wKi2PJLwT0gmcTWDmRrMOYGvdVlkcypdovop9KbSd/R/ZmCfZMrm75AG9VSwJnitcGm0YEKGH2mwuxXTCyfQraapbJi73jajj8nYC+pN288W7psuIsJHm7U1FVEcga9QqlAeUsT5A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760562658; c=relaxed/simple; bh=FjxJrYmJ/fOMMDKepVj3vpawwSVr5P2wqs7L0yUH/HY=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=APKcX8hLhyKWcm7rFhY5HmY16Crt2cQP+6ucvD5HwTyuH+VaNIU/aj0t8bQA9RnSnHbOyq5piKY7LlulaTQtwU4wsFGC6Ifm0Qs7jeXHJzsupnkMq57Qzg+5/PURdvGQynh8RMmRxxCLz8vTFXIaoB5mkH4KGkQgQR/+Mip4LUs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-634b774f135so11356432a12.2 for ; Wed, 15 Oct 2025 14:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760562644; x=1761167444; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jhXLTVBry1c8W+nTO1Rem5eMi3VLPvYEXx3dKvdIBgQ=; b=blKChUlQccKc8cIg+9dAFYPZSRTggY0idAH4gxC0YdKR8xgzyyKtFteHi8+CUD+0Lg TXLI3sI9odURJjR60FyDThXi9fN9pJzceZxT4RbFPLjOQ0nqwj49y0va8lzK2L7ho0Q2 xFvrC1f3f/WE5tVYhBqB+0lYiJIq6r3hhainlDpCUVCwfNKUw1ZXAWOCQRwBoVCZkSFp mihGdAXx90GPyVuqaL6ouzu61rCWq5+qApsWqsuxkniTXa64pWuch/AFSYGHTMl2YtGh 4Y12z6ity/BtFWUPmlM0nFSQ7O/NBdbectjDQ+mJk1gGoqseIoqgUV8L4Hx+l8tcxSPG 87/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760562644; x=1761167444; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jhXLTVBry1c8W+nTO1Rem5eMi3VLPvYEXx3dKvdIBgQ=; b=cLBVuLhyM4Qu6WhSNtRHMkzQDsxCA0Es+6zBYQ9MIhwEDlZUiexaFq+KFs6TWfPoFs crfTbuaVu64jQ7iPJSefb3q3VHbSkAQgZcbN9Do4CMAGGctyFqbFvB5gmD9DT0RVh8SY /WKtVvWoM1+gcguR6h5T9LlXAkxyTNIt44lJDTl3GqsHcFtPiSSjY+1xW28hCUlnTSAF Q++r0JqwaAPS7oDt8qPsZ1U10I58IQld5Eub3T8NBL6+jD7gmyZp70ECtFvOxtfnMhee cqYOjwjoRo5NrTc2KEIMjBm2ydiGLIBU85zZcmNF/fCb2tAdo5FAqigrOWnw5vUgs6rq K9+A== X-Gm-Message-State: AOJu0YyYvYS6R5IyJfSWTc1EtCSnnKgmRTyMTk7WmZLoWAbdGBoL6vjO 76uvasj5DjioOqf+HjowIch6ojbC8k690ufFuqlxU+xdHQhbr5yB+ViX1swOMpVSKispjNIg4J+ Jn7KjZ0OB72TIaQSMci876j0XwdzrTxX3rDiy X-Gm-Gg: ASbGncsjvNXkN2UQX2dq5MoMI+UJFTrZW50LoD59tz8nVUT8YcleXIKwPTC1MytOc5R urbpCvhYvjamAt57V1lMFS5c5jkIMyJW0/qEydKhGT4fwXK+J0vRd/7Hx0W1dmsSrn3vfkHJaNi MgPZfr7xj3j0GRLiNdOts6P2CNw/aoKiXHBQJ+ieyn6zFvpl4VIFZhHHfMUnHLf1pz1bMfRu/7J IZ5pQuuSn3oRr4njBJ/jsh3lvM= X-Google-Smtp-Source: AGHT+IF5hX86LXeQFyuq8Lzs79ZwY4WxiFHvo/9UBwUzbHEvbS427bprdvbPdYRPuKCRgZ1V9z6hc2+GcotCZW+SmuM= X-Received: by 2002:a05:6402:26d1:b0:63b:f76f:c87e with SMTP id 4fb4d7f45d1cf-63bf76fca36mr2596926a12.1.1760562643500; Wed, 15 Oct 2025 14:10:43 -0700 (PDT) MIME-Version: 1.0 References: <20251012211555.8103-1-wqferr@gmail.com> <87h5vzsxds.fsf@tromey.com> In-Reply-To: <87h5vzsxds.fsf@tromey.com> From: William Ferreira Date: Wed, 15 Oct 2025 18:10:32 -0300 X-Gm-Features: AS18NWDpbMdrrma91be-gFdmd2AEkXvrYd5u5JU29HEj-lhB9GP73QspI1jRYSE Message-ID: Subject: Re: [PATCH v3] [gdb] Create script to convert old tests into Dwarf::assemble calls. To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: multipart/alternative; boundary="000000000000f88129064138ee77" 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 --000000000000f88129064138ee77 Content-Type: text/plain; charset="UTF-8" Copyright is already assigned, everything is ready. I can convert the tests in a following commit, along with a few others. I will have some free time starting on the 27th, so if you have any other comments please submit a proper bug report before then. If you do so, please send its URL to me either directly or in this thread. Regarding your concerns as to whether that section will work properly, could you please point me to a DWARF assembler test that uses this new syntax? I might be able to fix this implementation before the rebase. Thank you, William Ferreira. On Wed, Oct 15, 2025, 17:50 Tom Tromey wrote: > >>>>> William Ferreira writes: > > > PR testsuite/32261 requests a script that could convert old .S-based > > tests (that were made before dwarf.exp existed) into the new > > Dwarf::assemble calls in Tcl. This commit is an initial implementation > > of such a script. Python was chosen for convenience, and only relies on > > a single external library. > > Thank you for doing this. > > > The following .exp files have been tried in this way and their outputs > > highly resemble the original: > > - gdb.dwarf2/dynarr-ptr > > - gdb.dwarf2/void-type > > - gdb.dwarf2/ada-thick-pointer > > - gdb.dwarf2/atomic-type > > - gdb.dwarf2/dw2-entry-points (*) > > - gdb.dwarf2/main-subprogram > > Are you planning to try to convert these tests? If so that would be > fantastic. If not, that's totally fine, maybe we should file a bug for > this. It'd be nice to get rid of the old .s tests. Anyway let me know. > > > Currently the script has the following known limitations: > [...] > > FWIW I think basically any limitations are fine. The DWARF assembler > itself had many at the start, people tend to add things as needed. > > > + s = lbrace > > + s += self.name + " " > > + s += self._format_value(offset_die_lookup) > > I somewhat suspect this output will not work now, because there were > some recent changes to make attributes Tcl code rather than > specially-parsed data. > > However that's yet another thing we can fix in situ. > > Approved-By: Tom Tromey > > I forget what your copyright situation is. If you are all set up, we > can land this. If you plan to submit more gdb contributions, let me > know and we can set up write-after-approval access for you. > > Tom > --000000000000f88129064138ee77 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Copyright is already assigned, everything is ready. I can= convert the tests in a following commit, along with a few others.

I will have some free time starting o= n the 27th, so if you have any other comments please submit a proper bug re= port before then. If you do so, please send its URL to me either directly o= r in this thread.

Regard= ing your concerns as to whether that section will work properly, could you = please point me to a DWARF assembler test that uses this new syntax? I migh= t be able to fix this implementation before the rebase.

Thank you,
William F= erreira.

On Wed, Oct 15, 2025, 17:50 Tom Tromey = <tom@tromey.com> wrote:
>>>>> William Ferreira <= wq= ferr@gmail.com> writes:

> PR testsuite/32261 requests a script that could convert old .S-based > tests (that were made before dwarf.exp existed) into the new
> Dwarf::assemble calls in Tcl. This commit is an initial implementation=
> of such a script. Python was chosen for convenience, and only relies o= n
> a single external library.

Thank you for doing this.

> The following .exp files have been tried in this way and their outputs=
> highly resemble the original:
> - gdb.dwarf2/dynarr-ptr
> - gdb.dwarf2/void-type
> - gdb.dwarf2/ada-thick-pointer
> - gdb.dwarf2/atomic-type
> - gdb.dwarf2/dw2-entry-points (*)
> - gdb.dwarf2/main-subprogram

Are you planning to try to convert these tests?=C2=A0 If so that would be fantastic.=C2=A0 If not, that's totally fine, maybe we should file a bu= g for
this.=C2=A0 It'd be nice to get rid of the old .s tests.=C2=A0 Anyway l= et me know.

> Currently the script has the following known limitations:
[...]

FWIW I think basically any limitations are fine.=C2=A0 The DWARF assembler<= br> itself had many at the start, people tend to add things as needed.

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 s =3D lbrace
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 s +=3D self.name + " "<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 s +=3D self._format_value(offset_die_look= up)

I somewhat suspect this output will not work now, because there were
some recent changes to make attributes Tcl code rather than
specially-parsed data.

However that's yet another thing we can fix in situ.

Approved-By: Tom Tromey <tom@tromey.com>

I forget what your copyright situation is.=C2=A0 If you are all set up, we<= br> can land this.=C2=A0 If you plan to submit more gdb contributions, let me know and we can set up write-after-approval access for you.

Tom
--000000000000f88129064138ee77--