public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Jan Vrany via Gdb-patches <gdb-patches@sourceware.org>
Cc: Jan Vrany <jan.vrany@labware.com>
Subject: Re: [PATCH] gdb: care for dynamic objfiles in build_id_bfd_get ()
Date: Tue, 10 Jan 2023 07:14:47 -0700	[thread overview]
Message-ID: <87eds28oiw.fsf@tromey.com> (raw)
In-Reply-To: <20230109211948.604669-1-jan.vrany@labware.com> (Jan Vrany via Gdb-patches's message of "Mon, 9 Jan 2023 21:19:48 +0000")

>>>>> "Jan" == Jan Vrany via Gdb-patches <gdb-patches@sourceware.org> writes:

Jan> Accessing gdb.Objfile.build_id caused GDB to crash when objfile is
Jan> dynamic, that is created by JIT reader API. Similarly, invoking
Jan> gdb.Symtab.fullname() caused a crash. Possibly there are other paths
Jan> that may trigger the crash.

Is there a patch already for the fullname bug?

Jan> +  /* Dynamic objfiles such as ones created by JIT reader API
Jan> +     have no underlaying bfd structure (that is, objfile->obfd
Jan> +     is NULL).  */
Jan> +  if (abfd == nullptr)
Jan> +    return NULL;

Use 'nullptr' in new code.  This is ok with this change.

thank you,
Tom

  reply	other threads:[~2023-01-10 14:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 21:19 Jan Vrany
2023-01-10 14:14 ` Tom Tromey [this message]
2023-01-11 12:50   ` Jan Vraný

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=87eds28oiw.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.vrany@labware.com \
    /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).