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: Mon, 20 Apr 2020 15:03:30 +0000	[thread overview]
Message-ID: <bug-25858-4717-KTeAPWFpTz@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 #5 from Tom de Vries <vries at gcc dot gnu.org> ---
(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
> ...

With this tentative patch, I run into:
...
FAIL: gdb.fortran/info-modules.exp: info module functions (timeout)
...
and a similar fail in mi-fortran-modules.exp.

More precisely:
...
(gdb) info module functions^M
All functions in all modules:^M
warning: (Internal error: pc 0x7ffff74b60a0 in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74b60a5 in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74b60aa in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74b60af in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74b60b4 in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74b60b9 in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74b60be in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74b60c8 in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74b60cd in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74c5e50 in read in psymtab, but not in
symtab.)^M
^M
warning: (Internal error: pc 0x7ffff74c5e50 in read in psymtab, but not in
symtab.)^M
...

To reproduce:
...
$ gdb -batch outputs/gdb.fortran/info-modules/info-modules -ex "start" -ex
"info module functions"
...

This warning seems to stem from the fact that blockvector_contains_pc return
false for CU ../../../libgcc/unwind-dw2-fde-dip.c in objfile
/usr/lib/debug/lib64/libgcc_s.so.1-10.0.1+git175688-lp151.17.1.x86_64.debug.

The compunit has no address map:
...
(gdb) p *ps->get_compunit_symtab ()->blockvector
$6 = {nblocks = 19, map = 0x0, block = {0x43d23e0}}
...
despite  the fact that the CU has a DW_AT_ranges attribute:
...
 <0><db54>: Abbrev Number: 118 (DW_TAG_compile_unit)
    <db5a>   DW_AT_name        : ../../../libgcc/unwind-dw2-fde-dip.c
    <db62>   DW_AT_ranges      : 0x7a00
    <db66>   DW_AT_low_pc      : 0x0
    <db6e>   DW_AT_stmt_list   : 0xf498
...
which maps onto:
...
    00007a00 0000000000011030 00000000000130a3
    00007a00 00000000000030a0 00000000000030d2
    00007a00 <End of list>
...
and the pc we're trying to find is indeed in the CU:
...
(gdb) p /x pc - objf->text_section_offset ()
$14 = 0x30a0
...

It's the minimal symbol:
...
$ nm outputs/gdb.fortran/info-modules/info-modules
00000000000030a0 t read_encoded_value_with_base.cold
...

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

  parent reply	other threads:[~2020-04-20 15:03 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 [this message]
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
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-KTeAPWFpTz@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).