From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 0A93E3857C45 for ; Sat, 25 Feb 2023 11:05:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A93E3857C45 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677323132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2EotDVWkBNHeaXFMdYlte63/OF0UkdVwSP7IlP3rKds=; b=MKLc2fBgiS+GFrg3imWylPvDoG7qXThmv3H8WMFeYjP6+YMxn11qzQlbb7pxA4XFPRYJhI uTF865+CNOh4ZDROobUj8++pD40bCQ38oa7R0BdLRZs70mo41Esv4fG6juG6q358g0jgVH MRPscw9RlAtS0KzPcx2IyO/egIsN6uQ= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-137-AFJUuoYZMqOlc7d1Q9subg-1; Sat, 25 Feb 2023 06:05:30 -0500 X-MC-Unique: AFJUuoYZMqOlc7d1Q9subg-1 Received: by mail-wm1-f69.google.com with SMTP id l20-20020a05600c1d1400b003e10d3e1c23so2517289wms.1 for ; Sat, 25 Feb 2023 03:05:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677323129; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2EotDVWkBNHeaXFMdYlte63/OF0UkdVwSP7IlP3rKds=; b=I2aJJ1pcR5DbnMXCJbMrFMXOFg1UqoOOcgO++N1A9qwsXeQh98m0C6ULUB66xMTeBo hHr3Cgzl7rxG4N51kXOjjTO8OPlyW+jeJ6uJ8MnTtNmUjCB1swQDxyBLt7yOi5NiRZNH R0FZODf/BjX+hIWXfmVdVeHotiyd5UPsHOSQGsJravhKbszc1bWBGEPpwYBPxjhzNCMp JiOeikMYQPsNyQn/HzMYVhkHjL6bKyI7my3VKC10lqy2vSCMrnGNrSgxV4A+ZwWiVPdW tJTmpMshKwpeQczTcLOM6eX/nDuGa++vVOz/hRJkhasoFgOR/uryAblC2Wvp7mIB4i5h GLOg== X-Gm-Message-State: AO0yUKWLnT9CNztSU2bCcM+OSIuSy5ncPRp5m8WjAgzdM0FjJ5BECvP4 mD6kAqljqmxGSbfwCPpqASaMRMlHdObNPfBnSr12KMAudnSUyxy/na0mJieUe1LnR91ZC8GKblr 4AEeV+dy7jYngTzYGJuNSQTA6++g2gCEHpM0707oPJO3FBm9NTN5cOLlhey2HXPxrg5lSjLizdQ d3o8o= X-Received: by 2002:adf:f04e:0:b0:2c7:17a5:8687 with SMTP id t14-20020adff04e000000b002c717a58687mr5751837wro.0.1677323129632; Sat, 25 Feb 2023 03:05:29 -0800 (PST) X-Google-Smtp-Source: AK7set+cNfCTvY7kxgYMJh3jzyEa2aYbgf72fse8joRHds8ag+JNWSJ22R7I05+OVVXqtYa4hDiiVg== X-Received: by 2002:adf:f04e:0:b0:2c7:17a5:8687 with SMTP id t14-20020adff04e000000b002c717a58687mr5751823wro.0.1677323129277; Sat, 25 Feb 2023 03:05:29 -0800 (PST) Received: from localhost (92.40.219.187.threembb.co.uk. [92.40.219.187]) by smtp.gmail.com with ESMTPSA id n33-20020a05600c502100b003e8dc7a03basm6082047wmr.41.2023.02.25.03.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 03:05:28 -0800 (PST) From: Andrew Burgess To: Simon Marchi via Gdb-patches , gdb-patches@sourceware.org Cc: Simon Marchi Subject: Re: [PATCH v2 00/10] Add typing annotations to gdbarch*.py and make-target-delegates.py In-Reply-To: <20230225033047.373899-1-simon.marchi@polymtl.ca> References: <20230225033047.373899-1-simon.marchi@polymtl.ca> Date: Sat, 25 Feb 2023 11:05:26 +0000 Message-ID: <878rgmj98p.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Simon Marchi via Gdb-patches writes: > v2 of: > > https://inbox.sourceware.org/gdb-patches/877cw6hma2.fsf@tromey.com/T/#t > > Patch "gdb: gdbarch.py: remove Info.__init__" is new, the rest hasn't > changed. > > Simon Marchi (10): > gdb: remove invalid / dead code from gdbarch.py > gdb: reformat Python files with black 23.1.0 > gdb: gdbarch.py: spell out parameters of _Component.__init__ > gdb: gdbarch.py: remove Info.__init__ > gdb: pyproject.toml: set pyright typeCheckingMode = "strict" > gdb: split gdbarch component types to gdbarch_types.py > gdb: gdbarch*.py, copyright.py: add type annotations > gdb: make-target-delegates.py: make one string raw > gdb: make-target-delegates.py: add Entry type > gdb: make-target-delegates.py: add type annotations Hi Simon, I tried this series and I now get this error when rerunning gdbarch.py: $ ./gdbarch.py Traceback (most recent call last): File "./gdbarch.py", line 26, in import gdbarch_components # noqa: F401 # type: ignore File "/home/andrew/projects/binutils-gdb/src.dev-2/gdb/gdbarch_components.py", line 120, in from gdbarch_types import Function, Info, Method, Value File "/home/andrew/projects/binutils-gdb/src.dev-2/gdb/gdbarch_types.py", line 31, in def join_params(params: list[tuple[str, str]]): TypeError: 'type' object is not subscriptable $ python --version Python 3.7.9 Any thoughts? Thanks, Andrew > > gdb/gdbarch.py | 161 +-------------- > ...ch-components.py => gdbarch_components.py} | 7 +- > gdb/gdbarch_types.py | 184 ++++++++++++++++++ > gdb/gdbcopyright.py | 2 +- > gdb/make-target-delegates.py | 104 +++++++--- > gdb/pyproject.toml | 3 + > gdb/python/lib/gdb/FrameDecorator.py | 1 - > gdb/python/lib/gdb/command/frame_filters.py | 1 + > gdb/python/lib/gdb/dap/server.py | 2 +- > gdb/python/lib/gdb/printing.py | 2 +- > .../gdb.multi/multi-target-info-inferiors.py | 1 + > gdb/testsuite/gdb.perf/backtrace.py | 1 - > .../gdb.python/py-framefilter-addr.py | 1 + > gdb/testsuite/gdb.python/py-framefilter.py | 1 + > gdb/testsuite/gdb.python/py-inferior-leak.py | 2 + > gdb/testsuite/gdb.python/py-prettyprint.py | 1 + > gdb/testsuite/gdb.python/py-recurse-unwind.py | 5 - > gdb/testsuite/gdb.python/py-send-packet.py | 1 + > gdb/testsuite/gdb.python/tui-window.py | 1 + > 19 files changed, 285 insertions(+), 196 deletions(-) > rename gdb/{gdbarch-components.py => gdbarch_components.py} (99%) > create mode 100755 gdb/gdbarch_types.py > > > base-commit: 95ebc6fdec5780bf59685739cdd55cd41d0f55ac > -- > 2.39.2