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 D21BC3857C43 for ; Fri, 26 Nov 2021 13:39:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D21BC3857C43 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-350-qM_b8ZXnNwSvQ_7-K2nNvg-1; Fri, 26 Nov 2021 08:39:37 -0500 X-MC-Unique: qM_b8ZXnNwSvQ_7-K2nNvg-1 Received: by mail-wm1-f70.google.com with SMTP id i131-20020a1c3b89000000b00337f92384e0so6873888wma.5 for ; Fri, 26 Nov 2021 05:39: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:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ygr3Is9Eyu0fjdhCDeG4OW984kPAbcBE3EPwmqZ7MWI=; b=O4Y/pK8Hh31lYNNei+dbrWiv472BFER2q1xjVQfP0nPqkCUQR9eqm1U4lbOIxo9RdI ib/02dBOSdKsmdba1SwEHVTOvS6A8twn/vpEGVsKnTpjQk8O9qz6pq3eYY/D91oVQSK9 UseP8U3QqprdfhW41A0393zJhBEy3a+Tl4w/LsJtOm/R1ZPDlT6X9tln1Fw4Nh72LclY +LnO2+8ZySNn1YeA1ImOp81+VqxuELAPg2R0y2Z9NJVH47RKYEln9F3L833PTu30QjbM +wGBkF5/duDy89gWpBDDnYsueIVqGI4ur9cXA3yBc8eNnOqiRRWLBTmaNUhIuiPhXHTg PyBg== X-Gm-Message-State: AOAM533sVzXQ0tZgdwJP92xsvkY3sSk4eFboA8ssxLOaYEdqQS3IGtRV IUXxyBOSlqaEEZjgiixQ26hBBtKXicwx/Ar+7txLoVSV+oRMg9kCYs5RXNPD2IxY7YdVaZG7x+3 VM8H9D8maLfU= X-Received: by 2002:a7b:c8c8:: with SMTP id f8mr15700648wml.49.1637933975943; Fri, 26 Nov 2021 05:39:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJykA8ZWBCzkxt70FDSaFpYADrTGksR1GVWw+dBbckaQ91EEtVMjdf21e+msAEE3XA4ItPF5Dg== X-Received: by 2002:a7b:c8c8:: with SMTP id f8mr15700637wml.49.1637933975810; Fri, 26 Nov 2021 05:39:35 -0800 (PST) Received: from localhost (host86-166-129-255.range86-166.btcentralplus.com. [86.166.129.255]) by smtp.gmail.com with ESMTPSA id b15sm654913wri.62.2021.11.26.05.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 05:39:35 -0800 (PST) Date: Fri, 26 Nov 2021 13:39:34 +0000 From: Andrew Burgess To: Simon Sobisch , gdb@sourceware.org Subject: Re: Broken source view with Pygments and non-UTF-8 encoded source Message-ID: <20211126133934.GB514766@redhat.com> References: <60c53fa8bf160533a2eddf1da280eb50c7461a6a.camel@fit.cvut.cz> <20211126111621.GA514766@redhat.com> MIME-Version: 1.0 In-Reply-To: <20211126111621.GA514766@redhat.com> X-Operating-System: Linux/5.8.18-100.fc31.x86_64 (x86_64) X-Uptime: 13:38:47 up 7 days, 2:37, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.9 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@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2021 13:39:40 -0000 * Andrew Burgess via Gdb [2021-11-26 11:16:21 +0000]: > * Simon Sobisch via Gdb [2021-11-25 20:28:18 +0100]: > > > I _really_ like the Pygments option, but it sadly doesn't work when the > > source code as invalid UTF8 data in it. > > As soon as this is the case "list" does not show a nice highlighted code any > > more but instead Python Exception is raised (UnicodeDecodeError) and then > > non-colored lines are shown. > > > > This is especially bad when you "step" through the code because you get the > > python exception for every line. > > Could you post here, or provide a link to, an example source file that > triggers the error please. Never mind, I figured it out. I have a fix which I'll post to gdb-patches shortly. Thanks, Andrew