From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Aditya Kamath1 <Aditya.Kamath1@ibm.com>
Cc: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Subject: Re: [Patch] Fix Assertion pid 0 failure in AIX while running gdb.threads/foll-fork-other-thread
Date: Tue, 2 May 2023 14:06:40 +0000 [thread overview]
Message-ID: <f1f0585387903fc1dc52746202e958d824a4cd90.camel@de.ibm.com> (raw)
In-Reply-To: <CH2PR15MB3544CE8EBA1A777CD079FD07D66F9@CH2PR15MB3544.namprd15.prod.outlook.com>
Aditya Kamath1 <Aditya.Kamath1@ibm.com> wrote:
>>Ah, right. There's indeed no inf argument (unfortunately), but you can
>>just use "current_inferior ()" instead. This is guaranteed to be
>>set correctly at this point.
>
>This makes it easy. Thanks Ulrich. It fixes the issue and no memory leaks.
>Kindly push this small patch if there are no further changes.
Two issues:
- Please only use current_inferior() in the ::mourn_inferior path.
In the ::detach path you still should use the passed-in "inf".
(This means pd_enable/disable still should get an "inf" argument.)
- Your patch adds:
data = get_thread_data_helper_for_pid (current_inferior ()->pid);
where get_thread_data_helper_for_pid does:
inferior *inf = find_inferior_pid (current_inferior ()->process_target (),
pid);
return get_aix_thread_variables_data (inf);
This seems a bit silly (and inefficient) - if you already have
an "inf", you should just use get_aix_thread_variables_data directly.
Bye,
Ulrich
next prev parent reply other threads:[~2023-05-02 14:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 9:45 Aditya Kamath1
2023-04-27 12:20 ` Ulrich Weigand
2023-05-02 11:49 ` Aditya Kamath1
2023-05-02 12:53 ` Ulrich Weigand
2023-05-02 13:55 ` Aditya Kamath1
2023-05-02 14:06 ` Ulrich Weigand [this message]
2023-05-02 14:40 ` Aditya Kamath1
2023-05-02 14:52 ` Ulrich Weigand
2023-05-02 15:22 ` Aditya Kamath1
2023-05-02 15:33 ` Ulrich Weigand
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=f1f0585387903fc1dc52746202e958d824a4cd90.camel@de.ibm.com \
--to=ulrich.weigand@de.ibm.com \
--cc=Aditya.Kamath1@ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=sangamesh.swamy@in.ibm.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).