From: Simon Marchi <simark@simark.ca>
To: William Ferreira <wqferr@gmail.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb] Create script to convert old tests into Dwarf::assemble calls.
Date: Thu, 5 Dec 2024 12:25:16 -0500 [thread overview]
Message-ID: <5eb4ee44-8ae7-4fcc-8b1a-ee8c47ab86f2@simark.ca> (raw)
In-Reply-To: <20241205135550.9320-1-wqferr@gmail.com>
On 2024-12-05 08:55, William Ferreira wrote:
> 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.
Thanks for doing this. I don't have time for a deep review right now,
but I have a few superficial comments.
I'm not sure I would put it under testsuite/lib. This directory
contains stuff used by the tests themselves (expect code) of test
programs. Maybe right under testsuite? There are already two Python
utils there.
Run black and flake8. I would suggest setting up pre-commit for that:
https://sourceware.org/gdb/wiki/DeveloperTips#Setting_up_pre-commit
However, the flake8 entry in .pre-commit-config.yml isn't properly set
up to pick up gdb/testsuite/*.py, I will try to fix that right now.
> +def main(argv):
> + try:
> + filename = argv[1]
> + except IndexError:
> + print("Usage:")
> + print("python ./asm_to_dwarf_assembler.py <path/to/elf/file>")
> + sys.exit(1)
You import argparse but don't use it. Any reason not to use it?
Simon
next prev parent reply other threads:[~2024-12-05 17:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-05 13:55 William Ferreira
2024-12-05 17:25 ` Simon Marchi [this message]
2024-12-05 17:37 ` Luis Machado
2024-12-05 17:46 ` Simon Marchi
2024-12-05 17:48 ` Luis Machado
2024-12-09 20:30 ` Tom Tromey
2024-12-17 16:43 ` Guinevere Larsen
2024-12-17 21:36 ` William Ferreira
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=5eb4ee44-8ae7-4fcc-8b1a-ee8c47ab86f2@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=wqferr@gmail.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