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 37B5E385840E for ; Wed, 16 Feb 2022 20:53:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 37B5E385840E Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-114-mXDJC1bHN5-Y7PCHaN4Wiw-1; Wed, 16 Feb 2022 15:53:37 -0500 X-MC-Unique: mXDJC1bHN5-Y7PCHaN4Wiw-1 Received: by mail-wr1-f69.google.com with SMTP id s22-20020adf9796000000b001e7e75ab581so1474957wrb.23 for ; Wed, 16 Feb 2022 12:53:37 -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:mime-version :content-transfer-encoding; bh=WYcE41P7a+pLE73asToS79fE82suDPx2YE2Xc0lLzX4=; b=ZVBaqOdcCiteTLgQJ2l/wkuVz6GNhjDfNimkJgx+2XYCtkWu9DCz0Cus1WSRRbNfFX LctFCaVlxYOnXYKEqhxaSzsUOcHRNUZNiBDe61kSJrM5mgCcuTCW1O5Mo/lUh+D29e5e lI+FRDdlC53fVn/PQXRsxYnxX9483kzmrAAuKL1XxAYz02B9kz3iyw0HhzNbNdlDVkJC EDC/fDsDMB17ebQlGYX8gicx/YOhZxxsMW/apUv/L8a4D5nYAqI+ZBSGJvg6bkTX34fy Qcn7EZ8UEAXXBa64KqPOH6Jv3hzlfgBeunxL/5i/RO08tn4kDKSqTt53XJF5Ff7vahyB NMNg== X-Gm-Message-State: AOAM531GkcFelQ0fkxdYczMlknGyHK5s6s53ljs10knqaDJE0OLGyeu5 79Y5/Il3xcAdo+mhvGvhd7f0TAfOlLr4NkYx3yPi63GDVj4DrWC3NldtDyYJYjDNkmlbejEuGtw 3PqA3dp5TmyY63gj888U493Lbt+s+Q4V2hFX1kC4mbhTjEgL44iIyTYG7BWVKdV1sIubUNQ== X-Received: by 2002:a5d:408e:0:b0:1e4:a80c:251 with SMTP id o14-20020a5d408e000000b001e4a80c0251mr3640943wrp.379.1645044816122; Wed, 16 Feb 2022 12:53:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyi0XbG+7KmQRAsaZic7qag9IHlRiccMH34EQb8xZTalg5CeD/gEzmhPxcswvI99Ywe82gvwQ== X-Received: by 2002:a5d:408e:0:b0:1e4:a80c:251 with SMTP id o14-20020a5d408e000000b001e4a80c0251mr3640927wrp.379.1645044815844; Wed, 16 Feb 2022 12:53:35 -0800 (PST) Received: from localhost (host86-134-151-224.range86-134.btcentralplus.com. [86.134.151.224]) by smtp.gmail.com with ESMTPSA id w8sm36997204wre.83.2022.02.16.12.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 12:53:35 -0800 (PST) From: Andrew Burgess To: binutils@sourceware.org Cc: Andrew Burgess Subject: [PATCH 0/3] disassembler syntax highlighting in objdump (via libopcodes) Date: Wed, 16 Feb 2022 20:53:28 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 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=-3.0 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, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2022 20:53:42 -0000 This series is a serious attempt at what I discussed here: https://sourceware.org/pipermail/binutils/2021-December/118806.html This series changes libopcodes so that this disassemblers can supply styling information with every piece of disassembly output, e.g. is this a register? an address? a mnemonic? etc. Users of the disassembler can then choose to make use of this information to add styling to the disassembler output. And that is what I do for objdump in this series. The styling is off by default, but can be turned on with a new command line flag: --disassembler-color=off|color|extended-color I've updated GDB enough to keep it building and running after this change, though at this point GDB doesn't make use of the new styling information, that will come later. All feedback would be welcome. Thanks, Andrew --- Andrew Burgess (3): objdump/opcodes: add syntax highlighting to disassembler output opcodes/riscv: implement style support in the disassembler opcodes/i386: partially implement disassembler style support binutils/NEWS | 4 + binutils/doc/binutils.texi | 11 ++ binutils/objdump.c | 245 ++++++++++++++++++++++++++++++++----- gdb/disasm.c | 34 ++++- gdb/disasm.h | 7 ++ include/dis-asm.h | 62 +++++++++- opcodes/dis-init.c | 5 +- opcodes/disassemble.c | 23 +++- opcodes/i386-dis.c | 71 +++++++---- opcodes/riscv-dis.c | 147 +++++++++++----------- 10 files changed, 475 insertions(+), 134 deletions(-) -- 2.25.4