public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/25858] [readnow] FAIL: gdb.ada/bp_c_mixed_case.exp: break <NoDebugMixedCaseFunc>
Date: Thu, 22 Oct 2020 15:26:19 +0000	[thread overview]
Message-ID: <bug-25858-4717-TUjNBdUoXU@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25858-4717@http.sourceware.org/bugzilla/>

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

--- Comment #12 from Tom de Vries <vries at gcc dot gnu.org> ---
(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, struct
> > > obj_section *section)
> > >           const struct blockvector *bv;
> > >  
> > >           bv = COMPUNIT_BLOCKVECTOR (cust);
> > > +         if (!blockvector_contains_pc (bv, pc))
> > > +           continue;
> > > +
> > >           b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
> > >  
> > >           if (BLOCK_START (b) <= pc
> > > ...
> > 
> > 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 = BLOCKVECTOR_BLOCK (bl, bot);
> >        if (BLOCK_END (b) > pc)
> > -       return b;
> > +       {
> > +         gdb_assert (BLOCK_START (b) <= pc);
> > +         return b;
> > +       }
> >        bot--;
> >      }
> >  
> > ...
> > does not trigger on master, but if I build master with the tentative patch,
> > it triggers all the time in the testsuite (already counting 127 FAILs in
> > gdb.ada at gdb.ada/mi_interface.exp).
> 
> 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 >= STATIC_BLOCK)
>      {
>        b = BLOCKVECTOR_BLOCK (bl, bot);
> -      if (BLOCK_END (b) > pc)
> +      if (BLOCK_START (b) <= pc && pc < BLOCK_END (b))
>         return b;
>        bot--;
>      }
> ...

Committed a similar patch at
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5fb4027fae1839cabbea75112c31bd89d46d2af0
.

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

  parent reply	other threads:[~2020-10-22 15:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20  7:23 [Bug symtab/25858] New: " vries at gcc dot gnu.org
2020-04-20  7:56 ` [Bug symtab/25858] " vries at gcc dot gnu.org
2020-04-20  7:57 ` vries at gcc dot gnu.org
2020-04-20 13:49 ` vries at gcc dot gnu.org
2020-04-20 13:53 ` vries at gcc dot gnu.org
2020-04-20 15:03 ` vries at gcc dot gnu.org
2020-04-20 15:29 ` vries at gcc dot gnu.org
2020-04-20 15:52 ` vries at gcc dot gnu.org
2020-04-23  8:40 ` vries at gcc dot gnu.org
2020-06-05  6:02 ` vries at gcc dot gnu.org
2020-06-05  8:29 ` andrew.burgess at embecosm dot com
2020-10-22 11:03 ` vries at gcc dot gnu.org
2020-10-22 15:26 ` vries at gcc dot gnu.org [this message]
2020-10-26 19:31 ` vries at gcc dot gnu.org
2020-10-28 20:10 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-25858-4717-TUjNBdUoXU@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).