From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6B3493858CDB; Wed, 18 Oct 2023 16:57:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B3493858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1697648226; bh=oJFD4NG+okoHEQQeX9huQ4ix6x9iVUbeIGT3g54HNkw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fOMdcFwYu0cavMZ/XWtv/JreMsKwdlVVmucxL5p3szjMVvf4xxiYdp5oVq+hpclDo yypTHG6qfqdEIyuSRGWMe0kn+ohdzo0ojWW4WTMKWA/R/cmr3KifB78YISAyAPLU8D cGENJaxHCvKbAc8BNCQUmMJnr8ZdVmEvdoqduFdA= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug cli/30966] [gdb/cli] pygments finds language based on file name, source-highlight finds language based on debug info Date: Wed, 18 Oct 2023 16:57:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30966 --- Comment #2 from Tom de Vries --- (In reply to Tom de Vries from comment #1) > (In reply to Tom de Vries from comment #0) > > Conversely, if gdb can't decide what parser to use for source-highlight= , it > > gives up (and falls back to pygments), even though source-highlight mig= ht be > > able to figure out which parser to use based on the file extension. >=20 > See https://www.gnu.org/software/src-highlite/source-highlight-lib.html > which shows the example ./lib/examples/source-highlight-console-main.cpp > with this bit: > ... > // we have a file name so we detect the input source language > srchilite::LangMap langMap(DATADIR, "lang.map"); > string lang =3D langMap.getMappedFileNameFromFileName(argv[1= ]); > if (lang !=3D "") { > inputLang =3D lang; > ... https://sourceware.org/pipermail/gdb-patches/2023-October/203387.html --=20 You are receiving this mail because: You are on the CC list for the bug.=