public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "kadler at us dot ibm.com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/28018] internal-error: Assertion 'TYPE_LENGTH(index_type) > 0' failed in create_range_type
Date: Thu, 28 Oct 2021 19:10:24 +0000	[thread overview]
Message-ID: <bug-28018-4717-9S8tX6g4X0@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28018-4717@http.sourceware.org/bugzilla/>

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

--- Comment #10 from Kevin Adler <kadler at us dot ibm.com> ---
So it looks like GDB locates the specific psymtab that contains the symbol
being looked up and calls read_symtab() on it. This invokes xcoff_read_symtab
through the legacy_psymtab implementation. This then calls expand_psymtab,
which ends up invoking xcoff_expand_psymtab. This then calls
expand_dependencies (but there are never dependencies, based on my last
comment) and finally calls read_xcoff_symtab on the psymtab. So yeah, only the
psymtab containing the symbol will be loaded and if it depends on types defined
in other psymtabs it will blow up.

I modified the code to add dependencies on the prior psymtabs created for the
same file (only works if the csects are adjacent/contiguous, which comments
seem to indicate may not always be the case, but it's works for my testing).
The first csect for a file would have no dependencies, then the second would
depend on the first, the third depend on the second, and so on... I'm not sure
if this is what the dependencies are supposed to be fore, but it let me do some
testing. This still doesn't work because at the start of read_xcoff_symtab
(called for each dependency), start_stabs is called which sets type_vector to
NULL so all the types defined by the previous csect for the file are lost. :(

Seems like the stabs/xcoff code would need a large rewrite in order to make
this all work correctly since type_vector is a global variable and not
associated with a source file/psymtab/etc. And if the comments are true about
csects for the same file being fragmented, it makes it even more complicated
since you'd basically need a way to look up all the psymtabs associated with a
given filename. I do see that the psymtabs are all given the same name (the
filename), though I'm not sure how much them having the same name actually
helps.

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

  parent reply	other threads:[~2021-10-28 19:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 11:00 [Bug breakpoints/28018] New: " vsfos at foxmail dot com
2021-06-27 11:03 ` [Bug breakpoints/28018] " simark at simark dot ca
2021-06-27 11:13 ` vsfos at foxmail dot com
2021-06-27 23:57 ` vsfos at foxmail dot com
2021-06-30  7:17 ` vsfos at foxmail dot com
2021-06-30  8:14 ` vsfos at foxmail dot com
2021-06-30 11:28 ` vsfos at foxmail dot com
2021-06-30 12:41 ` simark at simark dot ca
2021-10-19  2:01 ` kadler at us dot ibm.com
2021-10-25 18:05 ` kadler at us dot ibm.com
2021-10-28 19:10 ` kadler at us dot ibm.com [this message]
2021-10-28 19:41 ` simon.marchi at polymtl dot ca
2021-10-28 21:16 ` kadler at us dot ibm.com

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-28018-4717-9S8tX6g4X0@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).