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.129.124]) by sourceware.org (Postfix) with ESMTPS id F40EE3857C40 for ; Fri, 7 Jan 2022 14:23:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F40EE3857C40 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-107-o3-Eixt3NBCLqvmfDaZ6Bg-1; Fri, 07 Jan 2022 09:23:45 -0500 X-MC-Unique: o3-Eixt3NBCLqvmfDaZ6Bg-1 Received: by mail-wm1-f69.google.com with SMTP id g4-20020a1c9d04000000b00346e0d6877fso892743wme.8 for ; Fri, 07 Jan 2022 06:23:45 -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=tbkPdMu3aO5zsK6fr/PsL9ntK+G+QK6Zs1NwYJxwv5I=; b=LuM3eEVaHzWa9SSybr/dP/K0GdY8MM+hjL9FgeO73vXZvKcUf+r31tVJgCSBrEArBd Og5HHR/m+WevY6nux0cR/dUdsdLBXkYSXPRz9zmmWYNrRWgtJ4OybfBoSYytuCwhor/D BK6yEs+tfpfTtp9e6/W6Tyje7jzwSJA5AQww2GtI1Ayht5guvzPj6Xh2ZxEoyjcTuR0s u9jX4eMJyNN9ZoBSeerR3pZpx9rCscqb1kmK4b0BgTD3ncoiIZa27TUcEx8iro/CtDp0 3gW1BcAC2tRnkEjJGA/xenXwBjlGkuCh2SQUCn+K5WUZ0nCpnXMnJoFxwIZV+pDvK/Dm 9Klw== X-Gm-Message-State: AOAM532B9W75erIt3l9sbZJrHbax9/WPELcOe2Vu+eTcMbRC4xLE4JGL s1VvtiuCbD13Q8LKz8XwyHEVTbdoJWgxkjylOzJc7gJJGvThoruBCPfJk+B+/uiJ385oHOher5a pQBkHUzC5rQR8vXvFSH/1y6umzMPVCiutGu/4VpJNlQJSq4YIkzHlhnwfRhbTyCRQUr2IeuGrjA == X-Received: by 2002:a5d:47c7:: with SMTP id o7mr55620066wrc.642.1641565424394; Fri, 07 Jan 2022 06:23:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8NFIctCQ2IbxhDjvshjN7KE6R0FhV8H4Ms694HPgLHInbM2VKJ94XhM7jW4qTjTExLtCGyg== X-Received: by 2002:a5d:47c7:: with SMTP id o7mr55620051wrc.642.1641565424186; Fri, 07 Jan 2022 06:23:44 -0800 (PST) Received: from localhost (host109-154-163-67.range109-154.btcentralplus.com. [109.154.163.67]) by smtp.gmail.com with ESMTPSA id y15sm970978wmi.40.2022.01.07.06.23.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 06:23:43 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 0/4] Source highlight non utf-8 characters using Python Date: Fri, 7 Jan 2022 14:23:10 +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=-6.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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: Fri, 07 Jan 2022 14:23:50 -0000 This addresses an issue reported here: https://sourceware.org/pipermail/gdb/2021-November/049799.html A problem using the Python Pygments library to highlight source code containing non utf-8 characters. All feedback welcome. Thanks, Andrew --- Andrew Burgess (4): gdb: new 'maint flush source-cache' command gdb: erase items from the source_cache::m_offset_cache gdb: add 'maint set/show gnu-source-highlight enabled' command gdb/python: handle non utf-8 characters when source highlighting gdb/NEWS | 11 +++ gdb/doc/gdb.texinfo | 24 +++++ gdb/python/python.c | 56 ++++++++--- gdb/source-cache.c | 93 ++++++++++++++++++- gdb/testsuite/gdb.base/cached-source-file.exp | 38 ++++++++ gdb/testsuite/gdb.python/py-source-styling.c | 29 ++++++ .../gdb.python/py-source-styling.exp | 64 +++++++++++++ 7 files changed, 299 insertions(+), 16 deletions(-) create mode 100644 gdb/testsuite/gdb.python/py-source-styling.c create mode 100644 gdb/testsuite/gdb.python/py-source-styling.exp -- 2.25.4