public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/27354] New: Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)
@ 2021-02-05 15:50 vries at gcc dot gnu.org
  2021-02-11 11:01 ` [Bug symtab/27354] " vries at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2021-02-05 15:50 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27354
           Summary: Dwarf Error: wrong unit_type in compilation unit
                    header (is DW_UT_split_compile (0x05), should be
                    DW_UT_type (0x02)
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

When running test-case gdb.dwarf2/fission-mix.exp using gcc-11 (and using the
tentative fix for PR27353), I run into:
...
(gdb) file
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/fission-mix/fission-mix^M
Reading symbols from
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/fission-mix/fission-mix...^M
Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile
(0x05), should be DW_UT_type (0x02)) [in module
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/fission-mix/fission-mix2.dwo]^M
(No debugging symbols found in
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/fission-mix/fission-mix)^M
(gdb) break -q main^M
...

This seems to fix it:
...
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index dd308ca7ba3..f9c058bdf17 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -12952,7 +12952,7 @@ open_and_init_dwo_file (dwarf2_cu *cu, const char
*dwo_name,
     {
       create_debug_type_hash_table (per_objfile, dwo_file.get (),
                                    &dwo_file->sections.info, dwo_file->tus,
-                                   rcuh_kind::TYPE);
+                                   rcuh_kind::COMPILE);
     }

   dwarf_read_debug_printf ("DWO file found: %s", dwo_name);
...

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

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

* [Bug symtab/27354] Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)
  2021-02-05 15:50 [Bug symtab/27354] New: Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02) vries at gcc dot gnu.org
@ 2021-02-11 11:01 ` vries at gcc dot gnu.org
  2021-02-22  2:36 ` tromey at sourceware dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2021-02-11 11:01 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2021-February/175956.html

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

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

* [Bug symtab/27354] Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)
  2021-02-05 15:50 [Bug symtab/27354] New: Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02) vries at gcc dot gnu.org
  2021-02-11 11:01 ` [Bug symtab/27354] " vries at gcc dot gnu.org
@ 2021-02-22  2:36 ` tromey at sourceware dot org
  2021-02-25 14:41 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2021-02-22  2:36 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
             Blocks|                            |27453


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=27453
[Bug 27453] [meta] DWARF 5 support
-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug symtab/27354] Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)
  2021-02-05 15:50 [Bug symtab/27354] New: Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02) vries at gcc dot gnu.org
  2021-02-11 11:01 ` [Bug symtab/27354] " vries at gcc dot gnu.org
  2021-02-22  2:36 ` tromey at sourceware dot org
@ 2021-02-25 14:41 ` cvs-commit at gcc dot gnu.org
  2021-02-25 14:43 ` vries at gcc dot gnu.org
  2021-08-24 17:51 ` ryancoop987 at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-25 14:41 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=30c80d8833c037f25dd144a64f7f8b7b3ab19027

commit 30c80d8833c037f25dd144a64f7f8b7b3ab19027
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Feb 25 15:41:49 2021 +0100

    [gdb/symtab] Fix wrong unit_type Dwarf Error

    When running test-case gdb.dwarf2/fission-mix.exp using gcc-11 (and using
the
    tentative fix for PR27353 to get past that assertion failure), I run into:
    ...
    (gdb) file fission-mix^M
    Reading symbols from fission-mix...^M
    Dwarf Error: wrong unit_type in compilation unit header \
      (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)) \
      [in module fission-mix2.dwo]^M
    (No debugging symbols found in fission-mix)^M
    ...

    The compilation unit that is complained about is:
    ...
    Contents of the .debug_info.dwo section (loaded from fission-mix2.dwo):

      Compilation Unit @ offset 0x0:
       Length:        0x57 (32-bit)
       Version:       5
       Unit Type:     DW_UT_split_compile (5)
       Abbrev Offset: 0x0
       Pointer Size:  8
       DWO ID:        0x3e3930d3cc1805df
     <0><14>: Abbrev Number: 1 (DW_TAG_compile_unit)
    ...

    And the dwarf error is triggered here in read_comp_unit_head:
    ...
            case DW_UT_split_compile:
              if (section_kind != rcuh_kind::COMPILE)
                error (_("Dwarf Error: wrong unit_type in compilation unit
header "
                       "(is %s, should be %s) [in module %s]"),
                       dwarf_unit_type_name (cu_header->unit_type),
                       dwarf_unit_type_name (DW_UT_type), filename);
              break;
    ...
    due to passing rcuh_kind::TYPE here in open_and_init_dwo_file:
    ...
          create_debug_type_hash_table (per_objfile, dwo_file.get (),
                                        &dwo_file->sections.info,
dwo_file->tus,
                                        rcuh_kind::TYPE);
    ...

    Fix this by changing the section_kind argument to
create_debug_type_hash_table
    to rcuh_kind::COMPILE, to reflect that we're passing
&dwo_file->sections.info
    rather than &dwo_file->sections.types.

    Tested on x86_64-linux.

    gdb/ChangeLog:

    2021-02-25  Tom de Vries  <tdevries@suse.de>

            PR symtab/27354
            * dwarf2/read.c (open_and_init_dwo_file): Use rcuh_kind::COMPILE as
            section_kind for &dwo_file->sections.info.

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

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

* [Bug symtab/27354] Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)
  2021-02-05 15:50 [Bug symtab/27354] New: Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02) vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-02-25 14:41 ` cvs-commit at gcc dot gnu.org
@ 2021-02-25 14:43 ` vries at gcc dot gnu.org
  2021-08-24 17:51 ` ryancoop987 at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2021-02-25 14:43 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |11.1
             Status|NEW                         |RESOLVED

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Patch committed, marking resolved-fixed.

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

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

* [Bug symtab/27354] Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)
  2021-02-05 15:50 [Bug symtab/27354] New: Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02) vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-02-25 14:43 ` vries at gcc dot gnu.org
@ 2021-08-24 17:51 ` ryancoop987 at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ryancoop987 at gmail dot com @ 2021-08-24 17:51 UTC (permalink / raw)
  To: gdb-prs

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

ryan9999 <ryancoop987 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ryancoop987 at gmail dot com

--- Comment #4 from ryan9999 <ryancoop987 at gmail dot com> ---
Very nice post here follow the here https://freeskinsblog.com and got it how to
get free skins in fortnite all information.

-- 
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:[~2021-08-24 17:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 15:50 [Bug symtab/27354] New: Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02) vries at gcc dot gnu.org
2021-02-11 11:01 ` [Bug symtab/27354] " vries at gcc dot gnu.org
2021-02-22  2:36 ` tromey at sourceware dot org
2021-02-25 14:41 ` cvs-commit at gcc dot gnu.org
2021-02-25 14:43 ` vries at gcc dot gnu.org
2021-08-24 17:51 ` ryancoop987 at gmail 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).