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 B70073858CDA for ; Mon, 5 Sep 2022 14:11:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B70073858CDA 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-385-wXHM8JHLNFaxR-q2n524jQ-1; Mon, 05 Sep 2022 10:11:47 -0400 X-MC-Unique: wXHM8JHLNFaxR-q2n524jQ-1 Received: by mail-wm1-f69.google.com with SMTP id a17-20020a05600c349100b003a545125f6eso7509160wmq.4 for ; Mon, 05 Sep 2022 07:11:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date; bh=3su4YTrNqNk+JMPAi/hMYoino640Yvop0eQfldGmUn4=; b=kcBBgYLOGHwuUntiwWnfLqGODMi6y5CUjGCBklWRvTsiBjZHz9Ws2mpibtk37HfT3i KqAFeMJ4ii9SIA9IaiZRmvsI64yn+CO+sX+3YvlrIHEsnCYlQtqTMReIqAiMh/of/nlx EP0wGXB4Fsrx1p/O/AwA9Iw320S+Fy4G6tdKB4MleBVE2o8XinwCCxyK71EgonODEX0b JojfgKW+Pjz0PYalM60IT8buFWvMKHuCZmgL5Ym826uPIVa0h7k1fasHFN54vYKDMg9F HdGXJQ6WIX33cNdBjkOvnfpM0HOvYgqeKlbv4LX2kqSpGMLw3p96uGCe/Qe8tfsw5D5L imKg== X-Gm-Message-State: ACgBeo0PM8fpsb8wkqX0ngaNvnQB32YincUfEQq/LWJ7CbfEIV2Q/I55 BBeXzKby+6zgJNO/6Zl/6krx4jDXkkG/r8yc6Lfkp8hXDB1KvrutCx8d4Cv2oMuOdWUVzpY5aBx JX8ad7xV3kte0lprxRhFOvSjds81CLUItFSAFy2VOLkKwCfB2UA5razYPtQl6XHS9wF5tgUFzQg == X-Received: by 2002:a5d:4ac3:0:b0:228:8929:ebdd with SMTP id y3-20020a5d4ac3000000b002288929ebddmr3059239wrs.379.1662387105917; Mon, 05 Sep 2022 07:11:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR59gCV8iJwa0W9VPwLYApQdrZr0y4lc62O6YAvQ2UiwZoF5AM5WMblrIuzSAT/YNd7zTNw++Q== X-Received: by 2002:a5d:4ac3:0:b0:228:8929:ebdd with SMTP id y3-20020a5d4ac3000000b002288929ebddmr3059223wrs.379.1662387105621; Mon, 05 Sep 2022 07:11:45 -0700 (PDT) Received: from localhost ([31.111.84.229]) by smtp.gmail.com with ESMTPSA id n30-20020a05600c501e00b003a61306d79dsm12941792wmr.41.2022.09.05.07.11.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 07:11:45 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: Re: [PATCH 0/9] Disassembler opcode display and text alignment In-Reply-To: <87v8rl82t9.fsf@redhat.com> References: <87v8rl82t9.fsf@redhat.com> Date: Mon, 05 Sep 2022 15:11:44 +0100 Message-ID: <87leqxnc67.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.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, 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: Mon, 05 Sep 2022 14:11:50 -0000 Ping! Thanks, Andrew Andrew Burgess writes: > Ping! > > Thanks, > Andrew > > Andrew Burgess writes: > >> This series makes two related changes to GDB's disassembler. Both >> changes flow naturally from having GDB make use of libopcodes >> bytes_per_line and bytes_per_chunk presentation hints that are set on >> a per-architecure basis with each call into the disassembler. >> >> The end result of this change is that GDB will now display instruction >> opcodes in the same way that objdump does. >> >> For x86-64 there's no change in the way that opcode bytes are >> presented. Now due to some special case, it's just that how GDB lays >> out instruction opcodes just happens to match how libopcodes requests >> that the opcodes be laid out. >> >> For other architectures, risc-v, powerpc, arm, aarch64, etc, this is >> not the case, and I (personally) think objdump does a better job of >> presenting the information that GDB does; the instruction opcodes will >> be grouped together based on the instruction size, and potentially >> byte-swapped so they appear in the instruction's natural order. >> >> Making use of the display hints also allows for better alignment of >> the disassembly text when opcodes are being printed. >> >> I have proposed that this new behaviour become the default for >> 'disassemble /r', and I've added a new flag 'disassemble /b' which >> allows the user to access the old behaviour. >> >> But, if people feel strongly that the old 'disassemble /r' should not >> be changed, I can place the new behaviour under a new flag. >> >> Let me know your thoughts, >> >> Thanks, >> Andrew >> >> --- >> >> Andrew Burgess (9): >> gdb/doc: improve description of --data-disassemble opcodes output >> gdb/testsuite: new test for -data-disassemble opcodes format >> gdb/disasm: read opcodes bytes with a single read_code call >> gdb: disassembler opcode display formatting >> gdb: make gdb_disassembly_flag unsigned >> gdb/doc: fix column widths in MI compatibility table >> gdb/doc: update syntax of -data-disassemble command arguments >> gdb/mi: some int to bool conversion >> gdb/mi: new options for -data-disassemble command >> >> gdb/NEWS | 12 ++ >> gdb/cli/cli-cmds.c | 6 + >> gdb/disasm-flags.h | 3 +- >> gdb/disasm.c | 55 +++++++-- >> gdb/disasm.h | 3 + >> gdb/doc/gdb.texinfo | 137 ++++++++++++++++----- >> gdb/mi/mi-cmd-disas.c | 105 ++++++++++++---- >> gdb/record.c | 3 + >> gdb/testsuite/gdb.mi/mi-disassemble.exp | 153 ++++++++++++++++++++---- >> gdb/testsuite/lib/mi-support.exp | 27 +++++ >> 10 files changed, 417 insertions(+), 87 deletions(-) >> >> -- >> 2.25.4