From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 544653857C4D; Thu, 22 Oct 2020 15:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 544653857C4D From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/25858] [readnow] FAIL: gdb.ada/bp_c_mixed_case.exp: break Date: Thu, 22 Oct 2020 15:26:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: RESOLVED X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: Thu, 22 Oct 2020 15:26:20 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25858 --- Comment #12 from Tom de Vries --- (In reply to Tom de Vries from comment #4) > (In reply to Tom de Vries from comment #3) > > (In reply to Tom de Vries from comment #2) > > > Tentative patch: > > > ... > > > diff --git a/gdb/symtab.c b/gdb/symtab.c > > > index dc079efbc2..63a4b91f12 100644 > > > --- a/gdb/symtab.c > > > +++ b/gdb/symtab.c > > > @@ -2933,6 +2933,9 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, str= uct > > > obj_section *section) > > > const struct blockvector *bv; > > >=20=20 > > > bv =3D COMPUNIT_BLOCKVECTOR (cust); > > > + if (!blockvector_contains_pc (bv, pc)) > > > + continue; > > > + > > > b =3D BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); > > >=20=20 > > > if (BLOCK_START (b) <=3D pc > > > ... > >=20 > > There must be some kind of invariant I'm breaking with the usage of > > blockvector_contains_pc in the tentative patch, because this assert: > > ... > > diff --git a/gdb/block.c b/gdb/block.c > > index 9b582433e4..bb21d72dbe 100644 > > --- a/gdb/block.c > > +++ b/gdb/block.c > > @@ -167,7 +167,10 @@ find_block_in_blockvector (const struct blockvector > > *bl, CORE_ADDR pc) > > { > > b =3D BLOCKVECTOR_BLOCK (bl, bot); > > if (BLOCK_END (b) > pc) > > - return b; > > + { > > + gdb_assert (BLOCK_START (b) <=3D pc); > > + return b; > > + } > > bot--; > > } > >=20=20 > > ... > > does not trigger on master, but if I build master with the tentative pa= tch, > > it triggers all the time in the testsuite (already counting 127 FAILs in > > gdb.ada at gdb.ada/mi_interface.exp). >=20 > Tentative patch for this problem: > ... > diff --git a/gdb/block.c b/gdb/block.c > index 9b582433e4..f883724d56 100644 > --- a/gdb/block.c > +++ b/gdb/block.c > @@ -166,7 +166,7 @@ find_block_in_blockvector (const struct blockvector *= bl, > CORE_ADDR pc) > while (bot >=3D STATIC_BLOCK) > { > b =3D BLOCKVECTOR_BLOCK (bl, bot); > - if (BLOCK_END (b) > pc) > + if (BLOCK_START (b) <=3D pc && pc < BLOCK_END (b)) > return b; > bot--; > } > ... Committed a similar patch at https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3D5fb4027fae1= 839cabbea75112c31bd89d46d2af0 . --=20 You are receiving this mail because: You are on the CC list for the bug.=