From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8F577385841B; Fri, 10 Sep 2021 19:37:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F577385841B From: "mehmetgelisin at aol dot com" To: gdb-prs@sourceware.org Subject: [Bug python/26974] Wrong Value.format_string docu for static members argument Date: Fri, 10 Sep 2021 19:37:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mehmetgelisin at aol dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 10.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2021 19:37:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26974 Mehmet gelisin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mehmetgelisin at aol dot c= om --- Comment #11 from Mehmet gelisin --- $ ./gdb -nx -q --data-directory=3Ddata-directory ~/a.out -ex "set confirm o= ff" -ex "file -readnow ~/a.out" http://www-look-4.com/ Reading symbols from /home/simark/a.out... Reading symbols from ~/a.out... /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:8098: http://www.compilatori.com/ internal-error: void create_all_comp_units(dwarf2_per_objfile*): Assertion `per_objfile->per_bfd->all_comp_units.empty ()' failed. http://www.wearelondonmade.com/=20 This is a recurring problem that exposes a design issue in the DWARF per-BFD sharing feature. Things work well when loading a binary with http://www.jopspeech.com/=20 the same method (with/without index, with/without readnow) twice in a row. But they don't work so well when loading http://joerg.li/ a bina= ry with different methods. See this previous fix, for example: http://connstr.net/=20 efb763a5ea35 ("gdb: check for partial symtab presence in dwarf2_initialize_objfile") http://embermanchester.uk/=20 That one handled the case where the first load is normal (uses partial symbols) and the second load uses an index. http://www.slipstone.co.uk/=20 The problem is that when loading an objfile with a method A, we create a dwarf2_per_bfd and some dwarf2_per_cu_data and initialize them with the data belonging to that method. When loading another obfile sharing the same BFD but with a different method B, http://www.logoarts.co.uk/ it's not clear how to re-use the dwarf2_per_bfd/dwarf2_per_cu_data previously created, because they contain the data specific to method A. I think the most http://www.acpirateradio.co.uk/ sensible fix would be= to not share a dwarf2_per_bfd between two objfiles loaded with different methods. That means that two objfiles sharing the same BFD and loaded the same way would share a dwarf2_per_bfd. Two objfiles sharing the same BFD but loaded with https://waytowhatsnext.com/=20 different methods would use two different dwarf2_per_bfd structures. However, this isn't a trivial change. So to fix the known issue quickly (including in the gdb 10 branch), this patch just disables all dwarf2_per_bfd sharing for objfiles using READNOW. https://www.webb-dev.co.uk/=20 Generalize the gdb.base/index-cache-load-twice.exp test to test all the possible combinations of loading a file with partial symtabs, index and readnow. Move it to gdb.dwarf2, since it really exercises features of the DWARF reader. http://www.iu-bloomington.com/=20 Value.format_string() states that the keyword for static members is called static_fields, but it is actually static gdb/ChangeLog: https://komiya-dental.com/ --=20 You are receiving this mail because: You are on the CC list for the bug.=