From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 45999385828E; Sat, 11 Feb 2023 02:12:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45999385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676081522; bh=R06c3UwkFL0mmScnKkKqk6jIoxkhbEeTaLnpZgvzY1M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ovXHXbJFOAx3U3H9lcuaY+VoIdbuNDyCnP6McRRP7D8iDiUa8WbjEF3Pve9GCOxYl xvwgi/ZNfK96mDdcuOuaTEjb301FsN0W8wDCtLrHWF6hf0/iBV4vPEe/4+YMGe927/ 5x/1XY/xOhXGrWICuepBYQMPVOodb6JA1s7xG+dw= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/29999] Bogus error message printed when debuginfod doesn't find source file Date: Sat, 11 Feb 2023 02:12:01 +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: 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=3D29999 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Aaron Merey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8cc96ee4169f= 631917d048cbaeec14ddf8ccb90d commit 8cc96ee4169f631917d048cbaeec14ddf8ccb90d Author: Aaron Merey Date: Thu Feb 9 20:35:32 2023 -0500 gdb/source: Fix open_source_file error handling open_source_file relies on errno to communicate the reason for a missing source file. open_source_file may also call debuginfod_find_source. It is possible for debuginfod_find_source to set errno to a value unrelated to the reason for a failed download. This can result in bogus error messages being reported as the reason for a missing source file. The following error message should instead be "No such file or directory": Temporary breakpoint 1, 0x00005555556f4de0 in main () (gdb) list Downloading source file /usr/src/debug/glibc-2.36-8.fc37.x86_64/elf/ 1 /usr/src/debug/glibc-2.36-8.fc37.x86_64/elf/: Direc= tory not empty. Fix this by having open_source_file return a negative errno if it fails to open a source file. Use this value to generate the error message instead of errno. Approved-By: Tom Tromey Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29999 --=20 You are receiving this mail because: You are on the CC list for the bug.=