From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1zfXIeU7/GE3DgAAWB0awg (envelope-from ) for ; Thu, 03 Feb 2022 15:32:37 -0500 Received: by simark.ca (Postfix, from userid 112) id 79B7B1F3BA; Thu, 3 Feb 2022 15:32:37 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C5B191ECEB for ; Thu, 3 Feb 2022 15:32:36 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1471E3858402 for ; Thu, 3 Feb 2022 20:32:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1471E3858402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1643920356; bh=5IJicZm6JcztlNlXHJlj3gDhjv6h6LzKSnP/I7DQPxU=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=r2HaGaHk11ZOtNeQVer9oEZuFrOF9H+STku2QWKuHCR1aBGUGXFFCvsWEJ0ckpTqb YAZdr3ax+sLLRd+ANXLMbfntMIqqiwQ17JwFB7fjVvAbYEEhgxsvRdb9s+7fn9kalw YJSs1t7F5jaxtIeLSmaEHoq5GLNnQMfnySZc1TWE= 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 880233858D35 for ; Thu, 3 Feb 2022 20:32:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 880233858D35 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-Ox4mu62CPfiYUn9qe96EyQ-1; Thu, 03 Feb 2022 15:32:13 -0500 X-MC-Unique: Ox4mu62CPfiYUn9qe96EyQ-1 Received: by mail-wr1-f71.google.com with SMTP id k7-20020adfb347000000b001dd761d46c7so1140651wrd.4 for ; Thu, 03 Feb 2022 12:32:13 -0800 (PST) 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=5IJicZm6JcztlNlXHJlj3gDhjv6h6LzKSnP/I7DQPxU=; b=NQn1ImUj7rORw09IDzCC6U5VLmHT7ZNwibPVH/5j90FbdT44ZPgluRbZzqksKo/jww 9Bqn6uU4h2+bynKO6YJgPRi3MECDmlSLGVJPf20nBQoyLOM3PJSCVK5CI94h3QdBE3Fg ZWs0GsE1FAFW+j+2jYIuJbXS07kojqjlg7OJF5ZNDzXlLkItGTebkbJ50MMqF3lbrZ2B gXK/+Sq72pNySg+g4DSVFTH21tQbmdOIBdgEgPWjnN6cv3K4UXZBlG2Zq7RAqiPWUun3 G8kvS41dDbY6O2dOZes7Mkz8oOGCPUcTPA3AWTM5dg5/YDyehm0UVTCj/uC5PahvlwsK VvTg== X-Gm-Message-State: AOAM533zzVy0pEKLQho0tmXxu274NhF9b/4zVeDTZToMSL8acWymyz1+ JBhAVWufcPymNnshLA28qe+OBesXPFcWTGw4+B+ATQfz8MBmItrxYJLfRY45yVwgSRxgY/IyxrM 525p4ObaorsbJWzkKn3nlMVUAp8Yu2c4SmEEy4VC/Aseqo20SJqSDXsFzwe239HkrIoSNMT2Pfg == X-Received: by 2002:a05:6000:15ca:: with SMTP id y10mr30765135wry.417.1643920332436; Thu, 03 Feb 2022 12:32:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXltVEBqRNLmgqeKcVMmnoWEB8gyHQXZ8YXC1S42hsV3Yrn2QiwUYiNa04glJ2KlWsahsqAw== X-Received: by 2002:a05:6000:15ca:: with SMTP id y10mr30765119wry.417.1643920332134; Thu, 03 Feb 2022 12:32:12 -0800 (PST) Received: from localhost (host86-140-92-93.range86-140.btcentralplus.com. [86.140.92.93]) by smtp.gmail.com with ESMTPSA id i19sm3812400wmo.13.2022.02.03.12.32.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 12:32:11 -0800 (PST) To: gdb-patches@sourceware.org Subject: Re: [PATCHv5 0/2] Disassembler Output Styling In-Reply-To: References: Date: Thu, 03 Feb 2022 20:32:10 +0000 Message-ID: <871r0jr8s5.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: , From: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Ping! Any objections if I merge this? Patch #2 was already given the OK right back in V1. Patch #1 had some general points raised in V1, which I've addressed, but nothing serious. So I think this is probably OK to push, but I want to give folk a change to complain before I go for it. Thanks, Andrew Andrew Burgess writes: > Changes in v5: > > Rebased onto current master. > > Simplified the colorize_disasm API in match my latest proposal here: > https://sourceware.org/pipermail/gdb-patches/2022-January/185060.html > That is, the colorize_disasm takes a bytes object, and is expected > to return a bytes object, nothing else is allowed (ecept for None, > which is a special case). > > Changes in v4: > > Rebased on to current master. The colorize_disasm function is now > passed a bytes object rather than a unicode string. The return from > colorize_disasm can be either a bytes object, or a unicode string. > If GDB gets a unicode string, then it is converted to bytes using > the current host_charset(). > > There's no change in the documentation in this version, the > documentation has already been reviewed in a previous version. > > Changes in v3: > > In this update, the biggest change, is that the controlling setting is > now 'set/show style disassembler enabled', that is I've added > 'enabled' to the setting name. > > My reason for this is that, in the future, I might want to add > additional disassembler styles, like: > > set style disassembler register .... > set style disassembler mnemonic .... > > And the new setting name leaves this possibility open, while the old > setting made this harder. > > This version also includes an improved test, minor updates to the docs > to match the above change, and a rebase to current master. > > > --- > > Andrew Burgess (2): > gdb: use python to colorize disassembler output > gdb/python: move styling support to gdb.styling > > gdb/NEWS | 6 +++ > gdb/cli/cli-style.c | 44 +++++++++++++++++ > gdb/cli/cli-style.h | 3 ++ > gdb/data-directory/Makefile.in | 1 + > gdb/disasm.c | 58 +++++++++++++++++++++- > gdb/disasm.h | 25 ++++++++++ > gdb/doc/gdb.texinfo | 15 ++++++ > gdb/extension-priv.h | 6 +++ > gdb/extension.c | 20 ++++++++ > gdb/extension.h | 8 +++ > gdb/python/lib/gdb/__init__.py | 18 ------- > gdb/python/lib/gdb/styling.py | 49 ++++++++++++++++++ > gdb/python/python.c | 85 ++++++++++++++++++++++++++++++-- > gdb/testsuite/gdb.base/style.exp | 82 +++++++++++++++++++++++++++++- > 14 files changed, 396 insertions(+), 24 deletions(-) > create mode 100644 gdb/python/lib/gdb/styling.py > > -- > 2.25.4