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/25833] New: [cc-with-gdb-index] FAIL: gdb.base/with.exp: basics: with language ada -- print g_s
Date: Thu, 16 Apr 2020 07:23:18 +0000	[thread overview]
Message-ID: <bug-25833-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 25833
           Summary: [cc-with-gdb-index] FAIL: gdb.base/with.exp: basics:
                    with language ada -- print g_s
           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: ---

When running test-case with.exp with target board cc-with-gdb-index, we have:
...
(gdb) PASS: gdb.base/with.exp: basics: show language
with language ada -- print g_s^M
'g_s' has unknown type; cast it to its declared type^M
(gdb) FAIL: gdb.base/with.exp: basics: with language ada -- print g_s
...

This scenario hits this case:
...
static void
dw2_map_matching_symbols
  (struct objfile *objfile,
   const lookup_name_info &name, domain_enum domain,
   int global,
   gdb::function_view<symbol_found_callback_ftype> callback,
   symbol_compare_ftype *ordered_compare)
{
  /* Used for Ada.  */
  struct dwarf2_per_objfile *dwarf2_per_objfile
    = get_dwarf2_per_objfile (objfile);

  if (dwarf2_per_objfile->index_table != nullptr)
    {
      /* Ada currently doesn't support .gdb_index (see PR24713).  We can get    
         here though if the current language is Ada for a non-Ada objfile       
         using GNU index.  As Ada does not look for non-Ada symbols this        
         function should just return.  */
      return;
    }
...

The reasoning for do nothing here is from a language perspective.

But the problem is that it makes gdb behaviour inconsistent between:
- having a .gdb_index section, and 
- having a .gdb_names section, or a partial symtab, or -readnow.

I think it's better to have consistent behaviour, and we should fix this.

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

             reply	other threads:[~2020-04-16  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16  7:23 vries at gcc dot gnu.org [this message]
2020-05-13  6:20 ` [Bug symtab/25833] " vries at gcc dot gnu.org
2020-05-13  9:42 ` vries at gcc dot gnu.org
2020-05-20  9:48 ` cvs-commit at gcc dot gnu.org
2020-05-20  9:49 ` vries at gcc dot gnu.org
2020-05-20  9:49 ` 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-25833-4717@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).