From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EyVdHvRUt2GXVwAAWB0awg (envelope-from ) for ; Mon, 13 Dec 2021 09:13:08 -0500 Received: by simark.ca (Postfix, from userid 112) id 6CAD01F0D2; Mon, 13 Dec 2021 09:13:08 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 E6A0D1E940 for ; Mon, 13 Dec 2021 09:13:07 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 51D763857C66 for ; Mon, 13 Dec 2021 14:13:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51D763857C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1639404787; bh=dqhi1O5qipyVesMR7wFvnwxmNWSqbZrJEGlvYjsPH+0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=a76a6eayECOONn7zjhzI3XZYya2KnWfd1YS7Ptb8k5xN4LsR8MZtGJH5zAzOlIIF4 mPRO0kqni3v7e3wV+RfpDPFxNxYDVgleh8qwoRHBZwV07FqVd3g8Kt1VpiDku3IZ70 XpEQKoIGM+5WsmmP+3VsZVVT+Vkr8EkEIlz+XJxA= 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) To: gdb-patches@sourceware.org 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-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 Cc: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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