From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fX/ZEW18M2XhlTMAWB0awg (envelope-from ) for ; Sat, 21 Oct 2023 03:23:25 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=oSZtbygh; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3BB841E0C1; Sat, 21 Oct 2023 03:23:25 -0400 (EDT) Received: from server2.sourceware.org (ip-8-43-85-97.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 B42191E00F for ; Sat, 21 Oct 2023 03:23:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D28953858C5F for ; Sat, 21 Oct 2023 07:23:21 +0000 (GMT) Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 6ECE33858D35 for ; Sat, 21 Oct 2023 07:23:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6ECE33858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6ECE33858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697872991; cv=none; b=FeMbvzwZVumui7rsN+teLDUrBZFxXPGOifI5iuiZcrDV7XEofszhvM83s/MtoXwjHYlPzJPKkc4oG0/aceI5/EljkbQvHO1xmOdnJHYGJV++azTwHKtJ+Ya/Kp+RzdK9oroI2Es4N2Y8Gke2WTKGcwl4CfDXafivrv6guT3Yp8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697872991; c=relaxed/simple; bh=7KovhzKSQwNJ7fFLztfgrqYsfz4RyuNbaFr8ZvSleyM=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=yF3iCbtq8EvEcOACjfnWeow9NFTCdReJS9Rr4cly98xxHhYkxUTJulzXjthBtIh+KeF+yxxfDsiazxD3tU5PP+4+5NUaOrGRrrnbkgjvdYxOPjOKkwR8O3xVk584VGQeTSsI3UOAkAP1L9gdWR299MPlTVFJZRfY7Ry6pWkhLZs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qu6K3-0002dt-Q7; Sat, 21 Oct 2023 03:22:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=C4lfFqKPeFpwFU6sGAmpxtaQnery5RZtkF9ALQ2q7ec=; b=oSZtbygh0NzH CBANRGEocNBKxhnu4PZCUVsoq4ofO+0RcJSn0ZpilNIZ2/8J1e2G+cgCY6YpbrjLSZUgfSQsB69W1 NKbKF3qOhhnhJVJHvGx7dHDaqZQkOCSvVuLEIs2SUtNyHbtlQXgkxipK5z2YlM3JDaL9t2U6iS9S8 GilgpXF3Oh6Zwk9nnpgGUmOdb2fbKqlnWH3KXYpG6jqIUSeJaPWcVvmHqcrl7c5ovHF9MAjHPugNc 4Vbj8sicdvVliTkpDwqMlyDAin0Z9ObOhysV+xeZJY0XSAQ5bS1i/vFCnH17wy7b9wyoMFcYf88LR +gOqxRdbj1HB2d5DU3Etlg==; Date: Sat, 21 Oct 2023 10:22:57 +0300 Message-Id: <83fs24salq.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <90a53b19bd317ff337041c495f338a2b0b5ad727.1697837538.git.aburgess@redhat.com> (message from Andrew Burgess on Fri, 20 Oct 2023 22:33:09 +0100) Subject: Re: [PATCH 1/3] gdb: error if /r and /b are used with disassemble command References: <90a53b19bd317ff337041c495f338a2b0b5ad727.1697837538.git.aburgess@redhat.com> X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP 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.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 > From: Andrew Burgess > Cc: Andrew Burgess > Date: Fri, 20 Oct 2023 22:33:09 +0100 > > The disassembler gained a new /b flag in this commit: > > commit d4ce49b7ac077a9882d6a5e689e260300045ca88 > Date: Tue Jun 21 20:23:35 2022 +0100 > > gdb: disassembler opcode display formatting > > The /b and /r flags result in the instruction opcodes displayed in > different formats, so it's not possible to have both at the same > time. Currently the /b flag overrides the /r flag. > > We have a similar situation with the /m and /s flags, but here, if the > user tries to use both flags then they will get an error. > > I think the error is clearer, so in this commit I propose that we add > an error if /r and /b are both used. > > Obviously this change breaks backwards compatibility. I don't have a > compelling argument for why we should make the change beyond my > feeling that it was a mistake not to add this error from the start, > and that the new behaviour is better. > --- > gdb/NEWS | 7 ++++++ > gdb/cli/cli-cmds.c | 4 +++ > gdb/doc/gdb.texinfo | 20 ++++++++++----- > gdb/testsuite/gdb.disasm/basics.c | 22 ++++++++++++++++ > gdb/testsuite/gdb.disasm/basics.exp | 39 +++++++++++++++++++++++++++++ > 5 files changed, 86 insertions(+), 6 deletions(-) > create mode 100644 gdb/testsuite/gdb.disasm/basics.c > create mode 100644 gdb/testsuite/gdb.disasm/basics.exp Thanks, the documentation parts are OK. Reviewed-By: Eli Zaretskii