From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CCB343858D33; Thu, 22 Feb 2024 10:35:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCB343858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708598142; bh=9hpA7Iu6ZbpK1RvnD/2S1x9Z6F6gNpSVH60ZAUOlr7w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=thtS11RSET+JfmYie7J0gt80PuQF/JCgQJ2WhBPlj1CHw9VBPgDli9OIgdgcDfZxR 8/Uxkh8J1xy4z6BAnVqywze6XeVXq9yO6DjSmUnTGaMnwq19g6bb1xEzaQ6WId6sji 8j+LAdkNASyCrrvgNft3P44HoD1seypY8YBtAe4c= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug dap/31386] [gdb/dap] Race between dap startup and dap log file initialization Date: Thu, 22 Feb 2024 10:35:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: dap X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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=3D31386 --- Comment #8 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D05bf17f03b89= 0424312163463754de63cee73074 commit 05bf17f03b890424312163463754de63cee73074 Author: Tom de Vries Date: Thu Feb 22 11:35:26 2024 +0100 [gdb/dap] Fix race between dap startup and dap log file In dap_gdb_start we do: ... append GDBFLAGS " -iex \"set debug dap-log-file $logfile\" -q -i=3Ddap" ... While the dap log file setting comes before the dap interpreter setting, the order is the other way around: - first, the dap interpreter is started - second, the -iex commands are executed and the log file is initialize= d. Consequently, there's a race between dap interpreter startup and dap log file initialization. This cannot be fixed by using -eiex instead. Before the interpreter is started, the "set debug dap-log-file" command is not yet registered. Fix this by postponing the start of the DAP server until GDB has proces= sed all command files. Tested on aarch64-linux. Approved-By: Tom Tromey PR dap/31386 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31386 --=20 You are receiving this mail because: You are on the CC list for the bug.=