public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/29999] New: Bogus error message printed when debuginfod doesn't find source file
@ 2023-01-13 14:49 simark at simark dot ca
  2023-01-13 14:49 ` [Bug gdb/29999] " simark at simark dot ca
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: simark at simark dot ca @ 2023-01-13 14:49 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29999

            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=https://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=main@entry=0x555555555139 <main>,
argc=argc@entry=1, argv=argv@entry=0x7fffffffd6f8) 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.   

The next times (when the cache was populated, I suppose), I got:

__libc_start_call_main (main=main@entry=0x555555555139 <main>,
argc=argc@entry=1, 
    argv=argv@entry=0x7fffffffd6f8) 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/6f9f448118eaeaf006f867a25699aef7d8c72770/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 results
in an error message that does not make sense.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-11  2:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 14:49 [Bug gdb/29999] New: Bogus error message printed when debuginfod doesn't find source file simark at simark dot ca
2023-01-13 14:49 ` [Bug gdb/29999] " simark at simark dot ca
2023-01-14  1:07 ` amerey at redhat dot com
2023-01-14  1:14 ` simark at simark dot ca
2023-02-11  2:12 ` cvs-commit at gcc dot gnu.org
2023-02-11  2:16 ` amerey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).