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 779D0385AE62 for ; Fri, 24 Jun 2022 10:15:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 779D0385AE62 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-264-k1TMMRpuONe3MFH6H9pSbg-1; Fri, 24 Jun 2022 06:15:42 -0400 X-MC-Unique: k1TMMRpuONe3MFH6H9pSbg-1 Received: by mail-wm1-f69.google.com with SMTP id c185-20020a1c35c2000000b0039db3e56c39so2856105wma.5 for ; Fri, 24 Jun 2022 03:15:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=dbNy07wqleOfR6OhmRjVkyXRdnvAj80IwyEYF7FNWes=; b=MAIG+njJLhcHjWEKnC06OOGUPrQObmHTWxfzcId29IRvlyOtd6diJ8Ud9O26lkOdlH Uvd63d+fFU9o7BkDbZ6PiU2g5ersyxzzs7r+YUgkzVA4SSqZ4EedLx82O0yh5SLzsvhq Zgd28DN/TkNRzAiQCX8HKnS+jMSEihZdGHuiZhBk6kG+tAB/zSxXco3UGj3kl5f3Re7o xM0NrDB2dL2MhVzW+SsG8hyzxVIajHpBI6ouoOL9HZyXVizMgBiCR1W1zwB15kfQNUgS DhF7wR3fBbSwMdBh7PEJrjIfnONfaX7HIGiDjPoitNlWPvUUFSYwWXRtu9fBE/is4n75 IIeA== X-Gm-Message-State: AJIora8gdMVVRNNXBScUqV0AVT/qzMl1BKCIwu/6X3UtOPcr0Z50gZca HGIJBDqjPrtMv2qb99nFMfh34++K4mlJy4MvGzjL3lH6BAsNiH1A2csB68MYd9gqU58hB+Aw58a Y1CHJw+OasTt21Wuk+YvT5OaVycHAHFhKSU4jwInh1peUSgSuVdK9aitUTKeIhhvRNzkYis+Gnw == X-Received: by 2002:a05:600c:3caa:b0:3a0:18e4:781b with SMTP id bg42-20020a05600c3caa00b003a018e4781bmr2923968wmb.199.1656065740657; Fri, 24 Jun 2022 03:15:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u9jv93W2aDzVx6qLoFpLkmmhzViX7BDyK8cYE4IMDY2Y9kNdj8o4TyfZFMpngzJccxQjqRFw== X-Received: by 2002:a05:600c:3caa:b0:3a0:18e4:781b with SMTP id bg42-20020a05600c3caa00b003a018e4781bmr2923933wmb.199.1656065740336; Fri, 24 Jun 2022 03:15:40 -0700 (PDT) Received: from localhost ([195.213.152.79]) by smtp.gmail.com with ESMTPSA id x10-20020a5d54ca000000b0021b85664636sm1892481wrv.16.2022.06.24.03.15.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 03:15:39 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: Re: [PATCHv3 0/6] Handle trying to use a native target with the wrong binary In-Reply-To: References: Date: Fri, 24 Jun 2022 11:15:39 +0100 Message-ID: <87sfnubc50.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=-6.5 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: Fri, 24 Jun 2022 10:15:48 -0000 Ping! I'm planning to push this next week unless someone objects: Patches #1 -> #3 are obvious fixes, Patches #4 -> #5, are useful for finding real bugs in GDB (see the first 3 patches), so I think are a good thing, even if it will be slightly annoying for anyone with an out of tree GDB (though the updates required are pretty straight forward), Patch #6, this is the one I'd most appreciate feedback on, is this strategy acceptable? Thanks, Andrew Andrew Burgess writes: > Changes since v2: > > - Patch #3 has been replaced after feedback from Luis. New patch > fixes sider issues for arm, mips, and frv targets, this includes > the issue the v2 patch fixed. > > - Nothing else has changed. > > Changes since v1: > > - Patches #1 and #2 are unchanged. > > - Patch #3 is new in this version. > > - Patch #4 is unchanged (was patch 3). > > - Patch #5 is updated inline with John's feedback (was patch 4). > > - Patch #6 is extended to handle multi-arch case for rs6000/ppc and > arm/aarch64, commit message is updated to discuss these cases, as > well as mentioning i386/x86-64 (was patch 5). > > Series has been tested on x86-64/linux and aarch64/linux. > > --- > > Andrew Burgess (6): > gdb/arm: move fetch of arm_gdbarch_tdep to a more inner scope > gdb/mips: rewrite show_mask_address > gdb: select suitable thread for gdbarch_adjust_breakpoint_address > gdb: move the type cast into gdbarch_tdep > gdb: ensure the cast in gdbarch_tdep is valid > gdb: native target invalid architecture detection > > gdb/aarch64-fbsd-nat.c | 4 +- > gdb/aarch64-fbsd-tdep.c | 6 +- > gdb/aarch64-linux-nat.c | 28 +++++--- > gdb/aarch64-linux-tdep.c | 10 +-- > gdb/aarch64-newlib-tdep.c | 2 +- > gdb/aarch64-tdep.c | 48 ++++++------- > gdb/aix-thread.c | 28 ++++---- > gdb/alpha-linux-tdep.c | 2 +- > gdb/alpha-netbsd-tdep.c | 2 +- > gdb/alpha-obsd-tdep.c | 2 +- > gdb/alpha-tdep.c | 14 ++-- > gdb/amd64-darwin-tdep.c | 2 +- > gdb/amd64-fbsd-nat.c | 4 +- > gdb/amd64-fbsd-tdep.c | 4 +- > gdb/amd64-linux-tdep.c | 8 +-- > gdb/amd64-netbsd-tdep.c | 2 +- > gdb/amd64-obsd-tdep.c | 2 +- > gdb/amd64-sol2-tdep.c | 2 +- > gdb/amd64-tdep.c | 34 ++++----- > gdb/amd64-windows-tdep.c | 2 +- > gdb/arc-linux-tdep.c | 4 +- > gdb/arc-newlib-tdep.c | 2 +- > gdb/arc-tdep.c | 8 +-- > gdb/arch-utils.c | 14 +++- > gdb/arch-utils.h | 5 ++ > gdb/arm-fbsd-nat.c | 4 +- > gdb/arm-fbsd-tdep.c | 6 +- > gdb/arm-linux-nat.c | 8 +-- > gdb/arm-linux-tdep.c | 4 +- > gdb/arm-netbsd-nat.c | 8 +-- > gdb/arm-netbsd-tdep.c | 4 +- > gdb/arm-none-tdep.c | 2 +- > gdb/arm-obsd-tdep.c | 2 +- > gdb/arm-tdep.c | 142 ++++++++++++++++++++----------------- > gdb/arm-wince-tdep.c | 2 +- > gdb/avr-tdep.c | 12 ++-- > gdb/bfin-tdep.c | 4 +- > gdb/breakpoint.c | 24 +++++-- > gdb/cris-linux-tdep.c | 2 +- > gdb/cris-tdep.c | 18 ++--- > gdb/csky-tdep.c | 2 +- > gdb/frv-tdep.c | 4 +- > gdb/ft32-tdep.c | 2 +- > gdb/gdbarch.h | 26 ++++++- > gdb/hppa-bsd-tdep.c | 2 +- > gdb/hppa-linux-tdep.c | 4 +- > gdb/hppa-tdep.c | 12 ++-- > gdb/i386-bsd-tdep.c | 2 +- > gdb/i386-darwin-tdep.c | 4 +- > gdb/i386-fbsd-tdep.c | 4 +- > gdb/i386-gnu-tdep.c | 2 +- > gdb/i386-go32-tdep.c | 2 +- > gdb/i386-linux-tdep.c | 4 +- > gdb/i386-netbsd-tdep.c | 4 +- > gdb/i386-nto-tdep.c | 6 +- > gdb/i386-obsd-tdep.c | 2 +- > gdb/i386-sol2-tdep.c | 2 +- > gdb/i386-tdep.c | 98 ++++++++++++------------- > gdb/i386-windows-tdep.c | 2 +- > gdb/i387-tdep.c | 20 +++--- > gdb/ia64-linux-tdep.c | 2 +- > gdb/ia64-tdep.c | 12 ++-- > gdb/inf-child.c | 19 +++++ > gdb/inf-child.h | 2 + > gdb/infcmd.c | 8 +++ > gdb/loongarch-linux-nat.c | 6 +- > gdb/loongarch-linux-tdep.c | 8 +-- > gdb/loongarch-tdep.c | 10 +-- > gdb/m32c-tdep.c | 58 +++++++-------- > gdb/m68hc11-tdep.c | 12 ++-- > gdb/m68k-bsd-tdep.c | 2 +- > gdb/m68k-linux-tdep.c | 2 +- > gdb/m68k-tdep.c | 38 +++++----- > gdb/mep-tdep.c | 6 +- > gdb/mips-linux-tdep.c | 4 +- > gdb/mips-tdep.c | 85 +++++++++++----------- > gdb/mn10300-tdep.c | 2 +- > gdb/mn10300-tdep.h | 2 +- > gdb/msp430-tdep.c | 12 ++-- > gdb/nds32-tdep.c | 20 +++--- > gdb/nios2-linux-tdep.c | 2 +- > gdb/nios2-tdep.c | 4 +- > gdb/or1k-tdep.c | 8 +-- > gdb/ppc-fbsd-nat.c | 12 +++- > gdb/ppc-fbsd-tdep.c | 8 +-- > gdb/ppc-linux-nat.c | 30 +++++--- > gdb/ppc-linux-tdep.c | 18 ++--- > gdb/ppc-netbsd-nat.c | 6 +- > gdb/ppc-netbsd-tdep.c | 2 +- > gdb/ppc-obsd-nat.c | 12 +++- > gdb/ppc-obsd-tdep.c | 2 +- > gdb/ppc-sysv-tdep.c | 22 +++--- > gdb/ppc64-tdep.c | 2 +- > gdb/riscv-linux-tdep.c | 2 +- > gdb/riscv-tdep.c | 26 +++---- > gdb/rl78-tdep.c | 8 +-- > gdb/rs6000-aix-nat.c | 14 +++- > gdb/rs6000-aix-tdep.c | 16 ++--- > gdb/rs6000-lynx178-tdep.c | 4 +- > gdb/rs6000-tdep.c | 132 +++++++++++++++++----------------- > gdb/rx-tdep.c | 2 +- > gdb/s390-linux-tdep.c | 20 +++--- > gdb/s390-tdep.c | 42 +++++------ > gdb/sh-linux-tdep.c | 2 +- > gdb/sh-netbsd-tdep.c | 2 +- > gdb/sh-tdep.c | 8 +-- > gdb/sparc-linux-tdep.c | 4 +- > gdb/sparc-netbsd-tdep.c | 2 +- > gdb/sparc-sol2-tdep.c | 2 +- > gdb/sparc-tdep.c | 14 ++-- > gdb/sparc64-fbsd-tdep.c | 2 +- > gdb/sparc64-linux-tdep.c | 4 +- > gdb/sparc64-netbsd-tdep.c | 2 +- > gdb/sparc64-obsd-tdep.c | 2 +- > gdb/sparc64-sol2-tdep.c | 2 +- > gdb/sparc64-tdep.c | 10 +-- > gdb/target-delegates.c | 28 ++++++++ > gdb/target.h | 13 +++- > gdb/tic6x-linux-tdep.c | 6 +- > gdb/tic6x-tdep.c | 6 +- > gdb/v850-tdep.c | 6 +- > gdb/windows-nat.c | 2 +- > gdb/xtensa-linux-nat.c | 4 +- > gdb/xtensa-linux-tdep.c | 2 +- > gdb/xtensa-tdep.c | 54 +++++++------- > gdb/z80-tdep.c | 8 +-- > 126 files changed, 868 insertions(+), 706 deletions(-) > > -- > 2.25.4