From: Tom Tromey <tom@tromey.com>
To: Aaron Merey via Gdb-patches <gdb-patches@sourceware.org>
Cc: Aaron Merey <amerey@redhat.com>,
tom@tromey.com, aburgess@redhat.com, lsix@lancelotsix.com
Subject: Re: [PATCH 2/2] PR gdb/27570: missing support for debuginfod in core_target::build_file_mappings
Date: Fri, 04 Mar 2022 08:20:05 -0700 [thread overview]
Message-ID: <87wnh9u4m2.fsf@tromey.com> (raw)
In-Reply-To: <20220303013501.265407-3-amerey@redhat.com> (Aaron Merey via Gdb-patches's message of "Wed, 2 Mar 2022 20:35:01 -0500")
>>>>> "Aaron" == Aaron Merey via Gdb-patches <gdb-patches@sourceware.org> writes:
Aaron> When core file shared libraries are found locally, verify that their
Aaron> build-ids match the corresponding build-ids found in the core file.
Aaron> If there is a mismatch, attempt to query debuginfod for the correct
Aaron> build and print a warning if unsuccessful:
Aaron> warning: Build-id of /lib64/libc.so.6 does not match core file.
Nice.
Aaron> + if (execbfd == nullptr)
Aaron> + warning (_("File \"%s\" from debuginfod cannot be opened as bfd"),
Aaron> + execpath.get ());
I suspect this should use gdb_bfd_errmsg.
Aaron> + char *dname = nullptr;
Aaron> + scoped_fd fd (debuginfod_find_executable (c, build_id, build_id_len, &dname));
Aaron> + debuginfod_set_user_data (c, nullptr);
Aaron> + if (fd.get () >= 0)
Aaron> + destname->reset (dname);
Is it possible for fd.get()<0 and dname!=nullptr? If so there's a
memory leak.
Aaron> + gdb::unique_xmalloc_ptr<char> build_id_hexstr =
Aaron> + get_cbfd_soname_build_id (current_program_space->cbfd, so->so_name);
'=' on the next line.
Tom
next prev parent reply other threads:[~2022-03-04 15:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 1:34 [PATCH 0/2] Add debuginfod core file support Aaron Merey
2022-03-03 1:35 ` [PATCH 1/2] gdb: Add soname to build-id mapping for core files Aaron Merey
2022-03-04 14:53 ` Tom Tromey
2022-03-08 0:30 ` Aaron Merey
2022-03-11 15:23 ` Tom Tromey
2022-03-11 21:44 ` Aaron Merey
2022-03-18 19:03 ` Tom Tromey
2022-03-21 18:21 ` Aaron Merey
2022-03-03 1:35 ` [PATCH 2/2] PR gdb/27570: missing support for debuginfod in core_target::build_file_mappings Aaron Merey
2022-03-04 15:20 ` Tom Tromey [this message]
2022-03-08 0:33 ` Aaron Merey
2022-03-11 15:27 ` Tom Tromey
2022-03-11 21:49 ` Aaron Merey
2022-03-21 18:22 ` Aaron Merey
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=87wnh9u4m2.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=amerey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.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).