public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/31497] gdb internal fatal error while opening a core dump; binary built with '-gsplit-dwarf'
Date: Sat, 16 Mar 2024 16:17:39 +0000	[thread overview]
Message-ID: <bug-31497-4717-CJ7MgTUxw2@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31497-4717@http.sourceware.org/bugzilla/>

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
>       -> p is NULL -> SIGSEGV in read_initial_length() below

I think this means the section wasn't read in for some reason.
This is probably where I would start investigating.

One thing I notice is that read_str_index ensures that the
section is read in:

  str_section->read (objfile);
  str_offsets_section->read (objfile);

However, read_dwo_str_index does not do this.

I think I'd expect the section to be read in by dwarf2_locate_dwo_sections
or dwarf2_locate_v2_dwp_sections or dwarf2_locate_v5_dwp_sections, though.
(Depending on which file it comes from, I didn't look too deeply here...)

Could you see if one of those is hit and reads the section?
Maybe there's some error.  Or maybe just adding the calls to
read_dwo_str_index will fix it, this seems like an oversight
in the commit you pointed out.

>   [ 6] .debug_str_offsets.dwo PROGBITS        0000000000000000 0583e7 0057f8 00   E  0   0  1
>       --- gdb/dwarf2/read.c:10821 [create_dwo_unit_in_dwp_v5] -> size=0x57f8 correct but offset=0 wrong

The offset from 'readelf -WS' is the offset in the file.
I'm not sure but I doubt it's the same as the offsets mentioned
in create_dwp_hash_table.

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

  reply	other threads:[~2024-03-16 16:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-16  7:42 [Bug gdb/31497] New: " sungdgdhtryrt at gmail dot com
2024-03-16 16:17 ` tromey at sourceware dot org [this message]
2024-03-17  4:01 ` [Bug gdb/31497] " sam at gentoo dot org
2024-03-17  7:37 ` sungdgdhtryrt at gmail dot com
2024-03-17 22:01 ` tromey at sourceware dot org
2024-03-18 18:05 ` sungdgdhtryrt at gmail dot com
2024-03-19 13:18 ` tromey at sourceware dot 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-31497-4717-CJ7MgTUxw2@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).