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 3E5273858409 for ; Mon, 13 Dec 2021 14:12:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E5273858409 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-146-Wn3JzXpONvGZWV95nqUNcw-1; Mon, 13 Dec 2021 09:12:46 -0500 X-MC-Unique: Wn3JzXpONvGZWV95nqUNcw-1 Received: by mail-wm1-f71.google.com with SMTP id j25-20020a05600c1c1900b00332372c252dso6527700wms.1 for ; Mon, 13 Dec 2021 06:12:46 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dqhi1O5qipyVesMR7wFvnwxmNWSqbZrJEGlvYjsPH+0=; b=hxN6rS6ojxpTmU38sCYDlfR9FUzNeizfX6BDUMb0+2HJHRRku9KcObo7+EqUqihWiQ F5g5p4OZCoaB6c+PilvTEUevrWsGiSdH2xNZZ+ctgp5ZY4l3c919g6qTRSdOtfrfGnrl 2ugv3E6qdDM02vYKL8DTXkaAI7snskyRQdINdQwV6WF3yHRQwj7jDSj4gmeY4jlMbyOV yjCEE/p20C3GIAXLfg7P7LmjbEyAfaHonlVEnBW9y4kvnxFGaXJn8I3LmzZFpJq3HEPt i1lXq5X33CWfe+GhKoSEekBl2jhT/Xz2u9hI1mkBBSQKVe0/nWZ4oghifD09B94gXZM9 UHpg== X-Gm-Message-State: AOAM532GgGFQ8vdK47tr0zgAZdC42nIkRhMB19XaOvq4pkSUpB1LAx/t f2z5fCF/YrLilzZIqjCsiNIkxAFcr0n+LCzOaRHzlCs1Ituo/qN74J4OzzROLMg305c4qYCIEl9 SEmKD8swJIrjkKMf5NmFp1NdkKiv0fXtOrzoMXkmu+F7ppguctXC8OShpOi5cPqVkwTTkKldnvA == X-Received: by 2002:a05:6000:15ca:: with SMTP id y10mr17545529wry.642.1639404765343; Mon, 13 Dec 2021 06:12:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1R0eiYrtWk60smx9DoBEFSQL4JIZjBJwwRLsqOH7CqdJ3FYVCg4XfaQufe1J6yh+HJIN7Cw== X-Received: by 2002:a05:6000:15ca:: with SMTP id y10mr17545495wry.642.1639404765118; Mon, 13 Dec 2021 06:12:45 -0800 (PST) Received: from localhost (host86-134-238-138.range86-134.btcentralplus.com. [86.134.238.138]) by smtp.gmail.com with ESMTPSA id y142sm7477725wmc.40.2021.12.13.06.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 06:12:44 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv3 0/2] Disassembler Output Styling Date: Mon, 13 Dec 2021 14:12:37 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 13 Dec 2021 14:12:50 -0000 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. Feedback welcome, Thanks, Andrew --- Since v2: - Rebased onto current master, - Changed the name of the setting to 'set/show style disassembler enabled', - Updated the test to cover toggling this setting, - Updated the NEWS and docs to match the setting change, - Updated the commit message on patch #1, which I forgot to do in v2. Since v1: - I pushed patches #1 and #2, - I rebased onto current master, minor conflicts resolved, no other changes. - New patch #2 (old patch #4) has been reviewed, so just patch #1 needs review. --- 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 | 48 ++++++++++++++++++ gdb/python/python.c | 85 ++++++++++++++++++++++++++++++-- gdb/testsuite/gdb.base/style.exp | 82 +++++++++++++++++++++++++++++- 14 files changed, 395 insertions(+), 24 deletions(-) create mode 100644 gdb/python/lib/gdb/styling.py -- 2.25.4