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.133.124]) by sourceware.org (Postfix) with ESMTPS id 713D73858290 for ; Thu, 1 Sep 2022 21:31:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 713D73858290 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-620-p5yun0RlMuuL_bM6sdp0Zg-1; Thu, 01 Sep 2022 17:31:22 -0400 X-MC-Unique: p5yun0RlMuuL_bM6sdp0Zg-1 Received: by mail-wm1-f69.google.com with SMTP id j36-20020a05600c1c2400b003a540d88677so117187wms.1 for ; Thu, 01 Sep 2022 14:31:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=tYb6dTr7GOPZVh7NVM0eApRNDmiikxVU+ptfLi8IRjk=; b=4f8t2LxznSJPlTRByUV0rUgdsKNI+SKwyppOiNJmWU6c37iTnTJDo1u6+Wjsdq/aYP bPnULoeIDvx0w8x57QdpCnYdcG1ggnwFXIMp9fahGZ/Jw5tY2L0RAcxO3xabwlLcdv3Z YqrfDh9lKaSb/U+VegK5oF+fTOYfbs2q7+LLdzFtzLTNDRvrs3shagd5WXNj0V7WT28f /V6OC5i/ZikQCcbkzRbAaurXg5jLn4W2R+pz3hueGfSo4rA68n2sHadM6nIIoIJU4JxN LU9M1u/UT6EcBftFxXOurYp4Sa7jq/7pSzoTT3ruuci28ilUc6jJOP/YY/Nz4C6Ckb41 OHfw== X-Gm-Message-State: ACgBeo1RseCUACo54BzAIGZE+0EhqTH76Z0uUdH7ifBtP2gqEgzAMUcF bUPJ6JdIZohesTbWP6VnL29EKWUNStgQkdxumKzIPMDeC2lw8xGd8AGhLJz1roDIeLp+0upOjbC vXI5gXu2BpIj+D58g1oqMHgHYsCcRDjWtQ3+aoij/1zlz2YhK2GV4MFAYDaW/+ljmSV703tJzjA == X-Received: by 2002:a05:6000:156b:b0:222:c789:cb2d with SMTP id 11-20020a056000156b00b00222c789cb2dmr15826457wrz.197.1662067881282; Thu, 01 Sep 2022 14:31:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR70g4IxIL0gX62X+ZbEM1i9NDG4qYnFdUDqjpGc68vaLG5Top2WWGtDFeic1wFXrhlZQB/vsA== X-Received: by 2002:a05:6000:156b:b0:222:c789:cb2d with SMTP id 11-20020a056000156b00b00222c789cb2dmr15826447wrz.197.1662067880982; Thu, 01 Sep 2022 14:31:20 -0700 (PDT) Received: from localhost ([31.111.84.229]) by smtp.gmail.com with ESMTPSA id c4-20020adfef44000000b00220592005edsm15804615wrp.85.2022.09.01.14.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 14:31:20 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCH 0/9] Lots of changes to gdbarch_register_name (many architectures) Date: Thu, 1 Sep 2022 22:31:08 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2022 21:31:42 -0000 This started with a single RISC-V test failure in gdb.base/completion.exp. It ended with me changing gdbarch_register_name for almost every architecture. The problem was the precise API for gdbarch_register_name isn't really written down anywhere, and different bits of GDB seem to expect slightly different things. I used a new selftest to figure out what the most common API was, and then brought all the other architecture into line with. Unsurprisingly, this is basically to do what the more common / most used / most tested architectures do (e.g. copy i386, arm, aarch64, ppc, etc) I've tested on x86-64, ppc, and sparc, but I've not tested most of the architectures that I change here. Thoughts? Thanks, Andrew --- Andrew Burgess (9): gdb/testsuite: rewrite capture_command_output proc gdb/riscv: fix failure in gdb.base/completion.exp gdb/gdbarch: add a comment to gdbarch_register_name gdb: add a gdbarch_register_name self test, and fix some architectures gdb: check for duplicate register names in selftest gdb: add asserts to gdbarch_register_name gdb/csky: remove nullptr return from csky_pseudo_register_name gdb: final cleanup of various gdbarch_register_name methods gdb: update now gdbarch_register_name doesn't return nullptr gdb/alpha-tdep.c | 8 +-- gdb/arch-utils.c | 3 +- gdb/avr-tdep.c | 6 +- gdb/bpf-tdep.c | 5 +- gdb/cris-tdep.c | 7 +- gdb/csky-linux-tdep.c | 14 ++-- gdb/csky-tdep.c | 20 ++---- gdb/features/rs6000/powerpc-604.c | 13 ++-- gdb/features/rs6000/powerpc-604.xml | 1 - gdb/features/rs6000/powerpc-750.c | 1 - gdb/features/rs6000/powerpc-750.xml | 1 - gdb/frv-tdep.c | 6 -- gdb/ft32-tdep.c | 5 +- gdb/gdbarch-components.py | 23 +++++++ gdb/gdbarch-gen.h | 6 ++ gdb/gdbarch-selftests.c | 46 +++++++++++++ gdb/gdbarch.c | 6 +- gdb/gdbarch.py | 19 ++++- gdb/h8300-tdep.c | 11 +-- gdb/hppa-tdep.c | 12 ++-- gdb/infcmd.c | 3 +- gdb/iq2000-tdep.c | 3 +- gdb/lm32-tdep.c | 6 +- gdb/m32c-tdep.c | 8 +-- gdb/m32r-tdep.c | 5 +- gdb/m68hc11-tdep.c | 9 +-- gdb/m68k-tdep.c | 9 +-- gdb/mep-tdep.c | 2 +- gdb/mi/mi-main.c | 20 ++---- gdb/microblaze-tdep.c | 6 +- gdb/mips-tdep.c | 8 +-- gdb/mn10300-tdep.c | 14 ++-- gdb/moxie-tdep.c | 5 +- gdb/msp430-tdep.c | 2 + gdb/nds32-tdep.c | 10 +-- gdb/nios2-tdep.c | 2 +- gdb/regcache.c | 5 +- gdb/reggroups.c | 3 +- gdb/riscv-tdep.c | 34 ++++----- gdb/sh-tdep.c | 103 +++++++++------------------- gdb/sparc-tdep.c | 8 +-- gdb/sparc64-tdep.c | 8 +-- gdb/testsuite/lib/gdb.exp | 35 +++++++++- gdb/tic6x-tdep.c | 3 - gdb/tilegx-tdep.c | 8 +-- gdb/tui/tui-regs.c | 4 +- gdb/user-regs.c | 10 +-- gdb/v850-tdep.c | 14 ++-- gdb/valops.c | 2 +- gdb/vax-tdep.c | 6 +- gdb/xstormy16-tdep.c | 9 +-- gdb/xtensa-tdep.c | 6 +- gdb/z80-tdep.c | 4 +- 53 files changed, 280 insertions(+), 307 deletions(-) -- 2.25.4