From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 879073858284; Thu, 12 Oct 2023 08:20:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 879073858284 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1697098805; bh=notE/cWz3se5y3rLlB2wSZug1isBnL+YkZhINoNGAYg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JtOqpnUSn0MnDj0sFiu9irBGM9gw130PI7WLywCzbCGUELQxvVxkds5qujCUPyF6R QK2BiKVw38TIX5VqLYTM466ZXFjc2knH1lwJixXYFFjTaU2VjNiXnIWr/UMu2oDcwP 8rtnLt/znFw2AGNvfI6pEF3Q11XWzQxlkfx+j0dw= 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: Thu, 12 Oct 2023 08:20:05 +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 #1 from Tom de Vries --- (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 might= be > able to figure out which parser to use based on the file extension. See https://www.gnu.org/software/src-highlite/source-highlight-lib.html whi= ch 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; ... --=20 You are receiving this mail because: You are on the CC list for the bug.=