From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E3D583858D33; Tue, 8 Aug 2023 18:49:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3D583858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691520583; bh=Rkca9bSOIz40ZeBN8Vug0JH54xnO+xrxzHkybct5oQE=; h=From:To:Subject:Date:From; b=ls2b88X7MSyDuEs68mej87rUUGhe5R1fY4O/ks8C8aP34QtldGYU2CsHQxFnlTf+x BQ5ZPT7A3yJwRFJub8TNTtwUw2CS5HoErSe0zc28NZd69y5qYAc8vTEovFLuSpDUdh a26acU0iprTbLciiF3SWrJp8jCtJ9BUtRSf2PCTM= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30738] New: [gdb/symtab, readnow] different symtab order gives different results Date: Tue, 08 Aug 2023 18:49:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org 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=3D30738 Bug ID: 30738 Summary: [gdb/symtab, readnow] different symtab order gives different results 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: --- [ Previously noted at PR25857 ] Consider the following test-case: ... $ cat main.c int main () { return 0; } $ cat test.c static int aaa =3D 1; $ cat test2.c static int aaa =3D 2; ... Compiled like this: ... $ gcc main.c test.c test2.c -g ... Results with -readnow are different: ... $ gdb -q -batch a.out -ex "print aaa" $1 =3D 1 $ gdb -q -batch -readnow a.out -ex "print aaa" $1 =3D 2 ... Readnow expands the symtabs in the (reverse?) order of the debug info, while selective expansion of symtabs results in a list with expansion order. --=20 You are receiving this mail because: You are on the CC list for the bug.=