public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/101141] New: Fedora glibc debuginfo .dwz contains a partial unit with needed debuginfo but which is not imported
@ 2021-06-21  2:59 roc at ocallahan dot org
  2021-06-21  3:02 ` [Bug debug/101141] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: roc at ocallahan dot org @ 2021-06-21  2:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101141

            Bug ID: 101141
           Summary: Fedora glibc debuginfo .dwz contains a partial unit
                    with needed debuginfo but which is not imported
           Product: gcc
           Version: 11.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roc at ocallahan dot org
  Target Milestone: ---

The Fedora 34 package glibc-debuginfo-2.33-16.fc34.x86_64 package has glibc
symbols in
/usr/lib/debug/.build-id/08/1490fc18239fa63189a53e526a68ee5d19c571.debug whose
.gnu_debugaltlink is /usr/lib/debug/usr/.dwz/glibc-2.33-16.fc34.x86_64.

/usr/lib/debug/.build-id/08/1490fc18239fa63189a53e526a68ee5d19c571.debug has a
compilation unit that imports the partial unit at 0x1f63c from the .dwz file:

UNIT<header overall offset = 0x000795ee>:
< 0><0x0000000c GOFF=0x000795fa>  DW_TAG_compile_unit
                                    DW_AT_producer             
<.debug_str(sup)+0x0001200e>
                                    DW_AT_language              DW_LANG_C11
                                    DW_AT_name                  global-locale.c
                                    DW_AT_comp_dir             
/usr/src/debug/glibc-2.33-16.fc34.x86_64/locale
                                    DW_AT_stmt_list            
<.debug_line+0x0000ce8a>
< 1><0x0000001e GOFF=0x0007960c>    DW_TAG_imported_unit
                                      DW_AT_import               
<.debug_info(sup)+0x0001f63c>

That partial unit contains a variable declaration whose DW_AT_specification
(0x1f0d2) lives in another partial compilation unit:

UNIT<header overall offset = 0x0001f630>:
< 0><0x0000000c GOFF=0x0001f63c>  DW_TAG_partial_unit
                                    DW_AT_stmt_list            
<.debug_line+0x00000000>
...
< 1><0x00000038 GOFF=0x0001f668>    DW_TAG_variable
                                      DW_AT_specification        
<.debug_info+0x0001f0d2>
                                      DW_AT_decl_file             0x0000013b
/usr/src/debug/glibc-2.33-16.fc34.x86_64/locale/global-locale.c
                                      DW_AT_decl_line             0x00000040
                                      DW_AT_decl_column           0x00000013
                                      DW_AT_location              len 0x000a:
0e00000000000000009b: DW_OP_const8u 0 DW_OP_form_tls_address

UNIT<header overall offset = 0x0001f0c1>:
< 0><0x0000000c GOFF=0x0001f0cd>  DW_TAG_partial_unit
                                    DW_AT_stmt_list            
<.debug_line+0x00000000>
< 1><0x00000011 GOFF=0x0001f0d2>    DW_TAG_variable
                                      DW_AT_name                 
__libc_tsd_LOCALE
                                      DW_AT_decl_file             0x00000089
/usr/src/debug/glibc-2.33-16.fc34.x86_64/locale/localeinfo.h
                                      DW_AT_decl_line             0x000000e1
                                      DW_AT_decl_column           0x00000001
                                      DW_AT_type                 
<.debug_info+0x00035fb3>
                                      DW_AT_external              yes
                                      DW_AT_declaration           yes

However, the partial unit at 0x1f0cd is not imported anywhere in
/usr/lib/debug/.build-id/08/1490fc18239fa63189a53e526a68ee5d19c571.debug as far
as I can tell. I think the compilation unit at global-locale.c, at least,
should be importing it.

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

* [Bug debug/101141] Fedora glibc debuginfo .dwz contains a partial unit with needed debuginfo but which is not imported
  2021-06-21  2:59 [Bug debug/101141] New: Fedora glibc debuginfo .dwz contains a partial unit with needed debuginfo but which is not imported roc at ocallahan dot org
@ 2021-06-21  3:02 ` pinskia at gcc dot gnu.org
  2021-06-21  3:30 ` roc at ocallahan dot org
  2021-06-21  3:36 ` roc at ocallahan dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-06-21  3:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101141

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-06-21
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This sounds like either a binutils issue or a https://sourceware.org/dwz/ issue
or a Fedora issue.
Can you rebuild glibc in Fedora and look at the resulting glibc.so file before
the dwz and debug info gets stripped?

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

* [Bug debug/101141] Fedora glibc debuginfo .dwz contains a partial unit with needed debuginfo but which is not imported
  2021-06-21  2:59 [Bug debug/101141] New: Fedora glibc debuginfo .dwz contains a partial unit with needed debuginfo but which is not imported roc at ocallahan dot org
  2021-06-21  3:02 ` [Bug debug/101141] " pinskia at gcc dot gnu.org
@ 2021-06-21  3:30 ` roc at ocallahan dot org
  2021-06-21  3:36 ` roc at ocallahan dot org
  2 siblings, 0 replies; 4+ messages in thread
From: roc at ocallahan dot org @ 2021-06-21  3:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101141

roc at ocallahan dot org <roc at ocallahan dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|WAITING                     |RESOLVED

--- Comment #2 from roc at ocallahan dot org <roc at ocallahan dot org> ---
Good point. It looks correct in the generated .so so it's probably a DWZ bug.
I'll repost it there. Sorry for the noise.

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

* [Bug debug/101141] Fedora glibc debuginfo .dwz contains a partial unit with needed debuginfo but which is not imported
  2021-06-21  2:59 [Bug debug/101141] New: Fedora glibc debuginfo .dwz contains a partial unit with needed debuginfo but which is not imported roc at ocallahan dot org
  2021-06-21  3:02 ` [Bug debug/101141] " pinskia at gcc dot gnu.org
  2021-06-21  3:30 ` roc at ocallahan dot org
@ 2021-06-21  3:36 ` roc at ocallahan dot org
  2 siblings, 0 replies; 4+ messages in thread
From: roc at ocallahan dot org @ 2021-06-21  3:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101141

--- Comment #3 from roc at ocallahan dot org <roc at ocallahan dot org> ---
Filed https://sourceware.org/bugzilla/show_bug.cgi?id=28000

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

end of thread, other threads:[~2021-06-21  3:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21  2:59 [Bug debug/101141] New: Fedora glibc debuginfo .dwz contains a partial unit with needed debuginfo but which is not imported roc at ocallahan dot org
2021-06-21  3:02 ` [Bug debug/101141] " pinskia at gcc dot gnu.org
2021-06-21  3:30 ` roc at ocallahan dot org
2021-06-21  3:36 ` roc at ocallahan dot org

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).