From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4CA973858D37; Fri, 13 Jan 2023 14:49:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CA973858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673621350; bh=j+UgNxcbTJP2+H9bU6NRZ3kf47JZqAq1gg7vZm75Fj8=; h=From:To:Subject:Date:From; b=C4HSWQlWT0q49tXJp44VYiCGBaTW/ViEgrH0XENlO1UPRfyatI9boJwntWs7/QIR3 KmXQ+eAja17m67d43WrQmsR2b1qK8eresYW0YbwfBChcUEl4eMTMcX1TcDoifmMH9/ LCL2bcuM4jlQpSfDzdEpzCCyLr2/O5OC5Em4BqSs= From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug gdb/29999] New: Bogus error message printed when debuginfod doesn't find source file Date: Fri, 13 Jan 2023 14:49:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: simark at simark dot ca 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 29999 Summary: Bogus error message printed when debuginfod doesn't find source file Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: simark at simark dot ca Target Milestone: --- Debugging on Arch Linux with DEBUGINFOD_URLS=3Dhttps://debuginfod.archlinux= .org, stopping into a glibc function for which debuginfod didn't find the source = file (for whatever reason), GDB printed: __libc_start_call_main (main=3Dmain@entry=3D0x555555555139
, argc=3Dargc@entry=3D1, argv=3Dargv@entry=3D0x7fffffffd6f8) at ../sysdeps/nptl/libc_start_call_main.h:74 Downloading source file /usr/src/debug/glibc/csu/../sysdeps/nptl/libc_start_call_main.h 74 ../sysdeps/nptl/libc_start_call_main.h: Directory not empty.=20=20= =20 The next times (when the cache was populated, I suppose), I got: __libc_start_call_main (main=3Dmain@entry=3D0x555555555139
, argc=3Dargc@entry=3D1,=20 argv=3Dargv@entry=3D0x7fffffffd6f8) at ../sysdeps/nptl/libc_start_call_main.h:74 74 ../sysdeps/nptl/libc_start_call_main.h: Bad file descriptor. I think this use of errno, in print_source_lines_base, is incorrect: https://gitlab.com/gnutools/binutils-gdb/-/blob/6f9f448118eaeaf006f867a2569= 9aef7d8c72770/gdb/source.c#L1357 The last thing we did before this was to call into debuginfod_find_source, which returned -2 (meaning ENOENT, which makes sense). But the errno value after calling debuginfod_find_source is not defined, and I think this resul= ts in an error message that does not make sense. --=20 You are receiving this mail because: You are on the CC list for the bug.=