From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFE2E3858D28; Tue, 3 Oct 2023 08:49:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFE2E3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1696322958; bh=8xGH1CCVPch7M1j2ELQPy7hMuBBmyJ9sDeNZfQnWDcc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=F0vzGdCD6JdLo1+dX6JgTOrV/3cgFUxMc+iFMQROQcT1eQ1Ro505twmv/5LuC1wMG Ejx+yhC2JTOgnUXSKG8klsH60tRqKLewvPLs5wal0r/XSMKiSDjKC8t0v2w/gUR9y+ pU0RsgkuyS4Kn1mtm+0xItF6+WqHnO+Oz/XJOf0A= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/30934] Stopping at a breakpoint takes minutes if a source file has long lines Date: Tue, 03 Oct 2023 08:49:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D30934 --- Comment #5 from Tom de Vries --- (In reply to Hi-Angel from comment #0) > No idea why it's taking so long, given I do not execute any commands that > would trigger showing these long lines, This is because source_cache::ensure annotates a file at at time rather tha= n a line at at time. > but debugging such a file with gdb > is nigh impossible.=20 With "set style sources off" I get: ... $ time gdb -q a.out -ex "b 56" -ex "set style sources off" -ex run -ex "set confirm off" -ex quit Reading symbols from a.out... Breakpoint 1 at 0x400ff5: file test.cpp, line 56. Starting program: /data/vries/gdb/a.out=20 Breakpoint 1, Solution::numOfSubarrays (this=3D0x7ffffff9c15f, arr=3D...) at test.cpp:56 56 return (int) t; real 0m0.135s user 0m0.254s sys 0m0.028s ... So you can use as workaround: - "set style sources off", or - build with --disable-source-highlight and still use source styling with=20 the Python Pygments package, for me that takes about 1 sec. --=20 You are receiving this mail because: You are on the CC list for the bug.=