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 189843858C54 for ; Fri, 12 May 2023 17:50:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 189843858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683913856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Kmp200jU9eKn4nZmGeV03P7KqqBhT2iLB/cuoA4KUo=; b=IOUivvY5DblY0j/q8RVelNR0V5fc3ZAxsShYDkO5VZxMEY1AE2CMe6sbvqLVZRhxyLHxEy CUo8KQrCytovMVOq9VHyzjXqUjeokFrbAxGM+qTgB342gTn2yzVFwy1SNcpZGMoejJuVMX ipc9tSDIhoZsvUzZow01WJYlOpkBKXU= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-310-OvdemKtwMfK7NOZ8D0iqHw-1; Fri, 12 May 2023 13:50:55 -0400 X-MC-Unique: OvdemKtwMfK7NOZ8D0iqHw-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f42b226871so20136745e9.0 for ; Fri, 12 May 2023 10:50:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683913854; x=1686505854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1Kmp200jU9eKn4nZmGeV03P7KqqBhT2iLB/cuoA4KUo=; b=OhHGFQV0VIMshIhDlj4Pm0XWEgPpopRgifpMKuaN+EbYzgDpystT/M1YnN+ToaoE3S ZAsOq7/Q52HWOW7+TBz8t5TcrK4y1lsUIJi0NiM5G02x14XDgVxcQcA098EH1wja479s nPmb1TRfQPo8qtJMc+y4qcFEFMg3LcRvkquR2NaKZEHIJ0yRVU3rCI2pQTYLYIvH0U/q /j3PxVG9d8N2QCXmaH4QJhgS/lqm4CKjhmBbxygkEnZcgpwaCqY512vgR1lvoE2TnA3u aVasvC1xM7Fz1j/jxmi7D6EtI06QXsGPL1qun5XPLS6PLFe5cIqpVbLVOs56JC5Nt5ij QiAA== X-Gm-Message-State: AC+VfDz3qz73kYjV9PTfPtYDksHlCq8jQrQZ8HcNR3yWkvFbtJg2GXs5 FJuVs+A/LjHYWckUDco4cIk4XJYeBjX9Tc1kVPo+uvZrSyO0YPcJSSf6+eJYIo7xwX0OsObV1cx AMwdcuPlPQus/LZPTB8RM+/SGV6cHkXWdSwQF7/iLSnpsBUCw2MWG9VZkJvusZ4xiSuArWtJzbG OHcB9FdA== X-Received: by 2002:a5d:408f:0:b0:306:3352:5ba3 with SMTP id o15-20020a5d408f000000b0030633525ba3mr16018916wrp.25.1683913854309; Fri, 12 May 2023 10:50:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7SFPn+d6LWp5rpC1Y1XP1wuLigyE69vmM7uDtMWNdEHZu3tdmrh3lo2DhTbBXv2q4AROJivA== X-Received: by 2002:a5d:408f:0:b0:306:3352:5ba3 with SMTP id o15-20020a5d408f000000b0030633525ba3mr16018907wrp.25.1683913854001; Fri, 12 May 2023 10:50:54 -0700 (PDT) Received: from localhost (92.40.219.55.threembb.co.uk. [92.40.219.55]) by smtp.gmail.com with ESMTPSA id p6-20020adfe606000000b002e5f6f8fc4fsm24079006wrm.100.2023.05.12.10.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 10:50:53 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv3 0/2] Disassembler Styling And The Python API Date: Fri, 12 May 2023 18:50:47 +0100 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-default=true X-Spam-Status: No, score=-2.7 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_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: I belive both of these patches are OK for docs, and just need a final code review if anyone wants to take a look. Given I've already had one review (which I've addressed) I'll probably merge this in a couple of weeks if nobody has any further feedback. Changes since v2: - Rebase onto current master, no conflicts or other changes needed, - Merged the first 3 patches from the series. Changes since v1: - All Eli's doc feedback has been addressed, - PySequence_GetItem return value is checked against nullptr, - Added a couple of try/catch blocks to prevent C++ exceptions hitting the Python interpreter, - Added tp_str methods to the address part and text part classes. Thanks, Andrew --- Andrew Burgess (2): gdb/python: rework how the disassembler API reads the result object gdb/python: extend the Python Disassembler API to allow for styling gdb/NEWS | 22 + gdb/doc/python.texi | 313 ++++++++- gdb/python/py-disasm.c | 913 ++++++++++++++++++++++--- gdb/testsuite/gdb.python/py-disasm.exp | 89 ++- gdb/testsuite/gdb.python/py-disasm.py | 201 ++++-- 5 files changed, 1381 insertions(+), 157 deletions(-) base-commit: 6a667807390b7091b5ec088d979c779f65d3dfa5 -- 2.25.4